Skip to content

Commit 088063f

Browse files
authored
Merge pull request #9231 from ehuelsmann/fix/1.13/fx-payment
Fix FX rate calculation on single payment screen
2 parents 1499300 + ba376f4 commit 088063f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/LedgerSMB/Scripts/payment.pm

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1206,7 +1206,7 @@ sub payment2 {
12061206
topay_subtotal => $request->format_amount(
12071207
LedgerSMB::PGNumber->new(
12081208
(sum map {$request->parse_amount($_->{topay_fx}->{value} // 0)} @invoice_data) // 0
1209-
) / ($request->{exrate} // 1),
1209+
) * ($request->{exrate} // 1),
12101210
money => 1),
12111211
topay_state => \@topay_state,
12121212
vendorcustomer => {
@@ -1240,7 +1240,7 @@ sub payment2 {
12401240
LedgerSMB::PGNumber->new(
12411241
(sum map {$request->parse_amount($_->{amount} // 0)} @overpayment)
12421242
+ $request->parse_amount(0) # never end up with undef
1243-
) / ($request->{exrate} // 1),
1243+
) * ($request->{exrate} // 1),
12441244
money => 1),
12451245
paymentfx_total => $request->format_amount(
12461246
LedgerSMB::PGNumber->new(
@@ -1254,7 +1254,7 @@ sub payment2 {
12541254
(sum map {$request->parse_amount($_->{amount} // 0)} @overpayment)
12551255
+ (sum map {$request->parse_amount($_->{topay_fx}->{value} // 0)} @invoice_data)
12561256
+ $request->parse_amount(0) # never end up with undef
1257-
) / ($request->{exrate} // 1),
1257+
) * ($request->{exrate} // 1),
12581258
money => 1),
12591259
};
12601260

0 commit comments

Comments
 (0)