project QadFinancials > class BDInvoice > business logic query DInvoiceByNatureKeyIsOpen

Annotation

Primary query

Description

check if the invoice is still open, based on the nature key


Parameters


iiCompanyIdintegerCompany id
iiDInvoiceIdintegerDInvoice ID
iiPeriodYearintegerPeriod Year
iiJournalIdintegerJournal ID
icJournalCodecharacterDaybook Code
iiDInvoiceVoucherintegerVoucher
ilDInvoiceIsOpenlogicalIs the invoice still open ?


query condition


  each DInvoice where
DInvoice.Company_Id = iiCompanyId AND
DInvoice.DInvoice_ID = iiDInvoiceId AND
DInvoice.Journal_ID = iiJournalId AND
DInvoice.DInvoiceVoucher = iiDInvoiceVoucher AND
DInvoice.DInvoicePostingYear = iiPeriodYear AND
DInvoice.DInvoiceIsOpen = ilDInvoiceIsOpen

      first Journal (inner-join) where
Journal.SharedSet_Id = vi_JOURNAL_sharedset(iiCompanyId) AND
Journal.Journal_ID = DInvoice.Journal_ID AND
Journal.JournalCode = icJournalCode

      first Period (inner-join) where
Period.Company_Id = iiCompanyId AND
Period.Period_ID = DInvoice.Period_ID AND
Period.PeriodYear = iiPeriodYear


query resultset tqDInvoiceByNatureKeyIsOpen


field namedata typedb fielddescription
tiCompany_IDintegerDInvoice.Company_IDLink to Company
tiDebtor_IDintegerDInvoice.Debtor_IDLink to Debtor
tiDInvoice_IDintegerDInvoice.DInvoice_IDRecord ID
tiDInvoiceCurrency_IDintegerDInvoice.DInvoiceCurrency_IDCurrency Code
tlDInvoiceIsOpenlogicalDInvoice.DInvoiceIsOpenOpen.This field indicates if the invoice has been completely paid.
This field is updated automatically when complete payment is confirmed.
This field is read-only.
api annotation:PartialUpdate = yes - defaults to true
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
tcJournalCodecharacterJournal.JournalCodeA daybook code (maximum eight characters).
tiPeriod_IDintegerDInvoice.Period_IDLink to Period
tiPeriodYearintegerPeriod.PeriodYearGL Calendar Year


Internal usage


QadFinancials
method BDInvoice.ApiIsOpenInvoice
method BSelfBill.ApiCreateInvPrepayPaymentPaym