-
Notifications
You must be signed in to change notification settings - Fork 122
Open
Description
Bug Description
The partial payment flow builds Payment Entry documents manually and sets both paid_from_account_currency and paid_to_account_currency from the invoice currency.
That diverges from ERPNext core Payment Entry logic, where party-account currency and bank/cash-account currency are resolved separately.
Expected Behavior
Partial payment Payment Entry creation should follow ERPNext core currency/account setup for:
- party account currency
- bank/cash account currency
- exchange-rate handling
- reference allocation
Actual Behavior
The custom partial payment path hardcodes account currencies from the invoice currency.
Steps to Reproduce
- Use POSNext partial payments in a multi-currency environment
- Create a sale where invoice currency differs from one or more linked accounts
- Add a partial payment through the POSNext flow
- Inspect the created
Payment Entryvalues and resulting paid/outstanding behavior
Impact
- incorrect paid/outstanding amounts in multi-currency sites
- wrong exchange-rate or account-currency behavior
- divergence from ERPNext core accounting logic
Suggested Fix
- use ERPNext core
get_payment_entry(...)flow where possible - or mirror ERPNext's account-currency resolution logic exactly instead of deriving both sides from invoice currency
Notes
This is separate from the partial-payment atomicity issue. The problem here is incorrect multi-currency setup even when the transaction itself succeeds.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels