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 },
25 'hashref' => { 'disabled' => '' },
33 $opt{'records'} = delete $opt{'part_pkg'}
36 #false laziness w/browse/part_pkg.cgi
37 my $agentnums = join(',', $FS::CurrentUser::CurrentUser->agentnums);
40 " AND ( agentnum IS NOT NULL
41 OR 0 < ( SELECT COUNT(*)
43 LEFT JOIN agent_type USING ( typenum )
44 LEFT JOIN agent AS typeagent USING ( typenum )
45 WHERE type_pkgs.pkgpart = part_pkg.pkgpart
46 AND typeagent.agentnum IN ($agentnums)