project QadFinancials > class BDebtorReport > business logic query CustomerCreditOverviewMR


Parameters


iiCompanyIdintegerCompany id
icFromDebtorCodecharacter
icToDebtorCodecharacter
icDebtorTypecharacter


query condition


  each Debtor where
Debtor.SharedSet_Id = vi_DEBTOR_sharedset(iiCompanyId) AND
Debtor.DebtorCode >= icFromDebtorCode AND
Debtor.DebtorCode <= icToDebtorCode

      first BusinessRelation (inner-join) where
BusinessRelation.BusinessRelation_ID = Debtor.BusinessRelation_ID AND

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

      first DebtorType (conditional-join) where
DebtorType.DebtorType_ID = Debtor.DebtorType_ID AND
DebtorType.DebtorTypeCode can-do icDebtorType

      first PaymentCondition (inner-join) where
PaymentCondition.PaymentCondition_ID = Debtor.NormalPaymentCondition_ID AND


query sort order


Debtor.DebtorCode (ascending)


query resultset tqCustomerCreditOverviewMR


field namedata typedb fielddescription
tcBusinessRelationName1characterBusinessRelation.BusinessRelationName1Name: The full name of the business relation.
This field sets the default name for linked addresses such as customers and suppliers.
api annotation:PartialUpdate = yes - defaults to the BusinessRelationCode.
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.
tdDebtorFixedCredLimTCdecimalDebtor.DebtorFixedCredLimTCWhen Apply Fixed Ceiling is selected, specify the currency amount that determines the maximum credit extended to this customer.
api annotation:Value for this field defaults to 0.0000 .
tdDebtorHighCreditdecimalDebtor.DebtorHighCreditThe highest amount of credit you have ever extended to this customer. This is the largest AR balance they have had open at one time.
ttDebtorHighCreditDatedateDebtor.DebtorHighCreditDateThe date the highest credit amount was extended to this customer.
tlDebtorIsFinanceChargelogicalDebtor.DebtorIsFinanceChargeIndicate whether to make this customer’s accounts liable for finance charges or not.
api annotation:Value for this field defaults to false.
tlDebtorIsFixedCredLimlogicalDebtor.DebtorIsFixedCredLimIndicate if the credit limit of the customer is fixed.
api annotation:Value for this field defaults to false.
tlDebtorIsLockedCredLimlogicalDebtor.DebtorIsLockedCredLimIndicate whether to put this customer on hold.
api annotation:Value for this field defaults to false.
tlDebtorIsTurnOverCredLimlogicalDebtor.DebtorIsTurnOverCredLimIndicate whether you can enter a percentage in the Percentage of Turnover field.
api annotation:Value for this field defaults to false.
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.
tdDebtorPercTurnOverCredLimdecimalDebtor.DebtorPercTurnOverCredLimWhen Apply % of Turnover is selected,specify a percentage value. The system applies this percentage to the last year turnover and displays the result in the Credit on Turnover field. The amount is recalculated when you change the percentage.
api annotation:Value for this field defaults to 0.00 .
tcPaymentConditionCodecharacterPaymentCondition.PaymentConditionCodeCredit Terms Code
ti_sequenceintegercalculatedprimary index
tc_rowidcharactercalculated = rowid(Debtor),rowid(BusinessRelation),rowid(Currency),rowid(DebtorType),rowid(PaymentCondition)


Internal usage


QadFinancials
method BDebtorReport.CustomerCreditOverview