project QadFinancials > class BCInvoice > business logic query CInvoiceBankForDiscountGL
Parameters
iiCInvoiceID | integer | |
iiCompanyId | integer | Company id |
query condition
each CInvoiceBank where
CInvoiceBank.CInvoice_ID = iiCInvoiceID
first BankNumber1 (inner-join) where
BankNumber1.BankNumber_ID = CInvoiceBank.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.BankAPDiscountGL_ID AND
first CInvoice (inner-join) where
CInvoice.Company_Id = iiCompanyId AND
CInvoice.CInvoice_ID = CInvoiceBank.CInvoice_ID AND
first Division (outer-join) where
Division.SharedSet_Id = vi_DIVISION_sharedset(iiCompanyId) AND
Division.Division_ID = CInvoice.Division_ID AND
query resultset tqCInvoiceBankForDiscountGL
field name | data type | db field | description |
tiBankAPDiscountGL_ID | integer | GL1.BankAPDiscountGL_ID | AP Discount Account |
tcBankAPDiscountGLCode | character | GL2.GLCode | A code identifying the GL account. |
tiBankGL_ID | integer | GL1.GL_ID | Record ID |
tiBankNumber_ID | integer | CInvoiceBank.BankNumber_ID | Bank Number |
tiBankPayFormat_ID | integer | BankPayFormat.BankPayFormat_ID | Record ID |
tiCInvoice_ID | integer | CInvoiceBank.CInvoice_ID | Link to CInvoice |
tiCInvoiceBank_ID | integer | CInvoiceBank.CInvoiceBank_ID | Record ID |
tiCreditorBankNumber_ID | integer | BankNumber1.BankNumber_ID | Record ID |
tiDivision_ID | integer | CInvoice.Division_ID | Sub-Account |
tcDivisionCode | character | Division.DivisionCode | Sub-Account |
tiGLBankNumber_ID | integer | BankPayFormat.BankNumber_ID | Bank Number |
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. |
tiParentObject_ID | integer | BankNumber2.ParentObject_ID | Parent Object |
Internal usage
QadFinancials