2 % $cgi->param('error', $error);
3 <% $cgi->redirect(popurl(2). 'cust_pay-pkgnum.html?'. $cgi->query_string ) %>
5 <& /elements/header-popup.html, emt('Payment package changed') &>
6 <SCRIPT TYPE="text/javascript">
14 my $conf = FS::Conf->new;
17 unless $FS::CurrentUser::CurrentUser->access_right('Apply credit'); #own ACL?
19 $cgi->param('paynum') =~ /^(\d+)$/
20 or die "Illegal paynum: ". $cgi->param('paynum');
23 my $cust_pay = qsearchs({
24 'select' => 'cust_pay.*',
25 'table' => 'cust_pay',
26 'addl_from' => 'LEFT JOIN cust_main USING ( custnum )',
27 'hashref' => { paynum => scalar($cgi->param('paynum')), },
28 'extra_sql' => ' AND '. $FS::CurrentUser::CurrentUser->agentnums_sql,
30 or die 'unknown payment';
32 $cust_pay->pkgnum( $cgi->param('pkgnum') );
33 my $error = $cust_pay->replace;