X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fedit%2Fprocess%2Fquick-cust_pkg.cgi;h=71f424ca3390c23690cae6520a32e6589b789d30;hb=eec4949e2c8f09a0b89331437186b77c4db6ff38;hp=7a0f08280e8d72ac3b5cb51f4166d67aab43f042;hpb=40a7b3dc653e099f7bd0bd762b649b04c4432db2;p=freeside.git diff --git a/httemplate/edit/process/quick-cust_pkg.cgi b/httemplate/edit/process/quick-cust_pkg.cgi index 7a0f08280..71f424ca3 100644 --- a/httemplate/edit/process/quick-cust_pkg.cgi +++ b/httemplate/edit/process/quick-cust_pkg.cgi @@ -45,16 +45,28 @@ 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')) - : '' - ), - 'refnum' => $refnum, - 'locationnum' => $locationnum, + 'custnum' => $custnum, + 'pkgpart' => $pkgpart, + 'start_date' => ( scalar($cgi->param('start_date')) + ? parse_datetime($cgi->param('start_date')) + : '' + ), + 'no_auto' => scalar($cgi->param('no_auto')), + '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 ); @@ -62,7 +74,7 @@ my %opt = ( 'cust_pkg' => $cust_pkg ); if ( $locationnum == -1 ) { my $cust_location = new FS::cust_location { map { $_ => scalar($cgi->param($_)) } - qw( custnum address1 address2 city county state zip country ) + qw( custnum address1 address2 city county state zip country geocode ) }; $opt{'cust_location'} = $cust_location; }