Custom Report for Customer Credit Balance Report

I want to make custom report for customer credit balance report, the condition is if i submit sales order, the credit balance won’t decrease, instead if i submit sales invoice the credit balance will decrease. is there anyone can help?

ERPNext provides the default report, so first check the Customer Credit Balance. Then after, if you want, then customize it.

The default report is decreasing credit balance when i submit sales order. i want to custom it when i submit sales invoice it will decrease the credit balance. can u help me with that?

Please select “Bypass Credit Limit Check at Sales Order”.

For specific customers, you can set the credit limit to be checked against the cumulative amount of the outstanding sales invoices and not the sales orders. You can do so by ticking ‘Bypass credit limit check at Sales Order’ checkbox in ‘Credit Limit and Payment Terms’ section of the customer.

but if i using bypass credit limit, it can make credit balance minus. i don’t want credit balance become minus. So that i need to make a custom report for that

You have to practically test the scenario because it will works on sales invoice submission, and then after customize the scenario according to the logic.

here I share the report logic and check it.

am i need to make my own function for get_credit_limit and get_customer_outstanding?

If you want then yes, but you have to develop the new report. so first you have to learn, how to make a script report. Please check the reference.

Help me a lot! thankyou so much :wink: