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