X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=sidebyside;f=bin%2Fmozilla%2Fca.pl;h=229e43004c24b4e5671f244c4dd39e0a9e2ce9e1;hb=1d027d8883ed6b13cf6c78b95b3493acc1fb715f;hp=d2fab4888aad57ccdbddeab786005e908ee1118e;hpb=18da4a96827fd65559a6f64334c3d8a313884f84;p=kivitendo-erp.git diff --git a/bin/mozilla/ca.pl b/bin/mozilla/ca.pl index d2fab4888..229e43004 100644 --- a/bin/mozilla/ca.pl +++ b/bin/mozilla/ca.pl @@ -299,6 +299,7 @@ sub list_transactions { my $idx = 0; my %totals = ( 'debit' => 0, 'credit' => 0 ); my %subtotals = ( 'debit' => 0, 'credit' => 0 ); + my ($previous_index, $row_set); foreach my $ca (@{ $form->{CA} }) { $form->{balance} += $ca->{amount}; @@ -320,9 +321,20 @@ sub list_transactions { }; } - $row->{reference}->{link} = build_std_url("script=$ca->{module}.pl", 'action=edit', 'id=' . E($ca->{id}), 'callback'); + if ($ca->{index} ne $previous_index) { + $report->add_data($row_set) if ($row_set); - $report->add_data($row); + $row_set = [ ]; + $previous_index = $ca->{index}; + + $row->{reference}->{link} = build_std_url("script=$ca->{module}.pl", 'action=edit', 'id=' . E($ca->{id}), 'callback'); + + } else { + map { $row->{$_}->{data} = '' } qw(reference description); + $row->{transdate}->{data} = '' if ($form->{sort} eq 'transdate'); + } + + push @{ $row_set }, $row; if (($form->{l_subtotal} eq 'Y') && (($idx == scalar @{ $form->{CA} } - 1)