project QadFinancials > class BWithholdingTax > business logic query WHTPrim

Description

this query can be used by other components that have the ID of a Withholding tax record but that needs to know the logical identification of the withholding tax record or vice-versa


Parameters


iiCompanyIdintegerCompany id
iiCInvoiceWHTIdintegerCInvoiceWHT_ID
iiBankStateAllocIdintegerBankStateAlloc_ID
iiCDocumentInvoiceXRefIdintegerCDocumentInvoiceXRef_ID
iiWHTIdintegerWHT_ID
icWHTChargeTypecharacterWHTChargeType - see preprocessors
iiOIAdjustLnIDintegerOI Adjust Line ID
iiCACInvoiceIDintegerReference to the supplier-adjustment


query condition


  each WHT where
WHT.CInvoiceWHT_ID = iiCInvoiceWHTId AND
WHT.BankStateAlloc_ID = iiBankStateAllocId AND
WHT.CDocumentInvoiceXref_ID = iiCDocumentInvoiceXRefId AND
WHT.Company_ID = iiCompanyId AND
WHT.WHT_ID = iiWHTId AND
WHT.WHTChargeType = icWHTChargeType AND
WHT.OIAdjustLn_ID = iiOIAdjustLnID AND
WHT.CACInvoice_ID = iiCACInvoiceID


query resultset tqWHTPrim


field namedata typedb fielddescription
tiBankStateAlloc_IDintegerWHT.BankStateAlloc_IDLink to BankStateAlloc
tiCACInvoice_IDintegerWHT.CACInvoice_IDLink to CA-CInvoice
tiCDocumentInvoiceXref_IDintegerWHT.CDocumentInvoiceXref_IDLink to CDocumentInvoiceXref
tiCInvoiceWHT_IDintegerWHT.CInvoiceWHT_IDLink to CInvoiceWHT
tiCompany_IDintegerWHT.Company_IDLink to Company
tiOIAdjustLn_IDintegerWHT.OIAdjustLn_IDLink to OIAdjustLn
tiWHT_IDintegerWHT.WHT_IDRecord ID
tcWHTChargeTypecharacterWHT.WHTChargeTypeCharge Type
ti_sequenceintegercalculatedprimary index
tc_rowidcharactercalculated = rowid(WHT)


Internal usage


QadFinancials
method BWithholdingTax.CreateAndOrUpdateWHT