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