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
| iiCompanyId | integer | Company id |
| iiCInvoiceId | integer | CInvoice ID |
| icWHTStatusDiffersFrom | character | Status that it can't be |
| icWHTStatus | character | WHTStatus 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 name | data type | db field | description |
| tiWHT_ID | integer | WHT.WHT_ID | Record ID |
| tiCInvoice_ID | integer | WHT.CInvoice_ID | Link to CInvoice |
| tiCInvoiceWHT_ID | integer | WHT.CInvoiceWHT_ID | Link to CInvoiceWHT |
| tiCompany_ID | integer | WHT.Company_ID | Link to Company |
| tcWHTStatus | character | WHT.WHTStatus | WHT Status |
| tdWHTAmtCreditCC | decimal | WHT.WHTAmtCreditCC | WHT Amount Cr SC |
| tdWHTAmtCreditLC | decimal | WHT.WHTAmtCreditLC | WHT Amount Cr BC |
| tdWHTAmtCreditTC | decimal | WHT.WHTAmtCreditTC | WHT Amount Cr TC |
| tdWHTAmtDebitCC | decimal | WHT.WHTAmtDebitCC | WHT Amount Dr SC |
| tdWHTAmtDebitLC | decimal | WHT.WHTAmtDebitLC | WHT Amount Dr LC |
| tdWHTAmtDebitTC | decimal | WHT.WHTAmtDebitTC | WHT Amount Dr TC |
Internal usage
QadFinancials