project QadFinancials > class BWithholdingTax > business logic query WHTByCInvoice

Description

Query that returns some WHT-fields for a certain invoice.

Do not add joins onto this query.
Try to keep this result-set as small as possible to avoid performance-overhead


Parameters


iiCompanyIdintegerCompany id
iiCInvoiceIdintegerCInvoice ID
icWHTStatusDiffersFromcharacterStatus that it can't be
icWHTStatuscharacterWHTStatus you want to filter on


query condition


  each WHT where
WHT.Company_Id = iiCompanyId AND
WHT.CInvoice_ID = iiCInvoiceId AND
WHT.WHTStatus <> icWHTStatusDiffersFrom AND
WHT.WHTStatus = icWHTStatus


query resultset tqWHTByCInvoice


field namedata typedb fielddescription
tiWHT_IDintegerWHT.WHT_IDRecord ID
tiCInvoice_IDintegerWHT.CInvoice_IDLink to CInvoice
tiCInvoiceWHT_IDintegerWHT.CInvoiceWHT_IDLink to CInvoiceWHT
tiCompany_IDintegerWHT.Company_IDLink to Company
tcWHTStatuscharacterWHT.WHTStatusWHT Status
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


Internal usage


QadFinancials
method BBankEntry.CalculateBankStateAlloc
method BCDocument.ValidateComponentPostWHT
method BCInvoice.AdditionalUpdatesAllCreateCAVal
method BCInvoice.DefaultWHTDataBasedOnCInvoice