Revision 0d37f1e8
Von Moritz Bunkus vor mehr als 9 Jahren hinzugefügt
bin/mozilla/ar.pl | ||
---|---|---|
33 | 33 |
|
34 | 34 |
use POSIX qw(strftime); |
35 | 35 |
use List::Util qw(sum first max); |
36 |
use List::UtilsBy qw(sort_by); |
|
36 | 37 |
|
37 | 38 |
use SL::AR; |
38 | 39 |
use SL::FU; |
... | ... | |
409 | 410 |
gldate => $form->{"gldate_$i"}, |
410 | 411 |
}; |
411 | 412 |
|
412 |
# default account for current assets (i.e. 1801 - SKR04) if no account is selected |
|
413 |
$form->{accno_arap} = IS->get_standard_accno_current_assets(\%myconfig, \%$form); |
|
413 |
# default account for current assets (i.e. 1801 - SKR04) if no account is selected
|
|
414 |
$form->{accno_arap} = IS->get_standard_accno_current_assets(\%myconfig, \%$form);
|
|
414 | 415 |
|
415 | 416 |
$payment->{selectAR_paid} = |
416 | 417 |
NTI($cgi->popup_menu('-name' => "AR_paid_$i", |
... | ... | |
429 | 430 |
push @payments, $payment; |
430 | 431 |
} |
431 | 432 |
|
433 |
my @empty = grep { $_->{paid} eq '' } @payments; |
|
434 |
@payments = ( |
|
435 |
(sort_by { DateTime->from_kivitendo($_->{datepaid}) } grep { $_->{paid} ne '' } @payments), |
|
436 |
@empty, |
|
437 |
); |
|
438 |
|
|
432 | 439 |
$form->{totalpaid} = sum map { $_->{paid} } @payments; |
433 | 440 |
|
434 | 441 |
$form->header; |
Auch abrufbar als: Unified diff
Rechnungen: Zahlungsein-/-ausgänge nach Datum sortieren