project QadFinancials > class BCInvoice > business logic query CInvoiceWHTByCInvoice

Description

lists all the WHT records for a certain supplier invoice records


Parameters


iiCompanyIdintegerCompany id
iiCInvoiceIdintegerCInvoice ID
ilUpdateTaxlogicalUpdate Tax


query condition


  each CInvoiceWHT where
CInvoiceWHT.CInvoice_ID = iiCInvoiceId

      first CInvoice (inner-join) where
CInvoice.Company_Id = iiCompanyId AND
CInvoice.CInvoice_ID = CInvoiceWHT.CInvoice_ID AND

          first Company (inner-join) where
Company.Company_Id = iiCompanyId AND
Company.Company_ID = CInvoice.Company_ID AND

              each CompanyProperty (inner-join) where
CompanyProperty.Company_Id = iiCompanyId AND
CompanyProperty.Company_ID = Company.Company_ID AND

                  first Currency1 (inner-join) where
Currency1.Currency_ID = CompanyProperty.Currency_ID AND

              first Domains (inner-join) where
Domains.Domain_ID = Company.Domain_ID AND

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

          first Creditor (inner-join) where
Creditor.SharedSet_Id = vi_CREDITOR_sharedset(iiCompanyId) AND
Creditor.Creditor_ID = CInvoice.Creditor_ID AND

              first SharedSet (inner-join) where
SharedSet.SharedSet_ID = Creditor.SharedSet_ID AND

              first WHTCertFormat (conditional-join) where
WHTCertFormat.WHTCertFormat_ID = Creditor.WHTCertFormat_ID AND

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

          first Journal (inner-join) where
Journal.SharedSet_Id = vi_JOURNAL_sharedset(iiCompanyId) AND
Journal.Journal_ID = CInvoice.Journal_ID AND

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

      first Division (conditional-join) where
Division.SharedSet_Id = vi_DIVISION_sharedset(iiCompanyId) AND
Division.Division_ID = CInvoiceWHT.Division_ID AND

      first GL (conditional-join) where
GL.SharedSet_Id = vi_GL_sharedset(iiCompanyId) AND
GL.GL_ID = CInvoiceWHT.GL_ID AND

      first Vat (conditional-join) where
Vat.Vat_ID = CInvoiceWHT.Vat_ID AND

          first tx2_mstr (outer-join) where
tx2_mstr.tx2_tax_code = Vat.VatCode AND
tx2_mstr.tx2_update_tax = ilUpdateTax


query resultset tqCInvoiceWHTByCInvoice


field namedata typedb fielddescription
tiCInvoice_IDintegerCInvoiceWHT.CInvoice_IDLink to CInvoice
tdCInvoiceCCRatedecimalCInvoice.CInvoiceCCRateSC Rate. The statutory exchange rate used by the invoice.
The SC Invoice Amount is calculated based on the SC rate.
tdCInvoiceCCScaledecimalCInvoice.CInvoiceCCScaleScale Factor. This field indicates the scale factor applying to the SC rate in use for foreign currency payments.
tiCInvoiceCurrency_IDintegerCInvoice.CInvoiceCurrency_IDCurrency Code
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.
tlCInvoiceIsWHTlogicalCInvoice.CInvoiceIsWHTWithholding Tax
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.
tiCInvoicePostingPeriodintegerCInvoice.CInvoicePostingPeriodGL Period.This field indicates the period when the invoice to be posted.
If this field is modified, the posting and tax dates are changed correspondingly.
api annotation:This field defaults to the period associated with the posting date.
tiCInvoicePostingYearintegerCInvoice.CInvoicePostingYearYear.This field indicates the accounting year for the invoice.
If you modify these fields, the posting and tax dates are changed correspondingly.
api annotation:This field defaults to the accounting year associated with the posting date.
tiCInvoicePostingYearPeriodintegerCInvoice.CInvoicePostingYearPeriodYear/Period. This field indicates the accounting year and period for the invoice.
If you modify these fields, the posting and tax dates are changed correspondingly.
api annotation:This field defaults to the accounting year and period associated with the posting date.
tdCInvoiceRateScaledecimalCInvoice.CInvoiceRateScaleScale Factor. This field indicates the scale factor applying to the exchange rate in use for foreign currency payments.
tcCInvoiceReferencecharacterCInvoice.CInvoiceReferenceReference. An alphanumeric reference to help identify the invoice in the system.
This reference is typically the ID number of the invoice received from the supplier.
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.
tdCInvoiceVatBaseCreditCCdecimalCInvoice.CInvoiceVatBaseCreditCCSC Base Amount CR. This field displays the credit base amount in the statutory currency.
This field is calculated by the system using the TC Base Amount CR and the SC rate.
tdCInvoiceVatBaseCreditLCdecimalCInvoice.CInvoiceVatBaseCreditLCBC Base Amount CR. This field displays the credit base amount in the base currency.
This field is calculated by the system using the TC Base Amount CR and the Exchange rate.
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.
tdCInvoiceVatBaseDebitCCdecimalCInvoice.CInvoiceVatBaseDebitCCSC Base Amount DR. This field displays the debit base amount in the statutory currency.
This field is calculated by the system using the TC Base Amount DR and the SC rate.
tdCInvoiceVatBaseDebitLCdecimalCInvoice.CInvoiceVatBaseDebitLCBC 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.
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.
tdCInvoiceVatCreditCCdecimalCInvoice.CInvoiceVatCreditCCSC Tax Amount CR. This field displays the credit tax amount in the statutory currency.
This field is calculated by the system using the TC Tax Amount CR and the SC rate.
tdCInvoiceVatCreditLCdecimalCInvoice.CInvoiceVatCreditLCBC Tax Amount CR. This field displays the debit tax amount in the base currency.
This field is calculated by the system using the TC Tax Amount CR and the Exchange rate.
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.
tdCInvoiceVatDebitCCdecimalCInvoice.CInvoiceVatDebitCCBC Tax Amount DR. This field displays the debit tax amount in the statutory currency.
This field is calculated by the system using the TC Tax Amount DR and the SC rate.
tdCInvoiceVatDebitLCdecimalCInvoice.CInvoiceVatDebitLCBC Tax Amount DR. This field displays the debit tax amount in the base currency.
This field is calculated by the system using the TC Tax Amount DR and the Exchange rate.
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.
tiCInvoiceVoucherintegerCInvoice.CInvoiceVoucherVoucher. This field displays the numeric identifier assigned to the posting.
When the daybook of the journal entry is changed (after transfer), the voucher is cleared.
Voucher must be unique in one GL period.
When the user input is zero, the system automatically assign a value not used yet for this field.
tiCInvoiceWHT_IDintegerCInvoiceWHT.CInvoiceWHT_IDRecord ID
tdCInvoiceWHTAmtCreditCCdecimalCInvoiceWHT.CInvoiceWHTAmtCreditCCSC WHT Amount (CR)
tdCInvoiceWHTAmtCreditLCdecimalCInvoiceWHT.CInvoiceWHTAmtCreditLCBC WHT Amount (CR)
tdCInvoiceWHTAmtCreditTCdecimalCInvoiceWHT.CInvoiceWHTAmtCreditTCTC WHT Amount (CR)
tdCInvoiceWHTAmtDebitCCdecimalCInvoiceWHT.CInvoiceWHTAmtDebitCCSC WHT Amount (DR)
tdCInvoiceWHTAmtDebitLCdecimalCInvoiceWHT.CInvoiceWHTAmtDebitLCBC WHT Amount (DR)
tdCInvoiceWHTAmtDebitTCdecimalCInvoiceWHT.CInvoiceWHTAmtDebitTCTC WHT Amount (DR)
tdCInvoiceWHTBaseAmtCreditCCdecimalCInvoice.CInvoiceWHTBaseAmtCreditCCSC WHT Base Amount (CR)
tdCInvoiceWHTBaseAmtCreditLCdecimalCInvoice.CInvoiceWHTBaseAmtCreditLCBC WHT Base Amount (CR)
tdCInvoiceWHTBaseAmtCreditTCdecimalCInvoice.CInvoiceWHTBaseAmtCreditTCTC WHT Base Amount (CR)
tdCInvoiceWHTBaseAmtDebitCCdecimalCInvoice.CInvoiceWHTBaseAmtDebitCCSC WHT Base Amount (DR)
tdCInvoiceWHTBaseAmtDebitLCdecimalCInvoice.CInvoiceWHTBaseAmtDebitLCBC WHT Base Amount (DR)
tdCInvoiceWHTBaseAmtDebitTCdecimalCInvoice.CInvoiceWHTBaseAmtDebitTCTC WHT Base Amount (DR)
tdCInvoiceWHTExpenseCreditTCdecimalCInvoiceWHT.CInvoiceWHTExpenseCreditTCTC Expense (CR)
tdCInvoiceWHTExpenseDebitTCdecimalCInvoiceWHT.CInvoiceWHTExpenseDebitTCTC Expense (DR)
tdCInvoiceWHTFeeCreditTCdecimalCInvoiceWHT.CInvoiceWHTFeeCreditTCTC Fee (CR)
tdCInvoiceWHTFeeDebitTCdecimalCInvoiceWHT.CInvoiceWHTFeeDebitTCTC Fee (DR)
tdCInvoiceWHTTaxFeeCreditCCdecimalCInvoiceWHT.CInvoiceWHTTaxFeeCreditCCSC Taxable Fee (CR)
tdCInvoiceWHTTaxFeeCreditLCdecimalCInvoiceWHT.CInvoiceWHTTaxFeeCreditLCBC Taxable Fee (CR)
tdCInvoiceWHTTaxFeeCreditTCdecimalCInvoiceWHT.CInvoiceWHTTaxFeeCreditTCTC Taxable Fee (CR)
tdCInvoiceWHTTaxFeeDebitCCdecimalCInvoiceWHT.CInvoiceWHTTaxFeeDebitCCSC Taxable Fee (DR)
tdCInvoiceWHTTaxFeeDebitLCdecimalCInvoiceWHT.CInvoiceWHTTaxFeeDebitLCBC Taxable Fee (DR)
tdCInvoiceWHTTaxFeeDebitTCdecimalCInvoiceWHT.CInvoiceWHTTaxFeeDebitTCTC Taxable Fee (DR)
tdCInvoiceWHTTotAmtCreditCCdecimalCInvoice.CInvoiceWHTTotAmtCreditCCSC WHT Total Amount (CR)
tdCInvoiceWHTTotAmtCreditLCdecimalCInvoice.CInvoiceWHTTotAmtCreditLCBC WHT Total Amount (CR)
tdCInvoiceWHTTotAmtCreditTCdecimalCInvoice.CInvoiceWHTTotAmtCreditTCTC WHT Total Amount (CR)
tdCInvoiceWHTTotAmtDebitCCdecimalCInvoice.CInvoiceWHTTotAmtDebitCCSC WHT Total Amount (DR)
tdCInvoiceWHTTotAmtDebitLCdecimalCInvoice.CInvoiceWHTTotAmtDebitLCBC WHT Total Amount (DR)
tdCInvoiceWHTTotAmtDebitTCdecimalCInvoice.CInvoiceWHTTotAmtDebitTCTC WHT Total Amount (DR)
tiCompany_IDintegerCompany.Company_IDRecord ID
tcCompanyCodecharacterCompany.CompanyCodeEntity Code
tcCostCentreCodecharacterCostCentre.CostCentreCodeCost Center: A code that identifies the cost center.
tiCreditor_IDintegerCInvoice.Creditor_IDLink to Creditor
tcCreditorCodecharacterCreditor.CreditorCodeSupplier Code
tcCurrencyCodecharacterCurrency2.CurrencyCodeCurrency Code
tiDivision_IDintegerCInvoiceWHT.Division_IDLink to Division
tcDivisionCodecharacterDivision.DivisionCodeSub-Account
tcDomainCodecharacterDomains.DomainCodeDomain
tiGL_IDintegerCInvoiceWHT.GL_IDLink to GL
tcGLCodecharacterGL.GLCodeA code identifying the GL account.
tiJournal_IDintegerCInvoice.Journal_IDDaybook Code
tcJournalCodecharacterJournal.JournalCodeA daybook code (maximum eight characters).
tiLocalCurrencyCurrency_IDintegerCompanyProperty.Currency_IDBase Currency
tcLocalCurrencyCurrencyCodecharacterCurrency1.CurrencyCodeCurrency Code
tcProjectCodecharacterProject.ProjectCodeProject
tiSharedSet_IDintegerCreditor.SharedSet_IDLink to SharedSet
tcSharedSetCodecharacterSharedSet.SharedSetCodeShared Set Code
tdtx2_tax_pctdecimaltx2_mstr.tx2_tax_pctTax Rate
tctx2_tax_typecharactertx2_mstr.tx2_tax_typeTax Type
tltx2_update_taxlogicaltx2_mstr.tx2_update_taxUpdate Tax Allowed
tiVat_IDintegerCInvoiceWHT.Vat_IDLink to Vat
tcVatCodecharacterVat.VatCodeTax Code
tiWHTCertFormat_IDintegerCreditor.WHTCertFormat_IDLink to Withholding Tax Certificate Format
tcWHTCertFormatCodecharacterWHTCertFormat.WHTCertFormatCodeFormat Code


Internal usage


QadFinancials
method BBankEntry.AdditionalUpdatesInvCIMovements
method BCDocument.AdditionalUpdatesPostingXRefWHT