%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 $conf = new FS::Conf; 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; my $has_reason = dbdef->table($table)->column('reasonnum'); tie (my %payby, 'Tie::IxHash', 'CARD-VisaMC' => 'credit card (Visa/MasterCard)', 'CARD-Amex' => 'credit card (American Express)', 'CARD-Discover' => 'credit card (Discover)', 'CARD-Maestro' => 'credit card (Maestro/Switch/Solo)', 'CARD-Tokenized' => 'credit card (Tokenized)', 'CHEK' => 'electronic check / ACH', 'BILL' => 'check', 'CASH' => 'cash', 'PPAL' => 'Paypal', 'APPL' => 'Apple Store', 'ANRD' => 'Android Market', 'PREP' => 'prepaid card', 'WIRE' => 'wire transfer', 'WEST' => 'Western Union', 'IDTP' => 'IDT Payment Services', 'EDI' => 'Electronic Debit (EDI)', 'MCRD' => 'manual credit card', 'MCHK' => 'manual electronic check', ); %init>