project QadFinancials > class BCreditorReport > business logic query WHTForPayments

Description

Get all withholding tax amounts for existing payments


Parameters


iiCompanyIdintegerCompany id
iiYearinteger
iiPeriodinteger
icCreditorFromcharacter
icCredtiorTillcharacter
icJournalFromcharacter
icJournalTillcharacter
iiVoucherFrominteger
iiVoucherTillinteger
icCDocumentStatusListcharactercontains a collection of document statusses
icDomaincodecharacterdomaincode
ilisServicelogicaltxud_servcie - identifies if it is about a service invoice


query condition


  each WHT where
WHT.Company_Id = iiCompanyId AND
WHT.WHTPeriodYear = iiYear AND
WHT.WHTPeriodPeriod = iiPeriod AND
WHT.WHTStatus can-do icCDocumentStatusList

      first CInvoice (inner-join) where
CInvoice.Company_Id = iiCompanyId AND
CInvoice.CInvoice_ID = WHT.CInvoice_ID AND
CInvoice.CInvoiceVoucher >= iiVoucherFrom AND
CInvoice.CInvoiceVoucher <= iiVoucherTill

          first Journal (inner-join) where
Journal.SharedSet_Id = vi_JOURNAL_sharedset(iiCompanyId) AND
Journal.Journal_ID = CInvoice.Journal_ID AND
Journal.JournalCode >= icJournalFrom AND
Journal.JournalCode <= icJournalTill

      first Creditor (inner-join) where
Creditor.SharedSet_Id = vi_CREDITOR_sharedset(iiCompanyId) AND
Creditor.Creditor_ID = WHT.Creditor_ID AND
Creditor.CreditorCode >= icCreditorFrom AND
Creditor.CreditorCode <= icCredtiorTill

          first BusinessRelation (inner-join) where
BusinessRelation.BusinessRelation_ID = Creditor.BusinessRelation_ID AND

              each Address (inner-join) where
Address.BusinessRelation_ID = BusinessRelation.BusinessRelation_ID AND

                  first AddressType (inner-join) where
AddressType.AddressType_ID = Address.AddressType_ID AND
AddressType.AddressTypeCode = 'HEADOFFICE'

                  first Country (inner-join) where
Country.Country_ID = Address.Country_ID AND

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

          first tx2_mstr (outer-join) where
tx2_mstr.tx2_tax_code = Vat.VatCode AND
tx2_mstr.tx2_domain = icDomaincode

              first txud_det (conditional-join) where
txud_det.txud_domain = tx2_mstr.tx2_domain AND
txud_det.txud_tax_usage = tx2_mstr.tx2_tax_usage AND
txud_det.txud_service = ilisService


query resultset tqWHTForPayments


field namedata typedb fielddescription
tcAddressCitycharacterAddress.AddressCityCity. The city for this address. This field can be used to decide the tax zone of the address.
tcAddressCountycharacterAddress.AddressCountyObsolete field
tcAddressStatecharacterAddress.AddressStateObsolete field
tcAddressStreet1characterAddress.AddressStreet1Address: Line one of address details.
This field can be blank.
tcAddressStreet2characterAddress.AddressStreet2Address.Line two of address details.
This field can be blank.
tcAddressStreet3characterAddress.AddressStreet3Address.Line three of address details.
This field can be blank.
tcAddressZipcharacterAddress.AddressZipZip. The postal code or US zip code associated with this address.
This field is used to decide the tax zone for the address.
This field can be blank.
tcBusinessRelationName1characterBusinessRelation.BusinessRelationName1Name: The full name of the business relation.
This field sets the default name for linked addresses such as customers and suppliers.
api annotation:PartialUpdate = yes - defaults to the BusinessRelationCode.
tiCInvoice_IDintegerCInvoice.CInvoice_IDRecord ID
tiCInvoiceCurrency_IDintegerCInvoice.CInvoiceCurrency_IDCurrency Code
ttCInvoiceDatedateCInvoice.CInvoiceDateInvoice Date. This field indicates the invoice creation date.
The system uses this field with the credit terms to calculate due date and discount date.
api annotation:This field defaults from the system date.
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.
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.
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.
tcCountryCodecharacterCountry.CountryCodeCountry Code
tcCreditorBirthCitycharacterCreditor.CreditorBirthCityBirth City
ttCreditorBirthDatedateCreditor.CreditorBirthDateBirth Date
tcCreditorCodecharacterCreditor.CreditorCodeSupplier Code
tcCreditorForeignFiscalCodecharacterCreditor.CreditorForeignFiscalCodeForeign Fiscal Code
tcCreditorTaxIDFiscalCodecharacterCreditor.CreditorTaxIDFiscalCodeTax ID / Fiscal Code
tiJournal_IDintegerJournal.Journal_IDRecord ID
tcJournalCodecharacterJournal.JournalCodeA daybook code (maximum eight characters).
tiVat_IDintegerVat.Vat_IDRecord ID
tcVatCodecharacterVat.VatCodeTax Code
tcVatDescriptioncharacterVat.VatDescriptionDescription
tiWHT_IDintegerWHT.WHT_IDRecord ID
tdWHTAmtCreditCCdecimalWHT.WHTAmtCreditCCWHT Amount Cr SC
tdWHTAmtCreditLCdecimalWHT.WHTAmtCreditLCWHT Amount Cr BC
tdWHTAmtCreditTCdecimalWHT.WHTAmtCreditTCWHT Amount Cr TC
tdWHTAmtDebitCCdecimalWHT.WHTAmtDebitCCWHT Amount Dr SC
tdWHTAmtDebitLCdecimalWHT.WHTAmtDebitLCWHT Amount Dr LC
tdWHTAmtDebitTCdecimalWHT.WHTAmtDebitTCWHT Amount Dr TC
tdWHTChargeAmtCreditCCdecimalWHT.WHTChargeAmtCreditCCCharge Amount Cr SC
tdWHTChargeAmtCreditLCdecimalWHT.WHTChargeAmtCreditLCCharge Amount Cr BC
tdWHTChargeAmtCreditTCdecimalWHT.WHTChargeAmtCreditTCCharge Amount Cr TC
tdWHTChargeAmtDebitCCdecimalWHT.WHTChargeAmtDebitCCCharge Amount Dr SC
tdWHTChargeAmtDebitLCdecimalWHT.WHTChargeAmtDebitLCCharge Amount Dr LC
tdWHTChargeAmtDebitTCdecimalWHT.WHTChargeAmtDebitTCCharge Amount Dr TC
tcWHTChargeTypecharacterWHT.WHTChargeTypeCharge Type
tdWHTPaidAmtCreditCCdecimalWHT.WHTPaidAmtCreditCCPaid Amount Cr SC
tdWHTPaidAmtCreditLCdecimalWHT.WHTPaidAmtCreditLCPaid Amount Cr BC
tdWHTPaidAmtCreditTCdecimalWHT.WHTPaidAmtCreditTCPaid Amount Cr TC
tdWHTPaidAmtDebitCCdecimalWHT.WHTPaidAmtDebitCCPaid Amount Dr SC
tdWHTPaidAmtDebitLCdecimalWHT.WHTPaidAmtDebitLCPaid Amount Dr LC
tdWHTPaidAmtDebitTCdecimalWHT.WHTPaidAmtDebitTCPaid Amount Dr TC
ttWHTPaymentDatedateWHT.WHTPaymentDatePayment Date
tcWHTPaymentReferencecharacterWHT.WHTPaymentReferencePayment Reference
tdWHTPercentagedecimalWHT.WHTPercentageWHT Tax Rate Perc
tdWHTRetainedAmtCreditCCdecimalWHT.WHTRetainedAmtCreditCCRetained Amount Cr SC
tdWHTRetainedAmtCreditLCdecimalWHT.WHTRetainedAmtCreditLCRetained Amount Cr BC
tdWHTRetainedAmtCreditTCdecimalWHT.WHTRetainedAmtCreditTCRetained Amount Cr TC
tdWHTRetainedAmtDebitCCdecimalWHT.WHTRetainedAmtDebitCCRetained Amount Dr SC
tdWHTRetainedAmtDebitLCdecimalWHT.WHTRetainedAmtDebitLCRetained Amount Dr LC
tdWHTRetainedAmtDebitTCdecimalWHT.WHTRetainedAmtDebitTCRetained Amount Dr TC
tdWHTTaxableFeesCreditCCdecimalWHT.WHTTaxableFeesCreditCCTaxable Fee Amount Cr SC
tdWHTTaxableFeesCreditLCdecimalWHT.WHTTaxableFeesCreditLCTaxable Fee Amount Cr BC
tdWHTTaxableFeesCreditTCdecimalWHT.WHTTaxableFeesCreditTCTaxable Fee Amount Cr TC
tdWHTTaxableFeesDebitCCdecimalWHT.WHTTaxableFeesDebitCCTaxable Fee Amount Dr SC
tdWHTTaxableFeesDebitLCdecimalWHT.WHTTaxableFeesDebitLCTaxable Fee Amount Dr LC
tdWHTTaxableFeesDebitTCdecimalWHT.WHTTaxableFeesDebitTCTaxable Fee Amount Dr TC
tdWHTTotAmtCreditCCdecimalWHT.WHTTotAmtCreditCCTotal Amount Cr SC
tdWHTTotAmtCreditLCdecimalWHT.WHTTotAmtCreditLCTotal Amount Cr BC
tdWHTTotAmtCreditTCdecimalWHT.WHTTotAmtCreditTCTotal Amount Cr TC
tdWHTTotAmtDebitCCdecimalWHT.WHTTotAmtDebitCCTotal Amount Dr SC
tdWHTTotAmtDebitLCdecimalWHT.WHTTotAmtDebitLCTotal Amount Dr LC
tdWHTTotAmtDebitTCdecimalWHT.WHTTotAmtDebitTCTotal Amount Dr TC
tdWHTVATAmtCreditCCdecimalWHT.WHTVATAmtCreditCCTax Amount Cr SC
tdWHTVATAmtCreditLCdecimalWHT.WHTVATAmtCreditLCTax Amount Cr BC
tdWHTVATAmtCreditTCdecimalWHT.WHTVATAmtCreditTCTax Amount Cr TC
tdWHTVATAmtDebitCCdecimalWHT.WHTVATAmtDebitCCTax Amount Dr SC
tdWHTVATAmtDebitLCdecimalWHT.WHTVATAmtDebitLCTax Amount Dr LC
tdWHTVATAmtDebitTCdecimalWHT.WHTVATAmtDebitTCTax Amount Dr TC


Internal usage


QadFinancials
method BCreditorReport.CreditorWithholdingTax