project QadFinancials > class BDInvoice > business logic query DInvoiceBankForDiscountGL
Description
DInvoiceBankForDiscountGL
Parameters
iiDInvoiceID | integer | |
iiCompanyId | integer | Company id |
query condition
each DInvoiceBank where
DInvoiceBank.DInvoice_ID = iiDInvoiceID
first BankNumber1 (inner-join) where
BankNumber1.BankNumber_ID = DInvoiceBank.BankNumber_ID AND
first BankPayFormat (inner-join) where
BankPayFormat.BankPayFormat_ID = BankNumber1.BankPayFormat_ID AND
first BankNumber2 (inner-join) where
BankNumber2.BankNumber_ID = BankPayFormat.BankNumber_ID AND
first GL1 (inner-join) where
GL1.SharedSet_Id = vi_GL_sharedset(iiCompanyId) AND
GL1.GL_ID = BankNumber2.ParentObject_ID AND
first GL2 (inner-join) where
GL2.SharedSet_Id = vi_GL_sharedset(iiCompanyId) AND
GL2.GL_ID = GL1.BankARDiscountGL_ID AND
first DInvoice (inner-join) where
DInvoice.Company_Id = iiCompanyId AND
DInvoice.DInvoice_ID = DInvoiceBank.DInvoice_ID AND
first Division (outer-join) where
Division.SharedSet_Id = vi_DIVISION_sharedset(iiCompanyId) AND
Division.Division_ID = DInvoice.Division_ID AND
query resultset tqDInvoiceBankForDiscountGL
field name | data type | db field | description |
tiBankARDiscountGL_ID | integer | GL1.BankARDiscountGL_ID | AR Discount Account |
tcBankARDiscountGLCode | character | GL2.GLCode | A code identifying the GL account. |
tiDivision_ID | integer | DInvoice.Division_ID | Sub-Account |
tcDivisionCode | character | Division.DivisionCode | Sub-Account |
tlGLIsDivisionAccount | logical | GL2.GLIsDivisionAccount | Set to true if the account has a sub-account. Its value is calculated by the system and is determined by the value of tcDivisionProfileCode. |
| api annotation: | | This field can be left blank as it will be calculated by the system. |
tiDebtorBankNumber_ID | integer | BankNumber1.BankNumber_ID | Record ID |
tiGLBankNumber_ID | integer | BankPayFormat.BankNumber_ID | Bank Number |
tiBankPayFormat_ID | integer | BankPayFormat.BankPayFormat_ID | Record ID |
tiParentObject_ID | integer | BankNumber2.ParentObject_ID | Parent Object |
tiBankGL_ID | integer | GL1.GL_ID | Record ID |
tiBankNumber_ID | integer | DInvoiceBank.BankNumber_ID | Formatted Bank Account No |
tiDInvoice_ID | integer | DInvoiceBank.DInvoice_ID | Link to DInvoice |
tiDInvoiceBank_ID | integer | DInvoiceBank.DInvoiceBank_ID | Record ID |
Internal usage
QadFinancials