project QadFinancials > class BClosingPostingsReport > business logic query ARBalanceAsOfDate


Parameters


iiCompanyIdintegerCompany id
itEndOfDatedate


query condition


  each DInvoice where
DInvoice.Company_Id = iiCompanyId AND
DInvoice.DInvoiceClosingDate > itEndOfDate AND
DInvoice.DInvoicePostingDate <= itEndOfDate

      each DInvoiceMovement (inner-join) where
DInvoiceMovement.Company_Id = iiCompanyId AND
DInvoiceMovement.DInvoice_ID = DInvoice.DInvoice_ID AND
DInvoiceMovement.DInvoiceMovementPostDate <= itEndOfDate

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

              first GL (inner-join) where
GL.SharedSet_Id = vi_GL_sharedset(iiCompanyId) AND
GL.GL_ID = PostingLine.GL_ID AND


query resultset tqARBalanceAsOfDate


field namedata typedb fielddescription
tiDInvoice_IDintegerDInvoice.DInvoice_IDRecord ID
ttDInvoiceClosingDatedateDInvoice.DInvoiceClosingDateClosing Date. This field displays the date on which the open balance became zero.
tiDInvoicePostingYearintegerDInvoice.DInvoicePostingYearYear.This field indicates the accounting year for the invoice.
If you modify these fields, the posting and tax dates are changed correspondingly.
api annotation:This field defaults to the accounting year associated with the posting date.
tcGLCodecharacterGL.GLCodeA code identifying the GL account.
tiPostingLine_IDintegerDInvoiceMovement.PostingLine_IDLink to PostingLine
tdPostingLineCreditCCdecimalPostingLine.PostingLineCreditCCSC Credit
api annotation:Partial Update = yes - it will get a default value depending on the value of PostingLinCreditTC, PostingLineCCRate & PostingLineCCScale.
SC Amount = TC Amount * Exchange rate (TC/SC) * Scale Factor (TC/SC). If Partial Update is false, you should enter the correct value for this field
tdPostingLineCreditLCdecimalPostingLine.PostingLineCreditLCBC Credit
api annotation:Partial Update = yes - it will get a default value depends on the value of PostingLineCreditTC, PostingLineExchangeRate & PostingLineRateScale.
BC Amount = TC Amount * Exchange rate (TC/BC) * Scale Factor (TC/BC). If Partial Update is false, enter a value for this field.
tdPostingLineDebitCCdecimalPostingLine.PostingLineDebitCCSC Debit
api annotation:Partial Update = yes - it will get a default value depending on the value of PostingLineDebitTC, PostingLineCCRate & PostingLineCCScale.
SC Amount = TC Amount * Exchange rate (TC/SC) * Scale Factor (TC/SC). If Partial Update is false, enter the correct value for this field.
tdPostingLineDebitLCdecimalPostingLine.PostingLineDebitLCBC Debit
api annotation:Partial Update = yes - it will get a default value depending on the value of PostingLineDebitTC, PostingLineExchangeRate and PostingLineRateScale.
BC Amount = TC Amount * Exchange rate (TC/BC) * Scale Factor (TC/BC). If Partial Update = false, enter the correct value into this field.


Internal usage


QadFinancials
method BClosingPostingsReport.DebtorControlGLBalance