project QadFinancials > class BCInvoice > business logic query CInvoicePostingForDelTax

Description

retrieve the posting tax records with delayed taxes


Parameters


iiCompanyIdintegerCompany id
iiCInvoiceIdintegerID of the supplier invoice
ilCInvoiceVatIsSuspDellogicalDelayed flag


query condition


  each CInvoice where
CInvoice.Company_Id = iiCompanyId AND
CInvoice.CInvoice_ID = iiCInvoiceId

      each CInvoiceVat (inner-join) where
CInvoiceVat.CInvoice_ID = CInvoice.CInvoice_ID AND
CInvoiceVat.CInvoiceVatIsSuspDel = ilCInvoiceVatIsSuspDel

          first Division1 (conditional-join) where
Division1.SharedSet_Id = vi_DIVISION_sharedset(iiCompanyId) AND
Division1.Division_ID = CInvoiceVat.NormalTaxDivision_ID AND

          first Division2 (conditional-join) where
Division2.SharedSet_Id = vi_DIVISION_sharedset(iiCompanyId) AND
Division2.Division_ID = CInvoiceVat.SuspDelTaxDivision_ID AND

          first GL1 (conditional-join) where
GL1.SharedSet_Id = vi_GL_sharedset(iiCompanyId) AND
GL1.GL_ID = CInvoiceVat.NormalTaxGL_ID AND

          first GL2 (conditional-join) where
GL2.SharedSet_Id = vi_GL_sharedset(iiCompanyId) AND
GL2.GL_ID = CInvoiceVat.SuspDelTaxGL_ID AND

          first PostingVat (conditional-join) where
PostingVat.PostingVat_ID = CInvoiceVat.PostingVat_ID AND

              first PostingLine (outer-join) where
PostingLine.Company_Id = iiCompanyId AND
PostingLine.PostingLine_ID = PostingVat.PostingLine_ID AND

              first Vat (outer-join) where
Vat.Vat_ID = PostingVat.Vat_ID AND

                  first Domains (outer-join) where
Domains.Domain_ID = Vat.Domain_ID AND

      first CostCentre (conditional-join) where
CostCentre.SharedSet_Id = vi_COSTCENTRE_sharedset(iiCompanyId) AND
CostCentre.CostCentre_ID = CInvoice.CostCentre_ID AND

      first Currency (inner-join) where
Currency.Currency_ID = CInvoice.CInvoiceCurrency_ID AND

      first Division3 (conditional-join) where
Division3.SharedSet_Id = vi_DIVISION_sharedset(iiCompanyId) AND
Division3.Division_ID = CInvoice.Division_ID AND

      first Project (conditional-join) where
Project.SharedSet_Id = vi_PROJECT_sharedset(iiCompanyId) AND
Project.Project_ID = CInvoice.Project_ID AND


query resultset tqCInvoicePostingForDelTax


field namedata typedb fielddescription
tiCInvoice_IDintegerCInvoice.CInvoice_IDRecord ID
tdCInvoiceBalanceCreditTCdecimalCInvoice.CInvoiceBalanceCreditTCTC Balance Amount CR. This field displays the sum of the credit amounts of all posting lines in transaction currency.
tdCInvoiceBalanceDebitTCdecimalCInvoice.CInvoiceBalanceDebitTCTC Balance Amount DR. This field displays the sum of the debit amounts of all posting lines in transaction currency.
tcCInvoiceCITextcharacterCInvoice.CInvoiceCITextCIDescription. A brief description for the SI posting.
api annotation:This field defaults from the CInvoiceDescription.
tdCInvoiceExchangeRatedecimalCInvoice.CInvoiceExchangeRateExchange Rate. The exchange rate used by the invoice.
The BC Invoice Amount is calculated based on the exchange rate.
If user modify the TC Invoice Amount, the BC invoice amount is automatically adjusted.
tdCInvoiceOriginalCreditCCdecimalCInvoice.CInvoiceOriginalCreditCCSC Invoice Amount (CR). This field displays the credit total invoice amount in the statutory currency.
This field is calculated by the system using the TC Invoice Amount(CR) and the SC Rate.
tdCInvoiceOriginalCreditLCdecimalCInvoice.CInvoiceOriginalCreditLCBC Invoice Amount(CR). This field displays the credit total invoice amount in the base currency.
This field is calculated by the system using the TC Invoice Amount(CR) and the Exchange rate.
tdCInvoiceOriginalCreditTCdecimalCInvoice.CInvoiceOriginalCreditTCTC Invoice Amount CR. This field displays the credit total invoice amount in the transaction currency.
If you modify this field, the system automatically recalculates the exchange rate to ensure that the BC Invoice Amount remains the same.
tdCInvoiceOriginalDebitCCdecimalCInvoice.CInvoiceOriginalDebitCCSC Invoice Amount (DR). This field displays the debit total invoice amount in the statutory currency.
This field is calculated by the system using the TC Invoice Amount(CR) and the SC Rate.
tdCInvoiceOriginalDebitLCdecimalCInvoice.CInvoiceOriginalDebitLCBC Invoice Amount(DR). This field displays the debit total invoice amount in the base currency.
This field is calculated by the system using the TC Invoice Amount(DR) and the Exchange rate.
tdCInvoiceOriginalDebitTCdecimalCInvoice.CInvoiceOriginalDebitTCTC AP Amount. This field displays the debit total invoice amount in the transaction currency.
If you modify this field, the system automatically recalculates the exchange rate to ensure that the TC Invoice Amount remains the same.
ttCInvoicePostingDatedateCInvoice.CInvoicePostingDatePosting Date. This filed indicates the date on which the invoice is to be posted.
api annotation:This field defaults from the invoice creation date.
tdCInvoiceRateScaledecimalCInvoice.CInvoiceRateScaleScale Factor. This field indicates the scale factor applying to the exchange rate in use for foreign currency payments.
ttCInvoiceTaxPointDatedateCInvoice.CInvoiceTaxPointDateTax Point Date.This field indicates the date to be used in tax calculations.
api annotation:This field defaults from the posting date.
tcCInvoiceTypecharacterCInvoice.CInvoiceTypeInvoice Type. This field identifies the invoice type.
The value can be Invoice Correction and Credit Note Correction type only when the appropriate daybook types have already been defined.
tiCInvoiceVat_IDintegerCInvoiceVat.CInvoiceVat_IDRecord ID
tdCInvoiceVatBaseCreditTCdecimalCInvoice.CInvoiceVatBaseCreditTCTC Base Amount CR. This field displays the credit base amount in the transaction currency.
This field is calculated by the system using the total invoice amount (TC) and the applicable tax rate code.
tdCInvoiceVatBaseDebitTCdecimalCInvoice.CInvoiceVatBaseDebitTCTC Base Amount DR. This field displays the debit base amount in the transaction currency.
This field is calculated by the system using the total invoice amount (TC) and the applicable tax rate code.
tdCInvoiceVatCreditTCdecimalCInvoice.CInvoiceVatCreditTCTC 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.
tdCInvoiceVatDebitTCdecimalCInvoice.CInvoiceVatDebitTCTC 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.
tlCInvoiceVatIsSuspDellogicalCInvoiceVat.CInvoiceVatIsSuspDelCInvoiceVatIsSuspDel Tax line is for Suspended or Delayed tax. This is a parameter of the tax rate code in GTM.
tlCInvoiceVatIsTaxablelogicalCInvoiceVat.CInvoiceVatIsTaxableTaxable. This field indicates if the invoice is taxable.
This field defaults to true if the supplier is taxable.
tdCInvoiceVatSuspDelTaxAmtTCdecimalCInvoiceVat.CInvoiceVatSuspDelTaxAmtTCTax Amount on Delayed Account TC. This field display the tax amount in the delayed account of the invoice in Transaction currency.
tiCompany_IDintegerCInvoice.Company_IDLink to Company
tcCostCentreCodecharacterCostCentre.CostCentreCodeCost Center: A code that identifies the cost center.
tcCurrencyCodecharacterCurrency.CurrencyCodeCurrency Code
tcDelTaxDivisionCodecharacterDivision2.DivisionCodeSub-Account
tcDelTaxGLCodecharacterGL2.GLCodeA code identifying the GL account.
tcDivisionCodecharacterDivision3.DivisionCodeSub-Account
tcDomainCodecharacterDomains.DomainCodeDomain
tcFromTxzTaxZonecharacterPostingVat.FromTxzTaxZoneFrom Tax Zone.
api annotation:?
tiNormalTaxDivision_IDintegerCInvoiceVat.NormalTaxDivision_IDNormal Tax Sub-Account
tcNormalTaxDivisionCodecharacterDivision1.DivisionCodeSub-Account
tiNormalTaxGL_IDintegerCInvoiceVat.NormalTaxGL_IDNormal Tax Account
tcNormalTaxGLCodecharacterGL1.GLCodeA code identifying the GL account.
tdPostingLineCCRatedecimalPostingLine.PostingLineCCRateThe exchange rate used to convert between transaction (TC) and statutory(SC) amounts.
api annotation:Default value for this field depends on the exchangerate shared set specified for the current domain.
tdPostingLineCCScaledecimalPostingLine.PostingLineCCScaleA decimal number that must be multiplied by the exchange rate to get the real exchange rate. Its format is 9999999.9999999 and it was introduced to extend the accuracy of the exchange rate.
api annotation:The default value is 1.
tdPostingLineExchangeRatedecimalPostingLine.PostingLineExchangeRateExchange Rate
api annotation:Default value for this field depends on the exchang erate shared set specified for the current domain.
tdPostingLineRateScaledecimalPostingLine.PostingLineRateScaleScale Factor
api annotation:The default value is 1.
tdPostingVatBaseCreditCCdecimalPostingVat.PostingVatBaseCreditCCSC (Statutory Currency) Base Credit amount.
tdPostingVatBaseCreditLCdecimalPostingVat.PostingVatBaseCreditLCBC (Base/Local Currency) Base Credit amount.
tdPostingVatBaseCreditTCdecimalPostingVat.PostingVatBaseCreditTCTC (Transaction Currency) Base Credit amount.
tdPostingVatBaseDebitCCdecimalPostingVat.PostingVatBaseDebitCCSC (Statutory Currency) Base Debit amount.
tdPostingVatBaseDebitLCdecimalPostingVat.PostingVatBaseDebitLCBC (Base/Local Currency) Base Debit amount.
tdPostingVatBaseDebitTCdecimalPostingVat.PostingVatBaseDebitTCTC (Transaction Currency) Base Debit amount.
tdPostingVatExchangeRatedecimalPostingVat.PostingVatExchangeRateTC/BC Exchange Rate.
api annotation:?
tcPostingVatInOutcharacterPostingVat.PostingVatInOutIn/Out?
api annotation:Aivalable value for this field: "INPUT" represents purchases, "OUTPUT" represents sales.
tlPostingVatIsReverseChargelogicalPostingVat.PostingVatIsReverseChargeReverse Charge
tiPostingVatOwnTaxDeclaratintegerPostingVat.PostingVatOwnTaxDeclaratOwn Declaration Tax
tcPostingVatOwnTaxIDFedercharacterPostingVat.PostingVatOwnTaxIDFederOwn Federal Tax?
api annotation:?
tcPostingVatOwnTaxIDMisc1characterPostingVat.PostingVatOwnTaxIDMisc1Own Miscellaneous Tax 1? For reference and documentation purposes, enter any other tax identification numbers that are useful.
api annotation:?
tcPostingVatOwnTaxIDMisc2characterPostingVat.PostingVatOwnTaxIDMisc2Own Miscellaneous Tax 2
tcPostingVatOwnTaxIDMisc3characterPostingVat.PostingVatOwnTaxIDMisc3Own Miscellaneous Tax 3
tcPostingVatOwnTaxIDStatecharacterPostingVat.PostingVatOwnTaxIDStateOwn State Tax?
api annotation:?
tdPostingVatRateScaledecimalPostingVat.PostingVatRateScaleScale Factor (TC/BC).
api annotation:?
tdPostingVatTaxCreditCCdecimalPostingVat.PostingVatTaxCreditCCSC (Statutory Currency) Tax Credit amount.
api annotation:?
tdPostingVatTaxCreditLCdecimalPostingVat.PostingVatTaxCreditLCBC (Base/Local) Tax Credit amount.
api annotation:?
tdPostingVatTaxCreditTCdecimalPostingVat.PostingVatTaxCreditTCTC (Transaction Currency) Tax Credit amount.
api annotation:?
tdPostingVatTaxDebitCCdecimalPostingVat.PostingVatTaxDebitCCSC (Statutory Currency) Tax Debit amount.
api annotation:?
tdPostingVatTaxDebitLCdecimalPostingVat.PostingVatTaxDebitLCBC (Base Currency) Tax Debit amount.
api annotation:?
tdPostingVatTaxDebitTCdecimalPostingVat.PostingVatTaxDebitTCTC (Transaction Currency) Tax Debit amount.
api annotation:?
tcPostingVatTaxIDFedercharacterPostingVat.PostingVatTaxIDFederFederal Tax?
api annotation:?
tcPostingVatTaxIDMisc1characterPostingVat.PostingVatTaxIDMisc1Miscellaneous Tax 1. For reference and documentation
purposes, enter any other tax identification numbers that are useful.
api annotation:?
tcPostingVatTaxIDMisc2characterPostingVat.PostingVatTaxIDMisc2Miscellaneous Tax 2
tcPostingVatTaxIDMisc3characterPostingVat.PostingVatTaxIDMisc3Miscellaneous Tax 3
tcPostingVatTaxIDStatecharacterPostingVat.PostingVatTaxIDStateState Tax?
api annotation:?
tcPostingVatTaxTransTypecharacterPostingVat.PostingVatTaxTransTypeTax Transaction Type?
api annotation:Available value for this field: 29 represents "AP Payment Check (Discount at Payment)", 55 represents "AP Transactions", 22 represents "AP Invoice", 18 represents "AR Invoice", 16 represents "AR Operational Invoice", 19 represents "AR Payment (Discount at Payment)", 56 represents "AR Transactions", 45 represents "Logistic Accounting - DO Shipment", 27 represents "Logistic Accounting - PO Receipt", 43 represents "Logistic Accounting - SO Shipment", 20 represents "Purchase Order", 21 represents "Purchase Order Receipt", 25 represents "Purchase Order Return"
tcPostingVatTransTypecharacterPostingVat.PostingVatTransTypeTransaction Type?
api annotation:Available value for this field is: ACQUISITION represents "IC Acquisition", BOTH represents "Both", EXPORT represents "Export", IN represents "IN", OUT represents "OUT", IMPORT represents "Import", INLAND-PURCHASE represents "INLAND-PURCHASE", INLAND-SALES represents "INLAND-SALES", PURCHASE represents "Inland Purchase", SALES represents "Inland Sales", SUPPLY represents "IC Supply", TRIANGULARPURCHASE represents "Triangular Purchase", TRIANGULARSALES represents "Triangular Sales".
tcProjectCodecharacterProject.ProjectCodeProject
tiSuspDelTaxDivision_IDintegerCInvoiceVat.SuspDelTaxDivision_IDDelayed Tax Sub-Account
tiSuspDelTaxGL_IDintegerCInvoiceVat.SuspDelTaxGL_IDDelayed Tax Account
tcToTxzTaxZonecharacterPostingVat.ToTxzTaxZoneTo Tax Zone
api annotation:?
tcTxclTaxClscharacterPostingVat.TxclTaxClsTax Class. A tax class previously defined in Tax Class Maintenance. Tax classes group addresses taxed at specific rates or that are tax-exempt and help determine the default tax environment (set of tax types) for related transactions.
api annotation:The value of Tax Class defaults to the header of transactions created for this address
tcTxenvTaxEnvcharacterPostingVat.TxenvTaxEnvTax Environment. A code (maximum 16 characters) that
identifies a set of tax types for a tax zone/tax class combination. On transactions, this code identifies the transaction or line-item tax environment.
api annotation:?
tcTxtyTaxTypecharacterPostingVat.TxtyTaxTypeTax Type
tcTxuTaxUsagecharacterPostingVat.TxuTaxUsageTax Usage. A tax usage code previously defined in Tax Usage Maintenance. Tax usage codes identify the normal use of items sold to this address. Common tax usages are retail, manufacturing, and industrialization.
api annotation:The value of Tax Usage defaults to the header of transactions created for this address.
tcVatCodecharacterVat.VatCodeTax Code
tcVatInOutcharacterVat.VatInOutTax In/Out


Internal usage


QadFinancials
method BCInvoice.UpdateCInvoiceVatDelay