project QadFinancials > class BBill > business logic query GetPreConfirmedBill
Description
Get confirmed bills before Bill with same customer,currency and entity.
Parameters
iiCompanyId | integer | Company id |
iiCurrency_ID | integer | |
iiDebtor_ID | integer | |
iiBillYear | integer | |
iiBill_ID | integer | |
iiDInvoiceCompany_ID | integer | |
query condition
each Bill where
Bill.Company_Id = iiCompanyId AND
Bill.Debtor_ID = iiDebtor_ID AND
Bill.BillYear <= iiBillYear AND
Bill.Currency_ID = iiCurrency_ID AND
Bill.Bill_ID < iiBill_ID
each DInvoice (inner-join) where
DInvoice.Bill_ID = Bill.Bill_ID AND
DInvoice.Company_ID = iiDInvoiceCompany_ID
query sort order
Bill.Bill_ID (descending)
query resultset tqGetPreConfirmedBill
field name | data type | db field | description |
tiBill_ID | integer | Bill.Bill_ID | Record ID |
tdBillClosingBalanceTC | decimal | Bill.BillClosingBalanceTC | TC Closing Balance |
ttBillConfirmDate | date | Bill.BillConfirmDate | Bill Confirm Date |
ttBillDate | date | Bill.BillDate | Bill Date |
tiBillNumber | integer | Bill.BillNumber | Bill Number |
tcBillStatus | character | Bill.BillStatus | Status |
tiBillYear | integer | Bill.BillYear | Bill Year |
tiCompany_ID | integer | DInvoice.Company_ID | Link to Company |
tiDInvoiceMovement_ID | integer | Bill.DInvoiceMovement_ID | Link to highest DInvoiceMovement |
Internal usage
QadFinancials