Ticket #33672 Apache starts before postgres
[freeside.git] / httemplate / elements / select-cust-part_pkg.html
1 <%doc>
2
3 Example:
4
5   include( '/elements/select-cust-part_pkg.html',
6
7     #required
8     'cust_main'  => $cust_main, #or 'custnum' ? 
9              
10     #strongly recommended (you want your forms to be "sticky" on errors, right?)
11     'curr_value' => 'current_value',
12   
13     #opt
14     'part_pkg'   => \@records,
15
16     #select-table.html options
17   )
18
19 </%doc>
20
21 <& /elements/select-part_pkg.html,
22               'empty_label'    => emt('Select package'), #? need here in case removed
23                                                     #from select-part_pkg ??
24               %opt,
25 &>
26 <%init>
27
28 my( %opt ) = @_;
29
30 my $cust_or_prospect_main = $opt{'cust_main'} || $opt{'prospect_main'}
31   or die "neither cust_main nor prospect_main specified";
32
33 $opt{'extra_sql'} .= ' AND '. FS::part_pkg->agent_pkgs_sql( $cust_or_prospect_main->agent );
34
35 </%init>