Revision 713b3994
Von Sven Schöling vor mehr als 7 Jahren hinzugefügt
SL/Controller/BankTransaction.pm | ||
---|---|---|
126 | 126 |
$open_invoice->{realamount} = $::form->format_amount(\%::myconfig,$open_invoice->amount,2); |
127 | 127 |
$open_invoice->{skonto_type} = 'without_skonto'; |
128 | 128 |
foreach ( @{$all_open_sepa_export_items}) { |
129 |
if ( $_->ap_id == $open_invoice->id || $_->ar_id == $open_invoice->id ) {
|
|
129 |
if (($_->ap_id && $_->ap_id == $open_invoice->id) || ($_->ar_id && $_->ar_id == $open_invoice->id)) {
|
|
130 | 130 |
my $factor = ($_->ar_id == $open_invoice->id ? 1 : -1); |
131 | 131 |
#$main::lxdebug->message(LXDebug->DEBUG2(),"sepa_exitem=".$_->id." for invoice ".$open_invoice->id." factor=".$factor); |
132 | 132 |
$open_invoice->{realamount} = $::form->format_amount(\%::myconfig,$open_invoice->amount*$factor,2); |
... | ... | |
216 | 216 |
: abs(@{ $_->{proposals} }[0]->amount + $_->amount) < 0.01) |
217 | 217 |
} @{ $bank_transactions }; |
218 | 218 |
|
219 |
push @proposals, @otherproposals;
|
|
219 |
push @proposals, @otherproposals; |
|
220 | 220 |
|
221 | 221 |
# sort bank transaction proposals by quality (score) of proposal |
222 |
$bank_transactions = [ sort { $a->{agreement} <=> $b->{agreement} } @{ $bank_transactions } ] if $::form->{sort_by} eq 'proposal' and $::form->{sort_dir} == 1; |
|
223 |
$bank_transactions = [ sort { $b->{agreement} <=> $a->{agreement} } @{ $bank_transactions } ] if $::form->{sort_by} eq 'proposal' and $::form->{sort_dir} == 0; |
|
222 |
if ($::form->{sort_by} && $::form->{sort_by} eq 'proposal') { |
|
223 |
if ($::form->{sort_dir}) { |
|
224 |
$bank_transactions = [ sort { $a->{agreement} <=> $b->{agreement} } @{ $bank_transactions } ]; |
|
225 |
} else { |
|
226 |
$bank_transactions = [ sort { $b->{agreement} <=> $a->{agreement} } @{ $bank_transactions } ]; |
|
227 |
} |
|
228 |
} |
|
224 | 229 |
|
225 | 230 |
# for testing with t/bank/banktransaction.t : |
226 | 231 |
if ( $::form->{dont_render_for_test} ) { |
Auch abrufbar als: Unified diff
BankTransaction: Warnungen