disable quotation after ordering, #33852
[freeside.git] / 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 };
 }