project QadFinancials > class BVAT > business logic query VatByAllFields

Description

Give vat code back based on all parameters of vat table


Parameters


iiVatIdinteger
icVatCodecharacter
icVatDeliveryTypecharacter
icVatPercentageLevelcharacter
icVatInOutcharacter
icTransactionTypecharacter
icVatAVRCodecharacterVatAVRCode; if you realy want to have a condition with a test on empty for this field then you have to pass string "EMPTYAVRCODE":U
ilVatIsActivelogicalIs this vat code active ?


query condition


  each Vat where
Vat.Vat_ID = iiVatId AND
Vat.VatCode matches icVatCode AND
Vat.VatDeliveryType matches icVatDeliveryType AND
Vat.VatPercentageLevel matches icVatPercentageLevel AND
Vat.VatInOut matches icVatInOut AND
Vat.VatAVRType matches (if icVatAVRCode = 'EMPTYAVRCODE' then '' else icVatAVRCode) AND
Vat.VatTransactionType matches icTransactionType AND
Vat.VatIsActive = ilVatIsActive


query resultset tqVatByAllFields


field namedata typedb fielddescription
tiVat_IDintegerVat.Vat_IDRecord ID
tcVatAVRTypecharacterVat.VatAVRTypeAVR Code
tcVatCodecharacterVat.VatCodeTax Code
tcVatDescriptioncharacterVat.VatDescriptionDescription
tcVatInOutcharacterVat.VatInOutTax In/Out
tlVatIsActivelogicalVat.VatIsActiveActive
tcVatPercentageLevelcharacterVat.VatPercentageLevelTax Percentage Level
tcVatTransactionTypecharacterVat.VatTransactionTypeTransaction Type


Internal usage


QadFinancials
method BJournalEntry.DumpJEForConsolid