disable quotation after ordering, #33852
authorMark Wells <mark@freeside.biz>
Mon, 27 Apr 2015 07:04:37 +0000 (00:04 -0700)
committerMark Wells <mark@freeside.biz>
Mon, 27 Apr 2015 07:06:18 +0000 (00:06 -0700)
FS/FS/ClientAPI/MyAccount/quotation.pm

index f3067f1..f19071a 100644 (file)
@@ -58,7 +58,6 @@ Returns a hashref describing the current quotation, containing:
 
 =cut
 
-use Data::Dumper;
 sub quotation_info {
   my $p = shift;
 
@@ -84,7 +83,6 @@ sub quotation_info {
       'detail_items' => \@items
     }
   ];
-  warn Dumper $sections;
 
   return { 'error' => '', 'sections' => $sections }
 }
@@ -225,6 +223,9 @@ sub quotation_order {
 
   my $error = $quotation->order;
 
+  $quotation->set('disabled' => 'Y');
+  $error ||= $quotation->replace;
+
   return { 'error' => $error };
 }