X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Fedit%2Fprocess%2Fquotation_convert.html;h=dc00a88d30cd968aca052c8b6c3e0f8e4c4466ac;hp=b387d0607c1067dacabe75ede2c6be5b1d3e403e;hb=f7e13fe2f0a39fd277f2990e076b662f00c2b088;hpb=caaba136dc662ca8a5b4a221fac238b89945332a 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'; +}