project QadFinancials > class BDInvoice > business logic query DInvoiceForInvCertification

Description

This query will return the invoices with the same company ID and Journal ID. It's sorted on company, journal, posting year and voucher so we can easily retrieve the last invoice.


Parameters


iiCompanyIdintegerCompany id
iiJournalIDintegerJournal ID


query condition


  each DInvoice where
DInvoice.Company_ID = iiCompanyId AND
DInvoice.Journal_ID = iiJournalID


query sort order


DInvoice.Company_ID (ascending)
DInvoice.Journal_ID (ascending)
DInvoice.DInvoicePostingYear (ascending)
DInvoice.DInvoiceVoucher (ascending)


query resultset tqDInvoiceForInvCertification


field namedata typedb fielddescription
tiCompany_IDintegerDInvoice.Company_IDLink to Company
tiDInvoice_IDintegerDInvoice.DInvoice_IDRecord ID
tcDInvoiceInvCertSignatureCurrcharacterDInvoice.DInvoiceInvCertSignatureCurrSignature Current Invoice
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.
tiDInvoiceVoucherintegerDInvoice.DInvoiceVoucherVoucher.This field displays the numeric identifier assigned to the posting.
When the daybook of the journal entry is charged(after transfer), the voucher is cleared.
Voucher must be unique in one GL period.
When the user input is zero, the system automatically assign a value not used yet for this field.
tiJournal_IDintegerDInvoice.Journal_IDDaybook Code


Internal usage


QadFinancials
method BDInvoice.PreSave