summaryrefslogtreecommitdiff
path: root/httemplate/edit/process/quotation_convert.html
diff options
context:
space:
mode:
Diffstat (limited to 'httemplate/edit/process/quotation_convert.html')
-rw-r--r--httemplate/edit/process/quotation_convert.html15
1 files changed, 13 insertions, 2 deletions
diff --git a/httemplate/edit/process/quotation_convert.html b/httemplate/edit/process/quotation_convert.html
index b387d0607..dc00a88d3 100644
--- a/httemplate/edit/process/quotation_convert.html
+++ b/httemplate/edit/process/quotation_convert.html
@@ -10,8 +10,19 @@ my $quotation = qsearchs( 'quotation' => {
quotationnum => scalar( $cgi->param('quotationnum') ),
} ) or die 'unknown quotationnum';
-my $cust_main = $quotation->convert_cust_main;
-errorpage($cust_main) unless ref($cust_main);# eq 'FS::cust_main';
+my $cust_main = $quotation->cust_main;
+if ( $cust_main ) {
+ my $error = $quotation->order;
+ errorpage($error) if $error;
+
+ #i should be part of the order transaction
+ $quotation->disabled('Y');
+ $quotation->replace;
+
+} else {
+ $cust_main = $quotation->convert_cust_main;
+ errorpage($cust_main) unless ref($cust_main);# eq 'FS::cust_main';
+}
</%init>