project QadFinancials > class BDebtor > business logic query DebtorForUpdate


Parameters


iiCompanyIdintegerCompany id
iiDebtorIDinteger
icDebtorCodecharacter


query condition


  each Debtor where
Debtor.SharedSet_Id = vi_DEBTOR_sharedset(iiCompanyId) AND
Debtor.Debtor_ID = iiDebtorID AND
Debtor.DebtorCode matches icDebtorCode

      first Currency (inner-join) where
Currency.Currency_ID = Debtor.Currency_ID AND


query resultset tqDebtorForUpdate


field namedata typedb fielddescription
tiCurrency_IDintegerDebtor.Currency_IDCurrency Code
tcCurrencyCodecharacterCurrency.CurrencyCodeCurrency Code
tiDebtor_IDintegerDebtor.Debtor_IDRecord ID
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.
ttDebtorLastPaymentdateDebtor.DebtorLastPaymentLast payment date.
api annotation:The system automatically updates this date when transactions are posted in Banking Entry, Petty Cash, and Customer Payments.
ttDebtorLastSaledateDebtor.DebtorLastSaleThe date an invoice was last posted for this customer.
api annotation:This date is updated by Invoice Post and Print.
tdDebtorSalesOrderBalancedecimalDebtor.DebtorSalesOrderBalanceCurrent balance of all sales order related to this customer.
api annotation:Value for this field defaults to 0.0000 .
tiDebtorTotalNbrOfInvoicesintegerDebtor.DebtorTotalNbrOfInvoicesNumber of paid invoices related to this customer.


Internal usage


QadFinancials
method BDebtor.CalculateBalances
method BDInvoice.AdditionalUpdatesAllDebtorUpdates