1 <% encode_json( \@return ) %>\
4 # default returned records must maintain consistency with /elements/select-part_pkg.html
6 my $extra_sql = ' WHERE ' . FS::part_pkg->curuser_pkgs_sql;
8 # equivalent to agent_virt=1 and agent_null=1 in /elements/select-table.html
9 $extra_sql .= ' AND ' .
10 $FS::CurrentUser::CurrentUser->agentnums_sql(
14 my @records = qsearch( {
15 'table' => 'part_pkg',
17 'extra_sql' => $extra_sql,
18 'order_by' => "ORDER BY pkg",
23 'pkgpart' => $_->pkgpart,
24 'label' => $_->pkg_comment_only,
25 'disabled' => $_->disabled,