pears.SelfbillVATCodeForTimesheetLine
Generated schema reference. Regenerate this page from the SQL unload; keep hand-maintained business notes in the narrative namespace.
Original SQL
CREATE FUNCTION "pears"."SelfbillVATCodeForTimesheetLine"( IN "tslineid" CHAR(20),IN "suppliercode" CHAR(12) ) RETURNS CHAR(3) BEGIN DECLARE "rv" CHAR(3); SELECT "vatstatus" INTO "rv" FROM "iqacaccountsettings" WHERE "accountcode" = "suppliercode" AND "ledgerid" = 'Purchase'; RETURN "isnull"("rv",'S') END