further work on agents editing own packages: fix fallout on package customization...
[freeside.git] / httemplate / elements / select-part_pkg.html
index a1d5f40..52b1cca 100644 (file)
@@ -17,6 +17,8 @@ Example:
 
 <% include( '/elements/select-table.html',
               'table'          => 'part_pkg',
+              'agent_virt'     => 1,
+              'agent_null'     => 1,
               'name_col'       => 'pkg',
               'empty_label'    => 'Select package', #should this be the default?
               'label_callback' => sub { shift->pkg_comment },
@@ -31,4 +33,6 @@ my( %opt ) = @_;
 $opt{'records'} = delete $opt{'part_pkg'}
   if $opt{'part_pkg'};
 
+$opt{'extra_sql'} .= ' AND '. FS::part_pkg->curuser_pkgs_sql;
+
 </%init>