%doc> Examples: include( 'elements/report_cust_pay_or_refund.html', 'thing' => 'pay', 'name_singular' => 'payment', ) include( 'elements/report_cust_pay_or_refund.html', 'thing' => 'refund', 'name_singular' => 'refund', ) %doc> <& /elements/header.html, mt($title) &>
<& /elements/footer.html &> <%init> my %opt = @_; my $table = 'cust_'.$opt{'thing'}; my $name_singular = $opt{'name_singular'}; die "access denied" unless $FS::CurrentUser::CurrentUser->access_right('Financial reports'); my $void = $cgi->param('void') ? 1 : 0; my $unapplied = $cgi->param('unapplied') ? 1 : 0; my $title = $void ? "Voided $name_singular report" : $unapplied ? "Unapplied $name_singular report" : "\u$name_singular report" ; $table .= '_void' if $void; %init>