summaryrefslogtreecommitdiff
path: root/bin/rp.pl
diff options
context:
space:
mode:
authortetragon <tetragon@4979c152-3d1c-0410-bac9-87ea11338e46>2007-10-19 23:28:25 +0000
committertetragon <tetragon@4979c152-3d1c-0410-bac9-87ea11338e46>2007-10-19 23:28:25 +0000
commit171bd4e6f2e17ab078a53c70f7ab6fea3ed4b65d (patch)
treed8ab3e963b17a3b4e50f2a569de9ba0717597c4d /bin/rp.pl
parent56bad0026c65026b9088be15e6d1956b8e9dd01e (diff)
Some fixes to the aging report templating
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@1798 4979c152-3d1c-0410-bac9-87ea11338e46
Diffstat (limited to 'bin/rp.pl')
-rw-r--r--bin/rp.pl19
1 files changed, 11 insertions, 8 deletions
diff --git a/bin/rp.pl b/bin/rp.pl
index 38da89eb..9bb230d9 100644
--- a/bin/rp.pl
+++ b/bin/rp.pl
@@ -1516,7 +1516,7 @@ sub aging {
if ( @{ $form->{all_language} } && $form->{arap} eq 'ar' ) {
push @column_index, "language";
- $form->{language_options} = [];
+ $form->{language_options} = [{text => ' ', value => ''}];
for ( @{ $form->{all_language} } ) {
push @{$form->{language_options}},
@@ -1611,7 +1611,7 @@ sub aging {
}
- push @currencies, {};
+ unshift @currencies, {};
$curr = $ref->{curr};
$currencies[0]{curr} = $curr;
}
@@ -1619,18 +1619,17 @@ sub aging {
$k++;
my %column_data;
- if ( $ctid != $ref->{ctid} ) {
-
+ if ( $ctid != $ref->{ctid} or $form->{summary}) {
$i++;
$column_data{ct} = $ref->{name};
-
+
$column_data{language} = {
name => "language_code_$i",
options => $form->{language_options},
default_value => $ref->{language_code},
} if $form->{language_options};
-
+
$column_data{statement} = {
name => "statement_$i",
type => 'checkbox',
@@ -1639,9 +1638,9 @@ sub aging {
$column_data{statement}{checked} = 'checked' if $ref->{checked};
$hiddens{"$form->{ct}_id_$i"} = $ref->{ctid};
$hiddens{"curr_$i"} = $ref->{curr};
-
}
+
$ctid = $ref->{ctid};
for (qw(c0 c30 c60 c90)) {
@@ -1689,13 +1688,16 @@ qq|$ref->{module}.pl?path=$form->{path}&action=edit&id=$ref->{id}&login=$form->{
$j++;
$j %= 2;
$column_data{i} = $j;
+ my $rowref = {};
+ $rowref->{$_} = $column_data{$_} for keys %column_data;
- push @{$currencies[0]{rows}}, \%column_data;
+ push @{$currencies[0]{rows}}, $rowref;
for (qw(ct statement language)) {
$column_data{$_} = ' ';
}
}
+ $column_data{ct} = $ref->{name};
# prepare subtotal
$nextid = ( $k <= $l ) ? $form->{AG}->[$k]->{ctid} : 0;
@@ -1994,6 +1996,7 @@ sub print {
}
my @batch_data = ();
+ my $selected;
for $i ( 1 .. $form->{rowcount} ) {