customer quotations are work orders? RT#25561
[freeside.git] / httemplate / edit / quotation.html
1 <% include( 'elements/edit.html',
2                  'name'    => 'Quotation',
3                  'table'   => 'quotation',
4                  'menubar' => [],
5                  'labels'  => { 
6                                 'quotationnum' => 'Quotation number',
7                                 'prospectnum'  => 'Prospect',
8                                 'custnum'      => 'Customer',
9                                 '_date'        => 'Date',
10                                 'disabled'     => 'Disabled',
11                               },
12                  'fields'  => [
13                    { field=>'prospectnum', type=>'fixed-prospect_main' },
14                    { field=>'custnum',     type=>'fixed-cust_main' },
15                    { field=>'_date',       type=>'fixed-date' },
16                    { field=>'disabled',    type=>'checkbox', value=>'Y'},
17                               ],
18                  #XXX some way to disable the "view all"
19                  'new_callback' => sub { my( $cgi, $quotation) = @_;
20                                          $quotation->$_( $cgi->param($_) )
21                                            foreach qw( prospectnum custnum );
22                                          $quotation->_date(time);
23                                        },
24            )
25 %>
26 <%init>
27
28 die "access denied"
29   unless $FS::CurrentUser::CurrentUser->access_right('Generate quotation');
30
31 </%init>