project QadFinancials > class BCInvoice > business logic query CInvoiceVatForTaxByLine
Description
query that reads all tax-lines of an invoice and joins to the tax-definition to know the tax by line property
Parameters
| iiCInvoiceId | integer | ID of the Creditor Invoice |
| iiCompanyId | integer | Company id |
| icDomainCode | character | |
query condition
each CInvoiceVat where
CInvoiceVat.CInvoice_ID = iiCInvoiceId
first Vat (inner-join) where
Vat.Vat_ID = CInvoiceVat.Vat_ID AND
first tx2_mstr (inner-join) where
tx2_mstr.tx2_tax_code = Vat.VatCode AND
tx2_mstr.tx2_domain = icDomainCode
first Domains (inner-join) where
Domains.DomainCode = tx2_mstr.tx2_domain AND
each Company (inner-join) where
Company.Company_Id = iiCompanyId AND
Company.Domain_ID = Domains.Domain_ID AND
query resultset tqCInvoiceVatForTaxByLine
| field name | data type | db field | description |
| tiCInvoice_ID | integer | CInvoiceVat.CInvoice_ID | Link to CInvoice |
| tiCompany_ID | integer | Company.Company_ID | Record ID |
| tiDomain_ID | integer | Company.Domain_ID | Domain |
| tcDomainCode | character | Domains.DomainCode | Domain |
| tltx2_by_line | logical | tx2_mstr.tx2_by_line | Tax-By-Line |
| tctx2_domain | character | tx2_mstr.tx2_domain | Domain |
| tctx2_tax_code | character | tx2_mstr.tx2_tax_code | Tax Code |
| tiVat_ID | integer | Vat.Vat_ID | Record ID |
Internal usage
QadFinancials