In this blog post I would like to provide the logic for the Estimated amount field that is stored on the sales order header.
First off all, the system determines whether the estimate value should be calculated for the sales order
Refer to SalesTable, SetEstimate method
If the customer account (or invoice account if they are different) has a credit limit and the customer has specified mandatory credit limit then it would be estimated.
If customer doesn't have a credit limit and the customer has not specified mandatory credit limit then we determine whether the estimate should be calculated based off of the setting for the customer.
If Credit limit type in the Accounts receivable parameters is set to one of these values (Balance, Balance + All, Balance + packing slip or product receipt) then it would be estimated.
Refer to this.custTable_CustAccount().shouldEstimateBeCalculated() in the SalesTable, SetEstimate method.
How the system calculates Estimated amount:
- If the Credit limit type in the Accounts receivable parameters is set to Balance + All, then the system takes Sales totals (Sales order > Totals where Selection = Packing slip)
- If the Credit limit type in the Accounts receivable parameters is set to Balance + packing slip, then the system takes Sales totals (Sales order > Totals where Selection = All)
No comments:
Post a Comment