blob: 2d4cd183da5412fe8b6cbb51df213a06dedd4743 (
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
35
|
<%doc>
Example:
include( '/elements/select-cust-part_pkg.html',
#required
'cust_main' => $cust_main, #or 'custnum' ?
#strongly recommended (you want your forms to be "sticky" on errors, right?)
'curr_value' => 'current_value',
#opt
'part_pkg' => \@records,
#select-table.html options
)
</%doc>
<& /elements/select-part_pkg.html,
'empty_label' => emt('Select package'), #? need here in case removed
#from select-part_pkg ??
%opt,
&>
<%init>
my( %opt ) = @_;
my $cust_or_prospect_main = $opt{'cust_main'} || $opt{'prospect_main'}
or die "neither cust_main nor prospect_main specified";
$opt{'extra_sql'} .= ' AND '. FS::part_pkg->agent_pkgs_sql( $cust_or_prospect_main->agent );
</%init>
|