project QadFinancials > class BVAT > business logic query VatByAllFields
Description
Give vat code back based on all parameters of vat table
Parameters
| iiVatId | integer | |
| icVatCode | character | |
| icVatDeliveryType | character | |
| icVatPercentageLevel | character | |
| icVatInOut | character | |
| icTransactionType | character | |
| icVatAVRCode | character | VatAVRCode; if you realy want to have a condition with a test on empty for this field then you have to pass string "EMPTYAVRCODE":U |
| ilVatIsActive | logical | Is 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 name | data type | db field | description |
| tiVat_ID | integer | Vat.Vat_ID | Record ID |
| tcVatAVRType | character | Vat.VatAVRType | AVR Code |
| tcVatCode | character | Vat.VatCode | Tax Code |
| tcVatDescription | character | Vat.VatDescription | Description |
| tcVatInOut | character | Vat.VatInOut | Tax In/Out |
| tlVatIsActive | logical | Vat.VatIsActive | Active |
| tcVatPercentageLevel | character | Vat.VatPercentageLevel | Tax Percentage Level |
| tcVatTransactionType | character | Vat.VatTransactionType | Transaction Type |
Internal usage
QadFinancials