From 8acc996345752f44f9bf55eff088f03739019c33 Mon Sep 17 00:00:00 2001 From: levinse Date: Fri, 29 Apr 2011 12:10:50 +0000 Subject: apply discount to setup fees, part 1 of 2, RT11512 --- httemplate/edit/discount.html | 2 ++ httemplate/edit/process/cust_pkg_discount.html | 1 + httemplate/edit/process/quick-cust_pkg.cgi | 1 + 3 files changed, 4 insertions(+) (limited to 'httemplate/edit') diff --git a/httemplate/edit/discount.html b/httemplate/edit/discount.html index 6e0d8e1a7..b195eb37b 100644 --- a/httemplate/edit/discount.html +++ b/httemplate/edit/discount.html @@ -21,6 +21,7 @@ { field => 'months', type => 'text', size => 2, postfix => '
(blank for non-expiring discount)', }, + { field => 'setup', type => 'checkbox', value=>'Y', }, ], 'labels' => { 'discountnum' => 'Discount #', @@ -30,6 +31,7 @@ 'amount' => 'Amount ', 'percent' => 'Percentage ', 'months' => 'Duration (months)', + 'setup' => 'Apply to setup fees', }, 'viewall_dir' => 'browse', 'new_callback' => $new_callback, diff --git a/httemplate/edit/process/cust_pkg_discount.html b/httemplate/edit/process/cust_pkg_discount.html index ad9842a89..6f97a791e 100644 --- a/httemplate/edit/process/cust_pkg_discount.html +++ b/httemplate/edit/process/cust_pkg_discount.html @@ -39,6 +39,7 @@ my $cust_pkg_discount = new FS::cust_pkg_discount { 'amount' => scalar($cgi->param('discountnum_amount')), 'percent' => scalar($cgi->param('discountnum_percent')), 'months' => scalar($cgi->param('discountnum_months')), + 'setup' => scalar($cgi->param('discountnum_setup')), #'disabled' => $self->discountnum_disabled, }; my $error = $cust_pkg_discount->insert; diff --git a/httemplate/edit/process/quick-cust_pkg.cgi b/httemplate/edit/process/quick-cust_pkg.cgi index aed07df23..44c06c181 100644 --- a/httemplate/edit/process/quick-cust_pkg.cgi +++ b/httemplate/edit/process/quick-cust_pkg.cgi @@ -66,6 +66,7 @@ my $cust_pkg = new FS::cust_pkg { 'discountnum_amount' => scalar($cgi->param('discountnum_amount')), 'discountnum_percent' => scalar($cgi->param('discountnum_percent')), 'discountnum_months' => scalar($cgi->param('discountnum_months')), + 'discountnum_setup' => scalar($cgi->param('discountnum_setup')), 'contract_end' => ( scalar($cgi->param('contract_end')) ? parse_datetime($cgi->param('contract_end')) : '' -- cgit v1.2.1