summaryrefslogtreecommitdiff
path: root/httemplate/edit/sales.html
blob: 5a7a49e5b001995720feb8d541722b4d94f80258 (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
32
33
34
<& elements/edit.html,
     'name_singular' => 'sales person',
     'table'         => 'sales',
     'fields'        => [ 'salesperson',
                          { field=>'agentnum', type=>'select-agent', disable_empty=>1, },
                          { field=>'sales_custnum', type=>'search-cust_main', },
                          { field=>'disabled', type=>'checkbox', value=>'Y', },
                        ],
     'labels'        => { 'salesnum'      => 'Sales Person',
                          'salesperson'   => 'Name',
                          'agentnum'      => 'Agent',
                          'sales_custnum' => 'Master customer',
                          'disabled'      => 'Disabled',
                        },
     'viewall_dir'   => 'browse',
     'agent_virt'    => 1,
     'html_bottom'   => sub {
                              my $sales = shift;

                              '<BR>'.
                              include('/elements/table-commissions.html',
                                        'source_obj'    => $sales,
                                        'link_table'    => 'sales_pkg_class',
                                        #'target_table' => 'pkg_class',
                                        'show_duration' => 1,
                                     );
                            },
&>
<%init>

die "access denied"
  unless $FS::CurrentUser::CurrentUser->access_right('Edit sales people');

</%init>