X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Fedit%2Fprocess%2Fquick-cust_pkg.cgi;h=a0958922e0190d70360c43b62de67999433825db;hp=c601567462aba92b5d304c86445521ab04bb426f;hb=8a0204b4a129a3c26dcca18ba401b2de26d22d2b;hpb=4cacb3fa439b56fc7c9a742b69ec3f6ffd660433 diff --git a/httemplate/edit/process/quick-cust_pkg.cgi b/httemplate/edit/process/quick-cust_pkg.cgi index c60156746..a0958922e 100644 --- a/httemplate/edit/process/quick-cust_pkg.cgi +++ b/httemplate/edit/process/quick-cust_pkg.cgi @@ -45,17 +45,27 @@ my $refnum = $1; $cgi->param('locationnum') =~ /^(\-?\d*)$/ or die 'illegal locationnum '. $cgi->param('locationnum'); my $locationnum = $1; +$cgi->param('discountnum') =~ /^(\-?\d*)$/ + or die 'illegal discountnum '. $cgi->param('discountnum'); +my $discountnum = $1; + my $cust_pkg = new FS::cust_pkg { - 'custnum' => $custnum, - 'pkgpart' => $pkgpart, - 'start_date' => ( scalar($cgi->param('start_date')) - ? str2time($cgi->param('start_date')) - : '' - ), - 'discountnum' => scalar($cgi->param('discountnum')), - 'refnum' => $refnum, - 'locationnum' => $locationnum, + 'custnum' => $custnum, + 'pkgpart' => $pkgpart, + 'start_date' => ( scalar($cgi->param('start_date')) + ? str2time($cgi->param('start_date')) + : '' + ), + 'refnum' => $refnum, + 'locationnum' => $locationnum, + 'discountnum' => $discountnum, + #for the create a new discount case + 'discountnum__type' => scalar($cgi->param('discountnum__type')), + 'discountnum_amount' => scalar($cgi->param('discountnum_amount')), + 'discountnum_percent' => scalar($cgi->param('discountnum_percent')), + 'discountnum_months' => scalar($cgi->param('discountnum_months')), + #'discountnum_disabled' => scalar($cgi->param('discountnum_disabled')), }; my %opt = ( 'cust_pkg' => $cust_pkg );