5 include( '/elements/select-part_pkg.html',
7 #strongly recommended (you want your forms to be "sticky" on errors, right?)
8 'curr_value' => 'current_value',
11 'part_pkg' => \@records,
13 #select-table.html options
18 <% include( '/elements/select-table.html',
19 'table' => 'part_pkg',
23 'empty_label' => 'Select package', #should this be the default?
24 'label_callback' => sub { shift->pkg_comment },
26 'extra_option_attributes' => [ 'can_discount', 'can_start_date' ],
34 $opt{'records'} = delete $opt{'part_pkg'}
38 $hash{'disabled'} = '' unless $opt{'showdisabled'};
40 if ( exists($opt{'classnum'}) && defined($opt{'classnum'}) ) {
41 if ( $opt{'classnum'} > 0 ) {
42 $hash{'classnum'} = $opt{'classnum'};
43 } elsif ( $opt{'classnum'} eq '' || $opt{'classnum'} == 0 ) {
44 $hash{'classnum'} = '';
45 } #else -1 or not specified, all classes, so don't set classnum
48 $opt{'extra_sql'} .= ( keys(%hash) ? ' AND ' : ' WHERE ' ).
49 FS::part_pkg->curuser_pkgs_sql;