Revision c6db8930
Von Moritz Bunkus vor mehr als 5 Jahren hinzugefügt
SL/Controller/BankTransaction.pm | ||
---|---|---|
230 | 230 |
|
231 | 231 |
# sort bank transaction proposals by quality (score) of proposal |
232 | 232 |
if ($::form->{sort_by} && $::form->{sort_by} eq 'proposal') { |
233 |
if ($::form->{sort_dir}) { |
|
234 |
$bank_transactions = [ sort { $a->{agreement} <=> $b->{agreement} } @{ $bank_transactions } ]; |
|
235 |
} else { |
|
236 |
$bank_transactions = [ sort { $b->{agreement} <=> $a->{agreement} } @{ $bank_transactions } ]; |
|
237 |
} |
|
233 |
my $dir = $::form->{sort_dir} ? 1 : -1; |
|
234 |
$bank_transactions = [ sort { ($a->{agreement} <=> $b->{agreement}) * $dir } @{ $bank_transactions } ]; |
|
238 | 235 |
} |
239 | 236 |
|
240 | 237 |
# for testing with t/bank/banktransaction.t : |
Auch abrufbar als: Unified diff
BankTransaction: Sortierungscode vereinfacht