new mastercard ranges
[freeside.git] / httemplate / edit / process / quotation_convert.html
1 <% $cgi->redirect(popurl(3). 'view/cust_main.cgi?'. $cust_main->custnum ) %>
2 <%init>
3
4 #my $curuser = $FS::CurrentUser::CurrentUser;
5 #die "access denied" unless $curuser->access_right('Edit customer');
6
7 #my $conf = new FS::Conf;
8
9 my $quotation = qsearchs( 'quotation' => {
10   quotationnum => scalar( $cgi->param('quotationnum') ),
11 } ) or die 'unknown quotationnum';
12
13 my $cust_main = $quotation->cust_main;
14 if ( $cust_main ) {
15   my $error = $quotation->order;
16   errorpage($error) if $error;
17
18   #i should be part of the order transaction
19   $quotation->disabled('Y');
20   $quotation->replace;
21
22 } else {
23   $cust_main = $quotation->convert_cust_main;
24   errorpage($cust_main) unless ref($cust_main);# eq 'FS::cust_main';
25 }
26
27 </%init>
28