project QadFinancials > class BDInvoice > method APIJournalNbrValDet1
Parameters
| iiCompany_ID | input | integer | |
| icJournalCode | input | character | |
| iiPeriod_ID | input | integer | |
| 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 in the given entity/daybook/period */
/* ================================================================================ */
<I-68 {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.Period_ID = iiPeriod_ID
no-lock :
assign olInvoiceFound = yes.
leave.
end. /* for each Journal */