Revision 26876a4e
Von Kivitendo Admin vor mehr als 1 Jahr hinzugefügt
bin/mozilla/ir.pl | ||
---|---|---|
183 | 183 |
$form->{"memo_$i"} = $form->{acc_trans}{$key}->[$i - 1]->{memo}; |
184 | 184 |
|
185 | 185 |
$form->{paidaccounts} = $i; |
186 |
# hook for calc of of fx_paid and check if banktransaction has a record exchangerate
|
|
186 |
# hook for calc of of defaultcurrency_paid and check if banktransaction has a record exchangerate
|
|
187 | 187 |
if ($form->{"exchangerate_$i"}) { |
188 | 188 |
my $bt_acc_trans = SL::DB::Manager::BankTransactionAccTrans->find_by(acc_trans_id => $form->{"acc_trans_id_$i"}); |
189 | 189 |
if ($bt_acc_trans) { |
... | ... | |
193 | 193 |
$form->{"record_forex_$i"} = 1; |
194 | 194 |
} |
195 | 195 |
} |
196 |
$form->{"fx_paid_$i"} = $form->{"paid_$i"} / $form->{"exchangerate_$i"};
|
|
197 |
$form->{"fx_totalpaid"} += $form->{"fx_paid_$i"};
|
|
198 |
} # end hook fx_paid
|
|
196 |
$form->{"defaultcurrency_paid_$i"} = $form->{"paid_$i"} * $form->{"exchangerate_$i"};
|
|
197 |
$form->{"defaultcurrency_totalpaid"} += $form->{"defaultcurrency_paid_$i"};
|
|
198 |
} # end hook defaultcurrency_paid
|
|
199 | 199 |
} |
200 | 200 |
} else { |
201 | 201 |
$form->{$key} = |
templates/webpages/ir/_payments.html | ||
---|---|---|
80 | 80 |
<td align="center"> |
81 | 81 |
[% SET forex = 'forex_' _ i %] |
82 | 82 |
[% SET exchangerate = 'exchangerate_' _ i %] |
83 |
[% SET fx_paid = 'fx_paid_' _ i %]
|
|
83 |
[% SET defaultcurrency_paid = 'defaultcurrency_paid_' _ i %]
|
|
84 | 84 |
[% SET record_forex = 'record_forex_' _ i %] |
85 | 85 |
[% IF $forex %] |
86 | 86 |
<input type="hidden" name="exchangerate_[% i %]" value="[% LxERP.format_amount($exchangerate, 5) %]"> |
87 | 87 |
<input type="hidden" name="record_forex_[% i %]" value="[% $record_forex %]"> |
88 | 88 |
<input type="hidden" name="forex_[% i %]" value="[% $forex %]"> |
89 |
<input type="hidden" name="fx_paid_[% i %]" value="[% $fx_paid %]">
|
|
90 |
[% LxERP.format_amount($forex, 5) %] = [% LxERP.format_amount($fx_paid, 5) %] [% currency %] </br>
|
|
89 |
<input type="hidden" name="defaultcurrency_paid_[% i %]" value="[% $defaultcurrency_paid %]">
|
|
90 |
[% LxERP.format_amount($forex, 5) %] = [% LxERP.format_amount($defaultcurrency_paid, 5) %] [% defaultcurrency %] </br>
|
|
91 | 91 |
[% IF $record_forex %][% 'bank transaction exchange rate' | $T8 %][%- ELSE %][% 'default exchange rate' | $T8 %][%- END %] |
92 | 92 |
[% ELSE %] |
93 | 93 |
[% IF $changeable %] |
... | ... | |
117 | 117 |
<td></td> |
118 | 118 |
<td></td> |
119 | 119 |
<td align="center">[%- 'Total' | $T8 %]</td> |
120 |
<td align="center">[% LxERP.format_amount(totalpaid, 2) | html %] [% defaultcurrency %]</td>
|
|
120 |
<td align="center">[% LxERP.format_amount(totalpaid, 2) | html %] [% currency %]</td> |
|
121 | 121 |
<td></td> |
122 | 122 |
[% IF show_exchangerate %] |
123 |
<td align="center">[% LxERP.format_amount(fx_totalpaid, 2) | html %] [% currency %]</td>
|
|
124 |
<input type="hidden" name="fx_totalpaid" value="[% fx_totalpaid %]">
|
|
123 |
<td align="center">[% LxERP.format_amount(defaultcurrency_totalpaid, 2) | html %] [% defaultcurrency %]</td>
|
|
124 |
<input type="hidden" name="defaultcurrency_totalpaid" value="[% defaultcurrency_totalpaid %]">
|
|
125 | 125 |
[% END %] |
126 | 126 |
</tr> |
127 | 127 |
[% UNLESS show_exchangerate %] |
Auch abrufbar als: Unified diff
Einkaufsrechnungen - fx_paid -> defaultcurrency_paid