From 5250c44bd7f282c7d782bf0e8349af12376929df Mon Sep 17 00:00:00 2001 From: jeff Date: Wed, 22 Sep 2010 19:16:20 +0000 Subject: prepayment discounts rt#5318 --- .../misc/xmlhttp-cust_main-discount_terms.cgi | 24 ++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 httemplate/misc/xmlhttp-cust_main-discount_terms.cgi (limited to 'httemplate/misc/xmlhttp-cust_main-discount_terms.cgi') 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'); + + -- cgit v1.2.1