diff options
author | Jonathan Prykop <jonathan@freeside.biz> | 2015-07-03 19:46:00 -0500 |
---|---|---|
committer | Jonathan Prykop <jonathan@freeside.biz> | 2015-07-03 19:46:00 -0500 |
commit | d1f83ecbaefdab8fbb3a05e87448f3351d9051b4 (patch) | |
tree | 9eba805ed0cc831284ccd6fa50cdeb97b97606f8 /fs_selfservice | |
parent | 32365ef65ca6a40b5262cf166543b1d84c6aa57d (diff) |
RT#34078: Payment History Report / Statement [various fixes, integrated with selfservice]
Diffstat (limited to 'fs_selfservice')
-rw-r--r-- | fs_selfservice/FS-SelfService/cgi/history.html | 41 |
1 files changed, 8 insertions, 33 deletions
diff --git a/fs_selfservice/FS-SelfService/cgi/history.html b/fs_selfservice/FS-SelfService/cgi/history.html index 605bc1cf5..0b6f9ceda 100644 --- a/fs_selfservice/FS-SelfService/cgi/history.html +++ b/fs_selfservice/FS-SelfService/cgi/history.html @@ -1,39 +1,14 @@ <%= include('header', 'Payment History') %> <%= -my $balance = 0; -my $style = 'text-align: left; margin: 0; padding: 0 1em 0 0;'; -my $moneystyle = 'text-align: right; margin: 0; padding: 0 1em 0 0;'; -my $col1 = "#ffffff"; -my $col2 = "#dddddd"; -my $col = $col1; -foreach my $item (@history) { - $balance += $$item{'amount'}; - $$item{'amount'} =~ s/^(-?)/$1$money_char/; - $out .= <<EOF; - <TR> - <TD style="$style background: $col;">$$item{'date_pretty'}</TD> - <TD style="$style background: $col;">$$item{'description'}</TD> - <TD style="$moneystyle background: $col;">$$item{'amount'}</TD> - </TR> -EOF - $col = $col eq $col1 ? $col2 : $col1; -} -$balance = sprintf('%.2f',$balance); -$balance =~ s/^(-?)/$1$money_char/; -$out = <<EOF; -<P>Balance: <B>$balance</B></P> -<TABLE style="margin: 0;" CELLSPACING="0"> - <TR> - <TH style="$style background: #ff9999;">Date</TH> - <TH style="$style background: #ff9999;">Description</TH> - <TH style="$moneystyle background: #ff9999;">Amount</TH> - </TR> -$out -</TABLE> -EOF +my $out = mason_comp( + 'session_id' => $session_id, + 'comp' => '/elements/customer-statement.html', + 'args' => [ + 'history' => \@history, + ] +); +$out->{'output'} || $out->{'error'}; %> -</TABLE> - <%= include('footer') %> |