When creating POS Invoices where customers pay more than the bill and change_amount is recorded, ERPNext adds the full cash received to the POS Closing total and does not subtract the change_amount. Result: system Closing > physical cash in drawer.
Detailed description / problem
When a POS sale is made where the customer pays more than the bill, the POS Invoice stores two relevant values:
paid_amount(or payment record) — the amount the customer handed to the cashier (e.g. 5).change_amount— the amount returned to the customer as change (e.g. 3).
Expected behavior (logical / physical cash):
- Expected cash in drawer after the sale =
Opening + paid_amount - change_amount.- Example: Opening = 100; Bill = 2; Customer pays = 5; Change = 3 → physical cash =
100 + 5 - 3 = 102.
- Example: Opening = 100; Bill = 2; Customer pays = 5; Change = 3 → physical cash =
Actual ERPNext behavior (observed):
- ERPNext calculates POS Closing as
Opening + SUM(payments)and does not subtractchange_amount.- Using the example above, ERPNext shows
Opening + 5 = 105. This does not match the physical cash in drawer (102).
- Using the example above, ERPNext shows
Why this is a problem
- Reconciliation at closing gets a false positive difference. The system will show +3 or -3 depending on how the closing is performed, causing confusion and requiring manual corrections.
- Audits and cash reporting become inaccurate unless users manually adjust the counted cash in the POS Closing Entry.
Steps to reproduce
- Create or open a POS session with an Opening Amount of
100. - Create a POS Invoice for a
bill amountof2. - Record a payment where the customer gives
5cash andchange_amountis3.
- Confirm in the POS Invoice that
paid_amount(or linked Sales Invoice Payment) is5andchange_amountis3.
- Go to POS Closing Entry for that session/date and observe the expected/closing totals.
- ERPNext will show Closing =
100 + 5 = 105(i.e. it added the full paid amount).
- Physically count cash: you will have
102in the drawer, demonstrating the mismatch.