Revision 33ddf79c
Von Jan Büren vor mehr als 3 Jahren hinzugefügt
bin/mozilla/rp.pl | ||
---|---|---|
1006 | 1006 |
|
1007 | 1007 |
my $report = SL::ReportGenerator->new(\%myconfig, $form); |
1008 | 1008 |
|
1009 |
my @columns = qw(statement ct invnumber transdate duedate amount open datepaid); |
|
1009 |
my @columns = qw(statement ct invnumber transdate duedate amount open datepaid current_open);
|
|
1010 | 1010 |
my %column_defs = ( |
1011 | 1011 |
'statement' => { raw_header_data => SL::Presenter::Tag::checkbox_tag("checkall", checkall => '[name^=statement_]'), 'visible' => $form->{ct} eq 'customer' ? 'HTML' : 0, align => "center" }, |
1012 | 1012 |
'ct' => { 'text' => $form->{ct} eq 'customer' ? $locale->text('Customer') : $locale->text('Vendor'), }, |
... | ... | |
1015 | 1015 |
'duedate' => { 'text' => $locale->text('Due'), }, |
1016 | 1016 |
'amount' => { 'text' => $locale->text('Amount'), }, |
1017 | 1017 |
'open' => { 'text' => $locale->text('Open'), }, |
1018 |
'datepaid' => { 'text' => $locale->text('Date Paid'), visible => ($form->{reporttype} eq 'custom') }, |
|
1018 |
'datepaid' => { 'text' => $locale->text('Date of Last Payment'), visible => ($form->{reporttype} eq 'custom') }, |
|
1019 |
'current_open' => { 'text' => $locale->text('Open Amount at Last Payment Date'), visible => ($form->{reporttype} eq 'custom') }, |
|
1019 | 1020 |
); |
1020 | 1021 |
|
1021 | 1022 |
my %column_alignment = ('statement' => 'center', |
1022 |
map { $_ => 'right' } qw(open amount)); |
|
1023 |
map { $_ => 'right' } qw(open amount current_open datepaid));
|
|
1023 | 1024 |
|
1024 | 1025 |
$report->set_options('std_column_visibility' => 1); |
1025 | 1026 |
$report->set_columns(%column_defs); |
... | ... | |
1048 | 1049 |
$form->{title} = sprintf($locale->text('Ap aging on %s'), $form->{todate}); |
1049 | 1050 |
} |
1050 | 1051 |
|
1051 |
if ($form->{fromdate}) { |
|
1052 |
push @options, $locale->text('for Period') . " " . $locale->text('From') . " " .$locale->date(\%myconfig, $form->{fromdate}, 1) . " " . $locale->text('Bis') . " " . $locale->date(\%myconfig, $form->{todate}, 1); |
|
1052 |
if ($form->{reporttype} eq 'free') { |
|
1053 |
if ($form->{fromdate}) { |
|
1054 |
push @options, $locale->text('for Period') . " " . $locale->text('From') . " " . |
|
1055 |
$locale->date(\%myconfig, $form->{fromdate}, 1) . " " . |
|
1056 |
$locale->text('Bis') . " " . $locale->date(\%myconfig, $form->{todate}, 1); |
|
1057 |
} else { |
|
1058 |
push @options, $locale->text('for Period') . " " . $locale->text('Bis') . " " . |
|
1059 |
$locale->date(\%myconfig, $form->{todate}, 1); |
|
1060 |
} |
|
1061 |
} elsif ($form->{reporttype} eq 'custom') { |
|
1062 |
push @options, $locale->text('Reference day') . " " . $locale->date(\%myconfig, $form->{fordate}, 1); |
|
1053 | 1063 |
} else { |
1054 |
push @options, $locale->text('for Period') . " " . $locale->text('Bis') . " " . $locale->date(\%myconfig, $form->{todate}, 1);
|
|
1064 |
die "Unknown reporttype for aging";
|
|
1055 | 1065 |
} |
1056 | 1066 |
|
1057 | 1067 |
$attachment_basename = $form->{ct} eq 'customer' ? $locale->text('ar_aging_list') : $locale->text('ap_aging_list'); |
... | ... | |
1066 | 1076 |
|
1067 | 1077 |
my $previous_ctid = 0; |
1068 | 1078 |
my $row_idx = 0; |
1069 |
my @periods = qw(open amount); |
|
1079 |
my @periods = qw(open amount current_open);
|
|
1070 | 1080 |
my %subtotals = map { $_ => 0 } @periods; |
1071 | 1081 |
my %totals = map { $_ => 0 } @periods; |
1072 | 1082 |
|
Auch abrufbar als: Unified diff
Für #485 Offene Forderungen zum Stichtag mit aktuellem Status
Liefert den aktuell offenen Betrag zum aktuell letztem Zahlungsdatum