project QadFinancials > class BDDocument > business logic query DDocumentInvoiceXrefPostByStatus
Description
Retrive all the allocation of the Invoice by payment status and Payment type
Parameters
icDocumentStatus | character | |
icDocumentType | character | |
iiDInvoiceId | integer | |
iiCompanyId | integer | Company id |
iiDDocumentId | integer | |
icGLTypeCode | character | |
query condition
each DDocumentInvoiceXref where
DDocumentInvoiceXref.DInvoice_ID = iiDInvoiceId AND
DDocumentInvoiceXref.DDocument_ID = iiDDocumentId
first DDocument (inner-join) where
DDocument.Company_Id = iiCompanyId AND
DDocument.DDocument_ID = DDocumentInvoiceXref.DDocument_ID AND
DDocument.DDocumentStatus can-do icDocumentStatus AND
DDocument.DDocumentType = icDocumentType
each DDocumentPostingLine (inner-join) where
DDocumentPostingLine.DDocument_ID = DDocument.DDocument_ID AND
first PostingLine1 (inner-join) where
PostingLine1.Company_Id = iiCompanyId AND
PostingLine1.PostingLine_ID = DDocumentPostingLine.PostingLine_ID AND
first Posting (inner-join) where
Posting.Company_Id = iiCompanyId AND
Posting.Posting_ID = PostingLine1.Posting_ID AND
each PostingLine2 (inner-join) where
PostingLine2.Company_Id = iiCompanyId AND
PostingLine2.Posting_ID = Posting.Posting_ID AND
first GL (inner-join) where
GL.SharedSet_Id = vi_GL_sharedset(iiCompanyId) AND
GL.GL_ID = PostingLine2.GL_ID AND
GL.GLTypeCode = icGLTypeCode
query resultset tqDDocumentInvoiceXrefPostByStat
field name | data type | db field | description |
tiDDocument_ID | integer | DDocumentInvoiceXref.DDocument_ID | Link to DDocument |
tdDDocumentInvoiceXrefAlloTC | decimal | DDocumentInvoiceXref.DDocumentInvoiceXrefAlloTC | TC Allocated Amount. This field indicates the invocie amount already Allocated in transaction currency. |
tdDDocumentInvoiceXrefDiscTC | decimal | DDocumentInvoiceXref.DDocumentInvoiceXrefDiscTC | TC Discount Amount. This field indicates the discount amount of the invoice already allocated by transaction currency. |
tcDDocumentStatus | character | DDocument.DDocumentStatus | Status. The payment status. The default value for a new record is Initial. |
tcDDocumentType | character | DDocument.DDocumentType | Payment Instrument. The system displays the payment instrument associated with the payment format linked to the customer bank. |
tiDInvoice_ID | integer | DDocumentInvoiceXref.DInvoice_ID | Link to DInvoice |
tcGLTypeCode | character | GL.GLTypeCode | A code identifying the type of account. |
Internal usage
QadFinancials