ERPNext Conference 2019* ERPNext.com Blog

Is it possible to block the creation of a sales invoice if customer has an overdue invoice? If so, how?


#1

I’ve been trying to deal with my customers that hasn’t paid their invoices. usually I block the creationg of invoices to those customers. The problem I have es that I dont make the invoices and I have another person that does it. If she forget about that “blockage”, the client is invoiced and the products get delivered without me wanting that.
So, can I block the creation of a sales invoice if customer has an overdue invoice? If so, how?
Hope someone can help me.
Cheers


#2

You may check the status of the client in the Validate event.


#3

You can use credit limit feature for this…

https://erpnext.com/docs/user/manual/en/accounts/credit-limit


#4

Where can i check that?


#6

I thought about it but I need to do it manually. In the credit limit section there’s nothing like what I need


#7

You can ‘Disable’ the customer.

No user can create a new invoice against a disabled customer.


#8

Would that limit my ability to create sales order? I only need to limit the ability to block the creation of sales invoices


#9

Yes, disabling a customer in the customer record would also prevent you from creating sales orders.

BKM


#10

Then credit limit would be the way to go. Under that, once the limit is crossed, you are blocked against creating an Order or invoice. When you check the Bypass option, it allows user to create Sales Order:

https://erpnext.com/docs/user/manual/en/accounts/credit-limit#22-bypass-credit-limit-check-for-sales-order

Until the credit limit is cleared or increased, you cannot create an invoice for that customer.


#11

The credit limit .AND. the overdue condition is what is necessary here. Like a client may have a $2000 credit limit. But an invoice for $500 that’s not paid on time should put the client on hold. I think this is something that many organizations would want. Maybe a bit of scripting that reduces the credit limit to 0 as long as there is an overdue invoice should do the trick.

Hope this helps

Thanks

Jay