project QadFinancials > class BDInvoice > business logic query DInvoicePostingForSuspTax

Description

retrieve the posting tax records with suspended taxes


Parameters


iiCompanyIdintegerCompany id
iiDInvoiceIdinteger
ilDInvoiceVatIsSuspDellogical


query condition


  each DInvoice where
DInvoice.Company_Id = iiCompanyId AND
DInvoice.DInvoice_ID = iiDInvoiceId

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

      first Currency (inner-join) where
Currency.Currency_ID = DInvoice.DInvoiceCurrency_ID AND

      each DInvoiceVat (inner-join) where
DInvoiceVat.DInvoice_ID = DInvoice.DInvoice_ID AND
DInvoiceVat.DInvoiceVatIsSuspDel = ilDInvoiceVatIsSuspDel

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

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

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

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

          first PostingVat (conditional-join) where
PostingVat.PostingVat_ID = DInvoiceVat.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 Division3 (conditional-join) where
Division3.SharedSet_Id = vi_DIVISION_sharedset(iiCompanyId) AND
Division3.Division_ID = DInvoice.Division_ID AND

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


query resultset tqDInvoicePostingForSuspTax


field namedata typedb fielddescription
tiCompany_IDintegerDInvoice.Company_IDLink to Company
tcCostCentreCodecharacterCostCentre.CostCentreCodeCost Center: A code that identifies the cost center.
tcCurrencyCodecharacterCurrency.CurrencyCodeCurrency Code
tiDInvoice_IDintegerDInvoice.DInvoice_IDRecord ID
tdDInvoiceBalanceCreditTCdecimalDInvoice.DInvoiceBalanceCreditTCTC Balance Amount CR. This field displays the sum of the credit amounts of all posting lines in transaction currency.
tdDInvoiceBalanceDebitTCdecimalDInvoice.DInvoiceBalanceDebitTCTC Balance Amount DR. This field displays the sum of the debit amounts of all posting lines in transaction currency.
tcDInvoiceDITextcharacterDInvoice.DInvoiceDITextCIDescription. A brief description for the SI posting.
api annotation:This field defaults from the DInvoiceDescription.
tdDInvoiceExchangeRatedecimalDInvoice.DInvoiceExchangeRateExchange Rate. The accounting 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.
tdDInvoiceOriginalCreditCCdecimalDInvoice.DInvoiceOriginalCreditCCSC 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.
tdDInvoiceOriginalCreditLCdecimalDInvoice.DInvoiceOriginalCreditLCBC 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.
tdDInvoiceOriginalCreditTCdecimalDInvoice.DInvoiceOriginalCreditTCTC 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.
tdDInvoiceOriginalDebitCCdecimalDInvoice.DInvoiceOriginalDebitCCSC 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.
tdDInvoiceOriginalDebitLCdecimalDInvoice.DInvoiceOriginalDebitLCBC 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.
tdDInvoiceOriginalDebitTCdecimalDInvoice.DInvoiceOriginalDebitTCTC 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.
ttDInvoicePostingDatedateDInvoice.DInvoicePostingDatePosting Date. This field displays the date the sales-related invoice was generated by Invoice Post and Print.
This field is updated when the invoice is validated and saved.
api annotation:This field defaults from the invoice creation date.
tdDInvoiceRateScaledecimalDInvoice.DInvoiceRateScaleScale Factor.This field indicates the scale factor applying to the exchange rate in use for foreign currency payments.
The exchange rate is multiplied by the scale factor to determine the actual exchange rate.
api annotation:The value for the scale factor defaults from the exchange rate definition, but it can be modified.
ttDInvoiceTaxPointDatedateDInvoice.DInvoiceTaxPointDateTax Point Date. The date to be used in tax calculations. For sales-related invoices, this field displays the tax calculation date on the associated order.
api annotation:This field defaults to DInvoicePostingDate.
tcDInvoiceTypecharacterDInvoice.DInvoiceTypeInvoice Type. This field displays the invoice type.
Invoice Correction and Credit Note Correction display as choices only when the appropriate daybook types have already been defined.
api annotation:PartialUpdate = yes - defaults to Invoice
tiDInvoiceVat_IDintegerDInvoiceVat.DInvoiceVat_IDRecord ID
tdDInvoiceVatBaseCreditTCdecimalDInvoice.DInvoiceVatBaseCreditTCTC 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.
tdDInvoiceVatBaseDebitLCdecimalDInvoice.DInvoiceVatBaseDebitLCBC Base Amount DR. This field displays the debit base amount in the base currency.
This field is calculated by the system using the TC Base Amount DR and the Exchange rate.
tdDInvoiceVatBaseDebitTCdecimalDInvoice.DInvoiceVatBaseDebitTCTC 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.
tdDInvoiceVatCreditTCdecimalDInvoice.DInvoiceVatCreditTCTC 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.
tdDInvoiceVatDebitTCdecimalDInvoice.DInvoiceVatDebitTCTC 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.
tlDInvoiceVatIsSuspDellogicalDInvoiceVat.DInvoiceVatIsSuspDelCInvoiceVatIsSuspDel Tax line is for Suspended or Delayed tax. This is a parameter of the tax rate code in GTM.
api annotation:PartialUpdate = yes - defaults to false
tlDInvoiceVatIsTaxablelogicalDInvoiceVat.DInvoiceVatIsTaxableTaxable. This field indicates if the invoice is taxable.
api annotation:This field defaults to true if the customer is taxable.
tdDInvoiceVatSuspDelTaxAmtTCdecimalDInvoiceVat.DInvoiceVatSuspDelTaxAmtTCTax Amount on Delayed Account TC. This field display the tax amount in the delayed account of the invoice in Transaction currency.
tcDivisionCodecharacterDivision3.DivisionCodeSub-Account
tcDomainCodecharacterDomains.DomainCodeDomain
tcFromTxzTaxZonecharacterPostingVat.FromTxzTaxZoneFrom Tax Zone.
api annotation:?
tcNormalTaxDivisionCodecharacterDivision1.DivisionCodeSub-Account
tcNormalTaxGLCodecharacterGL1.GLCodeA code identifying the GL account.
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.
tiPostingVat_IDintegerPostingVat.PostingVat_IDRecord ID
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
tlPostingVatIsSuspDellogicalPostingVat.PostingVatIsSuspDelSuspended/Delayed Tax
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:?
ttPostingVatTaxPointDatedatePostingVat.PostingVatTaxPointDateThe date when this posting is taken into account in the Tax sub-adminstration.
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
tcSuspTaxDivisionCodecharacterDivision2.DivisionCodeSub-Account
tcSuspTaxGLCodecharacterGL2.GLCodeA code identifying the GL 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 BDInvoice.MoveSuspendedTax