Showing Outstanding Amount of customer in sales order

Hi ERPnext team,

I like to approve the user experience by showing the outstanding amount in a sales order after selecting a customer. By now I can create a sales order with any value and AFTER Submitting I get an message showing me, that the credit limit is exceeded. This is to late I think. It would be easier if the outstanding amount (or even better creditlimit-outstanding) would be displayed while adding the items. By doing so any user could see this directly.

I can get the “credit limit” by fetching this field out of the customer. But I did not find a solution to fetch the outstanding amount (eg.displayed in the head of a customer). Is there any possibility to fetch this information to a sales order?

Thanks for your help
Thilo

1 Like

You would like to display total outstanding amount for customer or against particular sales order?

Sunil

I would like to get the outstanding amount of the selected customer. With this I can do some computing and show other values.

Thilo

Hi to all,

is there any solution to get the data?

Check https://github.com/frappe/erpnext/blob/develop/erpnext/selling/doctype/customer/customer.py#L171

To customize this .py file, what is the best practice? Should it be updated using hooks.py or other method?

@ThiloV Could you please describe how did you do it?

As for the Outstanding Amount, this thread will do the trick.