You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Process Overview in Bullet Points:
Multi-Currency Setup:
CAD is the base currency, and payments can be made from foreign currency bank accounts.
Payment Preparation:
When creating a payment entry from a foreign currency bank account, the system calculates the amount based on historical exchange rates, sourced from online platforms.
Unallocated Amount:
The calculated amount difference (between the base currency and foreign currency) is placed in the Write-Off section as "Unallocated Amount" in the supplier's currency.
This represents the discrepancy between the actual payment amount and the amount registered by the system.
Adjusting Unallocated Amount:
User Action Required: The user must adjust this "Unallocated Amount" to match the exact amount received by the supplier.
Risk: If the user skips this adjustment, the payment may be saved incorrectly, resulting in a discrepancy on the third-party account.
Exchange Gain/Loss:
Once the unallocated amount is adjusted, the "Set Exchange Gain/Loss" button becomes active.
The user can then specify an FX Gain/Loss account, which ensures the accounting entry reflects the actual currency exchange difference.
Diagram: Multi-Currency Payment Entry Flow.
point 4 if not done it ll cause the problem in question
Start
|
v
Initiate Payment Entry
Select Bank with Foreign Currency
|
v
System Calculates Amount
Uses Historical Exchange Rate
|
v
Register Unallocated Amount
Difference shown in Write-Off Section
|
v
User Adjusts Unallocated Amount
Match exact amount received by supplier
Avoids discrepancies in supplier account
|
v
Set Exchange Gain/Loss
Activate "Set Exchange Gain/Loss"
Enter FX Gain/Loss Account
|
v
End: Entry Reflects Accurate Foreign Exchange
The logic to calculate unallocated_amount is incorrect. It needs following corrections:
Consider base_paid_amount instead of base_received_amount for calculation when Payment Entry is of type Receive. And vice-versa for Pay.
Don't consider the deduction row related to Exchange Gain / Loss when calculating the Total Allocatable Amount. All other deductions like Cash Discount will still be considered.
The following additional changes are proposed to do above properly:
Add a checkbox Is Exchange Gain / Loss? in Payment Entry Deduction. The row with this checkbox will be excluded for the purpose of calculating unallocated_amount.
(slightly breaking change) Remove the Set Exchange Gain / Loss button. Instead, automatically calculate the Exchange Gain / Loss as the difference between base_paid_amount and base_received_amount and add the row for Exchange Gain / Loss in Payment Deductions or Loss table automatically in the client side and while saving. This row will also be auto-updated whenever exchange gain/loss changes and during save. Removal of this row will not be permitted, but changing account and cost center will be possible.
Another approach that is possible is to not add exchange gain / loss in the Deductions table and create separate fields for that. But that will be more breaking.
Information about bug
Process Overview in Bullet Points:
Multi-Currency Setup:
CAD is the base currency, and payments can be made from foreign currency bank accounts.
Payment Preparation:
When creating a payment entry from a foreign currency bank account, the system calculates the amount based on historical exchange rates, sourced from online platforms.
Unallocated Amount:
The calculated amount difference (between the base currency and foreign currency) is placed in the Write-Off section as "Unallocated Amount" in the supplier's currency.
This represents the discrepancy between the actual payment amount and the amount registered by the system.
Adjusting Unallocated Amount:
User Action Required: The user must adjust this "Unallocated Amount" to match the exact amount received by the supplier.
Risk: If the user skips this adjustment, the payment may be saved incorrectly, resulting in a discrepancy on the third-party account.
Exchange Gain/Loss:
Once the unallocated amount is adjusted, the "Set Exchange Gain/Loss" button becomes active.
The user can then specify an FX Gain/Loss account, which ensures the accounting entry reflects the actual currency exchange difference.
Diagram: Multi-Currency Payment Entry Flow.
point 4 if not done it ll cause the problem in question
Start
|
v
|
v
|
v
|
v
|
v
|
v
End: Entry Reflects Accurate Foreign Exchange
Module
accounts
Version
ERPNext: v15.39.2 (HEAD) - Frappe Framework: v15.45.0 (HEAD)
Installation method
None
Relevant log output / Stack trace / Full Error Message.
No response
The text was updated successfully, but these errors were encountered: