Revision 1dc70903
Von Sven Schöling vor 11 Monaten hinzugefügt
SL/AP.pm | ||
---|---|---|
986 | 986 |
$form->{"forex_$j"} = $form->{"exchangerate_$i"}; |
987 | 987 |
$form->{"AP_paid_$j"} = $form->{acc_trans}{$key}->[$i-1]->{accno}; |
988 | 988 |
$form->{"paid_project_id_$j"} = $form->{acc_trans}{$key}->[$i - 1]->{project_id}; |
989 |
$form->{"defaultcurrency_paid_$j"} = $form->{acc_trans}{$key}->[$i - 1]->{defaultcurrency_paid}; |
|
990 |
$form->{"fx_transaction_$j"} = $form->{acc_trans}{$key}->[$i - 1]->{fx_transaction}; |
|
989 | 991 |
$form->{paidaccounts}++; |
990 | 992 |
|
991 | 993 |
} else { |
bin/mozilla/ap.pl | ||
---|---|---|
609 | 609 |
$form->{"record_forex_$i"} = 1; |
610 | 610 |
} |
611 | 611 |
} |
612 |
$form->{"defaultcurrency_paid_$i"} = $form->{"paid_$i"} * $form->{"exchangerate_$i"}; |
|
612 |
if (!$form->{"fx_transaction_$i"}) { |
|
613 |
# this is a banktransaction that was paid in internal currency. revert paid/defaultcurrency_paid |
|
614 |
$form->{"defaultcurrency_paid_$i"} = $form->{"paid_$i"}; |
|
615 |
$form->{"paid_$i"} /= $form->{"exchangerate_$i"}; |
|
616 |
} |
|
617 |
$form->{"defaultcurrency_paid_$i"} //= $form->{"paid_$i"} * $form->{"exchangerate_$i"}; |
|
613 | 618 |
$form->{"defaultcurrency_totalpaid"} += $form->{"defaultcurrency_paid_$i"}; |
614 | 619 |
} # end hook defaultcurrency_paid |
615 | 620 |
# format amounts |
templates/webpages/ap/form_header.html | ||
---|---|---|
374 | 374 |
[% temp_forex = "forex_"_ i %] |
375 | 375 |
[% SET defaultcurrency_paid = 'defaultcurrency_paid_' _ i %] |
376 | 376 |
[% SET record_forex = 'record_forex_' _ i %] |
377 |
|
|
377 |
[% SET fx_transaction = 'fx_transaction_' _ i %] |
|
378 | 378 |
|
379 | 379 |
[% IF( $temp_forex || !changeable ) %] |
380 | 380 |
[% $temp | html %] = [% LxERP.format_amount($defaultcurrency_paid,2) %] [% defaultcurrency %] </br> |
... | ... | |
385 | 385 |
<input name="[% temp %]" size="11" value="[% $temp | html %]"> |
386 | 386 |
[% END %] |
387 | 387 |
<input type=hidden name="[% temp_forex %]" value="[% $temp_forex | html %]"> |
388 |
<input type="hidden" name="[% fx_transaction %]" value="1"> |
|
388 | 389 |
</td> |
389 | 390 |
[% END %] |
390 | 391 |
|
Auch abrufbar als: Unified diff
AP: fx_transaction payments
Es wird jetzt das fx_transaction flag durchgereicht, wenn die Zahlung im
FGrontend angelegt wurde, oder in Fremdwährung in der Datenbank gefunden
wurde.
Interne Währungszahlungen werden initial ohne fx_transaction geladen,
dann aber wie "normale" Fremdbuchungen durchgereicht