project QadFinancials > class BDebtorBalance > business logic query DBalanceByCompanyDebtorCurr

Description

DBalanceByCompanyDebtorCurr: Query on DBalance with filtering-options on the Code and ID for the Company, Currency and Debtor


Parameters


iiCompanyIdintegerCompany id
iiDBalanceIDinteger
icCompanyCodecharacter
icDebtorCodecharacter
iiDebtorIDinteger
icCurrencyCodecharacter
iiCurrencyIDinteger


query condition


  each DBalance where
DBalance.Company_Id = iiCompanyId AND
DBalance.Debtor_ID = iiDebtorID AND
DBalance.Currency_ID = iiCurrencyID AND
DBalance.DBalance_ID = iiDBalanceID

      first Company (inner-join) where
Company.Company_Id = iiCompanyId AND
Company.Company_ID = DBalance.Company_ID AND
Company.CompanyCode = icCompanyCode

      first Currency (inner-join) where
Currency.Currency_ID = DBalance.Currency_ID AND
Currency.CurrencyCode = icCurrencyCode

      first Debtor (inner-join) where
Debtor.SharedSet_Id = vi_DEBTOR_sharedset(iiCompanyId) AND
Debtor.Debtor_ID = DBalance.Debtor_ID AND
Debtor.DebtorCode = icDebtorCode


query resultset tqDBalanceByCompanyDebtorCurr


field namedata typedb fielddescription
tiCompany_IDintegerDBalance.Company_IDLink to Company
tcCompanyCodecharacterCompany.CompanyCodeEntity Code
tiCurrency_IDintegerDBalance.Currency_IDLink to Currency
tcCurrencyCodecharacterCurrency.CurrencyCodeCurrency Code
tiDBalance_IDintegerDBalance.DBalance_IDRecord ID
tiDebtor_IDintegerDBalance.Debtor_IDLink to Debtor
tcDebtorCodecharacterDebtor.DebtorCodeA code (maximum eight characters) that identifies a customer. If the code you specify matches an existing supplier code, a warning message displays. You can choose to ignore the warning, and create the record. However, when a supplier and customer share the same code, they must reference the same business relation.
api annotation:If you leave the Customer Code field blank, the system automatically generates a number for the record based on the sequence defined in Customer Autonumber Create.


Internal usage


QadFinancials
method BDebtorBalance.RebuildHistory