project QadFinancials > class BCreditorReport > business logic query GetAmountByPayment

Description

Get Discount and Allocated Amout by payment


Parameters


iiCompanyIdintegerCompany id
iiCDocumentIDinteger


query condition


  each CDocument where
CDocument.CDocument_ID = iiCDocumentID AND
CDocument.Company_ID > 0

      each CDocumentInvoiceXref (inner-join) where
CDocumentInvoiceXref.CDocument_ID = CDocument.CDocument_ID AND

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


query resultset tqGetAmountByPayment


field namedata typedb fielddescription
tiCDocumentInvoiceXref_IDintegerCDocumentInvoiceXref.CDocumentInvoiceXref_IDRecord ID
tdCDocumentInvoiceXrefAlloTCdecimalCDocumentInvoiceXref.CDocumentInvoiceXrefAlloTCTC Allocated Amount. This field indicates the invocie amount already Allocated in transaction currency.
tdCDocumentInvoiceXrefDiscTCdecimalCDocumentInvoiceXref.CDocumentInvoiceXrefDiscTCTC Discount Amount. This field indicates the discount amount of the invoice already allocated by transaction currency.
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.


Internal usage


QadFinancials
method BCreditorReport.CreditorWHTCertificate