1 % if ( $sub eq 'discount_terms' ) {
4 % my $custnum = $cgi->param('arg');
5 % if ( $custnum =~ /^\d+$/ ) {
7 % $cust_main = qsearchs({
8 % 'table' => 'cust_main',
9 % 'hashref' => { 'custnum' => $custnum },
10 % 'extra_sql' => ' AND '. $FS::CurrentUser::CurrentUser->agentnums_sql,
14 % $return = [ map [ $_, sprintf("%d months", $_) ],
15 % $cust_main->discount_terms ];
19 <% encode_json($return) %>\
23 my $conf = new FS::Conf;
25 my $sub = $cgi->param('sub');