/** User Defined Validation Procedure **/
/** Purpose: Used to validate AP Entry lines to see if lines coded to Asset Accounts meet threshold. **/
/** Created by Constructive Tech Solutions 4/20/2018 **/
(
@GLAccount char(20) = NULL
,@lineamount numeric(12,2)
,@msg VARCHAR(255) OUTPUT
)
AS
DECLARE @rcode int
SELECT @rcode = 0
IF @GLAcct IN ('18020.', '18040.','18060.') --The
Acceptable GL Accounts are listed here with a comma
seperator
AND @lineamount >= 4999.99
BEGIN
SELECT @rcode=1,@msg='Caution: Verify Line is an Asset or
Recode to Expense Account' end
SPEXIT:
RETURN @rcode