project QadFinancials > class BBillReport > business logic query GetDInvoiceMovementByDocId


Parameters


iiCompanyIdintegerCompany id
iiDDocumentIdinteger


query condition


  each DDocument where
DDocument.Company_Id = iiCompanyId AND
DDocument.DDocument_ID = iiDDocumentId

      each DDocumentInvoiceXref (inner-join) where
DDocumentInvoiceXref.DDocument_ID = DDocument.DDocument_ID AND

          first DInvoice (inner-join) where
DInvoice.Company_Id = iiCompanyId AND
DInvoice.DInvoice_ID = DDocumentInvoiceXref.DInvoice_ID AND

              each DInvoiceMovement (inner-join) where
DInvoiceMovement.Company_Id = iiCompanyId AND
DInvoiceMovement.DInvoice_ID = DInvoice.DInvoice_ID AND
DInvoiceMovement.LastModifiedDate = DDocument1.LastModifiedDate AND
DInvoiceMovement.LastModifiedTime = DDocument1.LastModifiedTime

                  first PostingLine (inner-join) where
PostingLine.Company_Id = iiCompanyId AND
PostingLine.PostingLine_ID = DInvoiceMovement.PostingLine_ID AND

                      first Posting (inner-join) where
Posting.Company_Id = iiCompanyId AND
Posting.Posting_ID = PostingLine.Posting_ID AND

                          first Journal (inner-join) where
Journal.SharedSet_Id = vi_JOURNAL_sharedset(iiCompanyId) AND
Journal.Journal_ID = Posting.Journal_ID AND


query resultset tqGetDInvoiceMovementByDocID


field namedata typedb fielddescription
tiDDocument_IDintegerDDocument.DDocument_IDRecord ID
tiDDocumentInvoiceXref_IDintegerDDocumentInvoiceXref.DDocumentInvoiceXref_IDRecord ID
tiDInvoice_IDintegerDInvoice.DInvoice_IDRecord ID
tiDInvoiceMovement_IDintegerDInvoiceMovement.DInvoiceMovement_IDRecord ID
tcDInvoiceMovementTypecharacterDInvoiceMovement.DInvoiceMovementTypeCInvoiceMovementType. "Initial" indicates that the movement represents the initial creation of the invoice, "movement" stands for all subsequent modifications of the invoice balance (payments, adjustments etc).
tcDInvoiceTypecharacterDInvoice.DInvoiceTypeInvoice Type. This field displays the invoice type.
Invoice Correction and Credit Note Correction display as choices only when the appropriate daybook types have already been defined.
api annotation:PartialUpdate = yes - defaults to Invoice
tiJournal_IDintegerJournal.Journal_IDRecord ID
tcJournalCodecharacterJournal.JournalCodeA daybook code (maximum eight characters).
tiPosting_IDintegerPosting.Posting_IDRecord ID
tiPostingLine_IDintegerPostingLine.PostingLine_IDRecord ID
tcPostingTextcharacterPosting.PostingTextFree text describing the posting.
api annotation:Value for this field defaults to blank
tiPostingVoucherintegerPosting.PostingVoucherVoucher is a sequential number that uniquely identifies the journal entry (within the combination of an entity and a daybook code).
api annotation:In create mode,enter 0 in this field - the voucher number is generated by the system. In Modify/Delete, the correct voucher number must be entered because this identifies the record.
tiPostingYearintegerPosting.PostingYearThe GL calendar year for the posting.


Internal usage


QadFinancials
method BBillReport.GetBillReportPayment