diff options
author | jeff <jeff> | 2010-09-22 19:16:20 +0000 |
---|---|---|
committer | jeff <jeff> | 2010-09-22 19:16:20 +0000 |
commit | 5250c44bd7f282c7d782bf0e8349af12376929df (patch) | |
tree | b2afcd8e47270c6f5b78cff378849168d17ed765 /httemplate/misc/xmlhttp-cust_main-discount_terms.cgi | |
parent | 60ee9af0e885def0dd61f4a5506ac0e55d779e89 (diff) |
prepayment discounts rt#5318
Diffstat (limited to 'httemplate/misc/xmlhttp-cust_main-discount_terms.cgi')
-rw-r--r-- | httemplate/misc/xmlhttp-cust_main-discount_terms.cgi | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/httemplate/misc/xmlhttp-cust_main-discount_terms.cgi b/httemplate/misc/xmlhttp-cust_main-discount_terms.cgi new file mode 100644 index 000000000..71e2da597 --- /dev/null +++ b/httemplate/misc/xmlhttp-cust_main-discount_terms.cgi @@ -0,0 +1,24 @@ +% if ( $sub eq 'discount_terms' ) { +% +% my $return = []; +% my $custnum = $cgi->param('arg'); +% my $cust_main = ''; +% $cust_main = qsearchs({ +% 'table' => 'cust_main', +% 'hashref' => { 'custnum' => $custnum }, +% 'extra_sql' => ' AND '. $FS::CurrentUser::CurrentUser->agentnums_sql, +% }); +% +% if ($cust_main) { +% $return = [ map [ $_, "$_ months" ], $cust_main->discount_terms ]; +% } +% +<% objToJson($return) %> +% } +<%init> + +my $conf = new FS::Conf; + +my $sub = $cgi->param('sub'); + +</%init> |