We have a lot of users that are dealing with many foreign customers/suppliers. This means that they deal with multiple currencies while doing accounting. One particular use case that can be handled in a better way in ERPNext is creating payment entries for payment to/from foreign parties.
When I am dealing with an overseas customer/supplier, I may record sales/purchase invoices in multiple currencies and record payments in the customer/supplier’s currency. In this case when I record a payment entry in the system, I would want to see all outstanding invoices in their respective currencies and allocate amount from the payment, in payment’s currency (currency in which I make/receive payment).
A company called “Shipmnts” in India has a supplier called “ABC forwarders” from US. As Shipmnts is a company based in India, it will do all its accounting in INR and hence ABC forwarders’ creditor account will also be maintained in INR (one of the other reasons is also because I bill this customer in “EUR” as well - hence cannot make a USD debtor).
ABC forwarders has raised two purchase invoices, one with 100 USD and one with 100 EUR. Given the expenses in wiring forex plus gain/loss, Shipmnts will make payment to ABC forwarders in USD this time. So, when they are recording a payment entry they want to see all outstanding invoices, with their balances in USD (the payment currency) and allocate amount accordingly. They would also like to know how much total exchange gain/loss will be there after allocation. After the allocation is done, Shipmnts would also like to share the allocation made (in USD) from payment against the two invoices with ABC Forwarders.
The current payment entry form only allows the user to allocate amount in the customer/supplier’s account currency. This makes it difficult for the user as they have to do all the calculations manually for allocating amount in different currency.
Proposed solution (Overview):
- Add payment currency field
- Add payment amount in payment currency field
- Add exchange rates table (to convert from invoice currency)
- Exchange rate to payment currency
- Exchange rate to base currency
- Allow allocation in payment currency
- Auto calculate gain/loss at invoice level
- Show amounts in payment currency in summary section
- Add patches for migration of old payment entries
- Add tests for above changes
Payment type = Pay
If we do implement this, will this change be something that can be merged back into erpnext?
Please take some time and try to provide some feedback on the above changes. Any suggestions/questions will be appreciated.
P.S. - Will share a doc with detailed changes soon.