project QadFinancials > class BDInvoice > method APIJournalNbrValDet2
Parameters
iiCompany_ID | input | integer | |
icJournalCode | input | character | |
itInvoicePostingDate | input | date | |
olInvoiceFound | output | logical | |
oiReturnStatus | output | integer | Return status of the method. |
Internal usage
QadFinancials
program code (program5/bdinvoice.p)
/* ============================================================================================= */
/* This method checks if there exists an invoice for the given entity/daybook after a given date */
/* ============================================================================================= */
<I-60 {READDIRECTDBACCESS
&READTABLENAMES = "Journal DInvoice"}>
assign olInvoiceFound = no.
for each Journal no-lock where
Journal.JournalCode = icJournalCode,
each DInvoice where
DInvoice.Company_ID = iiCompany_ID and
DInvoice.Journal_ID = Journal.Journal_ID and
DInvoice.DInvoicePostingDate > itInvoicePostingDate
no-lock :
assign olInvoiceFound = yes.
leave.
end. /* for each Journal, ecch DInvoice */