Dear Experts,
We have a pretty vanilla version of ERPNext setup where we have configured 2 customers with $1,000.00 credit limit. We have an issue where Sales Orders can be submitted (without error prompt) for any customer even though the customer's total credit exposure has exceeded the credit limit. The following describes the tests which we have simulated along with the results:
Test 1 (Good Result):
1) Customer 1 has $1,000.00 credit limit configured
2) Customer 1 has no "Open" Sales Order or Invoices etc.- Basically the customer's credit exposure is $0.00
3) Raised a Sales Order for $1,001.00 for Customer 1
4) Saved the Sales Order
5) Submitted the Sales Order - error prompt saying that the credit limit has exceeded is shown and we cannot proceed further
6) This result is good
Test 2 (Bad Result):
1) Customer 2 has $1,000.00 credit limit configured
2) Customer 2 has no "Open" Sales Order or Invoices etc.- Basically the customer's credit exposure is $0.00
3) Raised a Sales Order for $500.00 for Customer 2
4) Saved the Sales Order
5) Submitted the Sales Order
6) Sales Order is submitted successfully
7) Raised a second Sales Order fro $501.00 for Customer 2
8) Saved the Sales Order
9) Submitted the Sales Order
10) Sales Order is submitted successfully - There is no error prompt on credit limit being exceeded.
11) This result is unexpected
The expected result of Test 2 was to have an error prompt upon submission of the second Sales Order. Is this unexpected from your perspective as well or is there some business logic that is incorporated into the credit limit calculation which perhaps your could enlighten me on?
Would be great to know how ERPNext calculates the Credit Exposure as well.
Once again, many thanks for any help you can provide. You guys have been really great. Thank you very very much.
Javier