"on hold" package ordering and status, RT#28508
[freeside.git] / httemplate / edit / process / quick-cust_pkg.cgi
index c3ab6fe..f1d8c26 100644 (file)
@@ -110,10 +110,6 @@ my $error = '';
 my %hash = (
     'pkgpart'              => $pkgpart,
     'quantity'             => $quantity,
-    'start_date'           => ( scalar($cgi->param('start_date'))
-                                  ? parse_datetime($cgi->param('start_date'))
-                                  : ''
-                              ),
     'salesnum'             => $salesnum,
     'refnum'               => $refnum,
     'contactnum'           => $contactnum,
@@ -133,6 +129,14 @@ my %hash = (
 );
 $hash{'custnum'} = $cust_main->custnum if $cust_main;
 
+if ( $cgi->param('start') eq 'on_hold' ) {
+  $hash{'susp'} = 'now';
+} elsif ( $cgi->param('start') eq 'on_date' ) {
+  $hash{'start_date'} = scalar($cgi->param('start_date'))
+                          ? parse_datetime($cgi->param('start_date'))
+                          : '';
+}
+
 my @cust_pkg_usageprice = ();
 foreach my $quantity_param ( grep { $cgi->param($_) && $cgi->param($_) > 0 }
                                grep /^usagepricenum(\d+)_quantity$/,