project QadFinancials > class BCInvoice > business logic query CInvoiceVatByAllocationInfo

Description

CInvoiceVatByAllocationInfo: query on the taxes of an invoice joined to tx2_mstr


Parameters


iiCInvoiceIDinteger
icDomainCodecharacter
ilDiscountTaxAtPaymentlogical


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 AND
tx2_mstr.tx2_pmt_disc = ilDiscountTaxAtPayment


query resultset tqCInvoiceVatByAllocationInfo


field namedata typedb fielddescription
tiCInvoice_IDintegerCInvoiceVat.CInvoice_IDLink to CInvoice
tiCInvoiceVat_IDintegerCInvoiceVat.CInvoiceVat_IDRecord ID
tlCInvoiceVatIsTaxablelogicalCInvoiceVat.CInvoiceVatIsTaxableTaxable. This field indicates if the invoice is taxable.
This field defaults to true if the supplier is taxable.
tdCInvoiceVatVatCreditTCdecimalCInvoiceVat.CInvoiceVatVatCreditTCTC Tax Amount CR. This field displays the credit tax amount (TC) calculated by the system using the total invoice amount (TC) and the applicable tax rate code.
tdCInvoiceVatVatDebitTCdecimalCInvoiceVat.CInvoiceVatVatDebitTCTC Tax Amount DR. This field displays the debit tax amount (TC) calculated by the system using the total invoice amount (TC) and the applicable tax rate code.
tiDomain_IDintegerVat.Domain_IDDomain
tctx2_domaincharactertx2_mstr.tx2_domainDomain
tltx2_pmt_disclogicaltx2_mstr.tx2_pmt_discDiscount Tax at Payment
tctx2_tax_codecharactertx2_mstr.tx2_tax_codeTax Code
tcTxclTaxClscharacterCInvoiceVat.TxclTaxClsTax Class. This field default from the supplier, and can be modified.
tcTxenvTaxEnvcharacterCInvoiceVat.TxenvTaxEnvTax Environment. This field is automatically calculated based on the supplier and ship-to address details, and can be modified.
tcTxtyTaxTypecharacterCInvoiceVat.TxtyTaxTypeTax Type. This field displays the tax type, which defaults from the tax environment.
tcTxuTaxUsagecharacterCInvoiceVat.TxuTaxUsageTax Usage. These fields default from the supplier, and can be modified.
tiVat_IDintegerCInvoiceVat.Vat_IDDomain
tcVatCodecharacterVat.VatCodeTax Code
tcVatInOutcharacterVat.VatInOutTax In/Out


Internal usage


QadFinancials
method BOpenItemAdjustment.OIAdjApplyFilterCreditor
method BOpenItemAdjustment.OIAdjCommitSubCInvoiceDiscount