diff options
Diffstat (limited to 'httemplate')
-rw-r--r-- | httemplate/edit/process/quick-cust_pkg.cgi | 4 | ||||
-rw-r--r-- | httemplate/misc/order_pkg.html | 14 |
2 files changed, 18 insertions, 0 deletions
diff --git a/httemplate/edit/process/quick-cust_pkg.cgi b/httemplate/edit/process/quick-cust_pkg.cgi index fab85252b..ba4c5b1b6 100644 --- a/httemplate/edit/process/quick-cust_pkg.cgi +++ b/httemplate/edit/process/quick-cust_pkg.cgi @@ -48,6 +48,9 @@ die 'unknown custnum' unless $cust_main; $cgi->param('pkgpart') =~ /^(\d+)$/ or die 'illegal pkgpart '. $cgi->param('pkgpart'); my $pkgpart = $1; +$cgi->param('quantity') =~ /^(\d+)$/ + or die 'illegal quantity '. $cgi->param('quantity'); +my $quantity = $1; $cgi->param('refnum') =~ /^(\d*)$/ or die 'illegal refnum '. $cgi->param('refnum'); my $refnum = $1; @@ -78,6 +81,7 @@ if ( $cgi->param('qualnum') ) { my $cust_pkg = new FS::cust_pkg { 'custnum' => $custnum, 'pkgpart' => $pkgpart, + 'quantity' => $quantity, 'start_date' => ( scalar($cgi->param('start_date')) ? parse_datetime($cgi->param('start_date')) : '' diff --git a/httemplate/misc/order_pkg.html b/httemplate/misc/order_pkg.html index 2332f2028..7aa024a34 100644 --- a/httemplate/misc/order_pkg.html +++ b/httemplate/misc/order_pkg.html @@ -32,6 +32,15 @@ &> % } +% if ( $conf->exists('invoice-unitprice') ) { + <TR> + <TH ALIGN="right"><% mt('Quantity') |h %> </TD> + <TD> + <INPUT TYPE="text" NAME="quantity" SIZE=4 VALUE="<% $quantity %>"> + </TD> + </TR> +% } + <TR> <TH ALIGN="right"><% mt('Start date') |h %> </TD> <TD COLSPAN=6> @@ -163,6 +172,11 @@ if ( $cgi->param('lock_pkgpart') ) { my $pkgpart = $part_pkg ? $part_pkg->pkgpart : scalar($cgi->param('pkgpart')); +my $quantity = 1; +if ( $cgi->param('quantity') =~ /^\s*(\d+)\s*$/ ) { + $quantity = $1; +} + my $format = $date_format. ' %T %z (%Z)'; #false laziness w/REAL_cust_pkg.cgi? my $start_date = ''; if( ! $conf->exists('order_pkg-no_start_date') ) { |