1 <% include( 'elements/edit.html',
3 'table' => 'quotation',
6 'quotationnum' => 'Quotation number',
7 'prospectnum' => 'Prospect',
8 'custnum' => 'Customer',
10 'close_date' => 'Close Date',
11 'confidence' => 'Confidence',
12 ($can_disable ? ('disabled' => 'Disabled') : ()),
15 { field=>'prospectnum', type=>'fixed-prospect_main' },
16 { field=>'custnum', type=>'fixed-cust_main' },
17 { field=>'_date', type=>'fixed-date' },
18 { field=>'close_date', type=>'input-date-field' },
19 { field=>'confidence', type=>'text', size=>3, postfix=>'%' },
20 ($can_disable ? { field=>'disabled', type=>'checkbox', value=>'Y'} : ()),
22 #XXX some way to disable the "view all"
23 'new_callback' => sub { my( $cgi, $quotation) = @_;
24 $quotation->$_( $cgi->param($_) )
25 foreach qw( prospectnum custnum );
26 $quotation->_date(time);
33 unless $FS::CurrentUser::CurrentUser->access_right('Generate quotation');
35 my $can_disable = $FS::CurrentUser::CurrentUser->access_right('Disable quotation');