project QadFinancials > class BCInvoice > business logic query CInvoiceBankForDiscountGL


Parameters


iiCInvoiceIDinteger
iiCompanyIdintegerCompany 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 namedata typedb fielddescription
tiBankAPDiscountGL_IDintegerGL1.BankAPDiscountGL_IDAP Discount Account
tcBankAPDiscountGLCodecharacterGL2.GLCodeA code identifying the GL account.
tiBankGL_IDintegerGL1.GL_IDRecord ID
tiBankNumber_IDintegerCInvoiceBank.BankNumber_IDBank Number
tiBankPayFormat_IDintegerBankPayFormat.BankPayFormat_IDRecord ID
tiCInvoice_IDintegerCInvoiceBank.CInvoice_IDLink to CInvoice
tiCInvoiceBank_IDintegerCInvoiceBank.CInvoiceBank_IDRecord ID
tiCreditorBankNumber_IDintegerBankNumber1.BankNumber_IDRecord ID
tiDivision_IDintegerCInvoice.Division_IDSub-Account
tcDivisionCodecharacterDivision.DivisionCodeSub-Account
tiGLBankNumber_IDintegerBankPayFormat.BankNumber_IDBank Number
tlGLIsDivisionAccountlogicalGL2.GLIsDivisionAccountSet 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_IDintegerBankNumber2.ParentObject_IDParent Object


Internal usage


QadFinancials
method BOpenItemAdjustment.OIAdjCommitSubCInvoiceDiscount