<& /elements/header-popup.html, 'Change payment package' &> <& /elements/error.html &>

<% mt('Payment') |h %> <% ntable("#cccccc", 2) %> <% mt('Date') |h %> <% time2str($date_format.' %r',$cust_pay->_date) |h %> <% mt('Amount') |h %> <% $money_char. $cust_pay->paid %> <% mt('by') |h %> <% mt(FS::payby->payname($cust_pay->payby)) |h %> % if ( $cust_pay->payby eq 'BILL' ) { <% mt('Check #') |h %> <% $cust_pay->payinfo |h %> % } elsif ( $cust_pay->payby eq 'CASH' and $conf->exists('require_cash_deposit_info') ) { <% mt('Bank') |h %> <% $cust_pay->bank |h %> <% mt('Check #') |h %> <% $cust_pay->payinfo |h %> <% mt('Teller #') |h %> <% $cust_pay->teller |h %> <% mt('Depositor') |h %> <% $cust_pay->depositor |h %> <% mt('Account #') |h %> <% $cust_pay->account |h %> % } % if ( $conf->exists('pkg-balances') ) { % $cgi->param('pkgnum', $cust_pay->pkgnum); <& /elements/tr-select-cust_pkg-balances.html, 'custnum' => $cust_pay->custnum, 'cgi' => $cgi, &> % } else { % }
<%init> my $conf = new FS::Conf; my $money_char = $conf->config('money_char') || '$'; my $date_format = $conf->config('date_format') || '%m/%d/%Y'; die "access denied" unless $FS::CurrentUser::CurrentUser->access_right('Apply payment'); #own ACL? my $cust_pay = qsearchs({ 'select' => 'cust_pay.*', 'table' => 'cust_pay', 'addl_from' => 'LEFT JOIN cust_main USING ( custnum )', 'hashref' => { paynum => scalar($cgi->param('paynum')), }, 'extra_sql' => ' AND '. $FS::CurrentUser::CurrentUser->agentnums_sql, }) or die 'unknown payment';