Revision 7c9056f6
Von Jan Büren vor etwa 2 Jahren hinzugefügt
SL/Controller/BankTransaction.pm | ||
---|---|---|
707 | 707 |
$bank_transaction->exchangerate(undef); # maybe user reassigned bank_transaction |
708 | 708 |
} elsif ($default_rate != $fx_rate) { # set record (banktransaction) exchangerate |
709 | 709 |
$bank_transaction->exchangerate($fx_rate); # custom rate, will be displayed in ap, ir, is |
710 |
} elsif ($default_rate == $fx_rate) {
|
|
710 |
} elsif ($default_rate - $fx_rate < 0.001) {
|
|
711 | 711 |
# should be last valid state -> do nothing |
712 | 712 |
} else { die "Invalid exchange rate state:" . $default_rate . " " . $fx_rate; } |
713 | 713 |
|
... | ... | |
717 | 717 |
my $not_assigned_amount = abs($bank_transaction->not_assigned_amount); |
718 | 718 |
$amount_for_payment = $not_assigned_amount; |
719 | 719 |
$amount_for_payment *= -1 if $invoice->amount < 0; |
720 |
} elsif ($invoice->get_exchangerate > $fx_rate) { |
|
720 |
} elsif ($invoice->get_exchangerate >= $fx_rate) {
|
|
721 | 721 |
# if fx_gain do nothing, because gain |
722 | 722 |
# bla bla |
723 | 723 |
} else { |
Auch abrufbar als: Unified diff
Wechselkurs Zahlung ist identisch mit Wechselkurs Buchung. Rundungsfehler < 0.001