Hi everyone,
I’m working on ordering system built on ERPNext, and I’m facing a limitation with how credit is handled.
Currently, ERPNext applies credit at the customer level, where the system checks:
-
Total outstanding invoices
-
Against the customer’s credit limit
However, in my use case, I need more granular control:
Requirements:
-
Ability to use or not use credit per Sales Order / Invoice
-
Support mixed scenarios:
-
Some orders on credit
-
Some orders prepaid (no credit usage)
-
-
Track reserved credit at Sales Order level (before invoicing)
-
Maintain a proper credit usage ledger / audit trail
-
Support scheduled / recurring B2B orders, where future commitments should also block credit
Problem:
ERPNext:
-
Only tracks credit at invoice level (outstanding amount)
-
Does not support per-order credit toggling
-
Does not account for future/scheduled orders
What I’m considering:
-
Creating a custom Credit Ledger Doctype
-
Adding a use_credit flag on Sales Order / Invoice
-
Reserving credit at order stage
-
Releasing/adjusting on invoice/payment
Questions:
-
Has anyone implemented per-order credit control in ERPNext?
-
Is there a recommended way to handle credit reservation before invoicing?
-
Would extending the existing credit limit logic be better than building a custom ledger?
-
Any best practices for handling hybrid (credit + prepaid) flows?
Would really appreciate guidance or references if someone has solved a similar B2B use case.
Thanks!