From: ivan Date: Thu, 1 Dec 2005 19:17:05 +0000 (+0000) Subject: list disabled packages on agent type edit if they are still associated with the type X-Git-Tag: BEFORE_FINAL_MASONIZE~272 X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=commitdiff_plain;h=4e368de88b732462775637b06377d9bdbe2712ed list disabled packages on agent type edit if they are still associated with the type --- diff --git a/httemplate/edit/agent_type.cgi b/httemplate/edit/agent_type.cgi index 684216335..84f4b6599 100755 --- a/httemplate/edit/agent_type.cgi +++ b/httemplate/edit/agent_type.cgi @@ -37,7 +37,15 @@ Agent Type Select which packages agents of this type may sell to customers
-<% foreach my $part_pkg ( qsearch('part_pkg',{ 'disabled' => '' }) ) { %> +<% foreach my $part_pkg ( + qsearch({ 'table' => 'part_pkg', + 'hashref' => { 'disabled' => '' }, + 'select' => 'part_pkg.*', + 'addl_from' => 'LEFT JOIN type_pkgs USING ( pkgpart )', + 'extra_sql' => 'OR typenum = '. $agent_type->typenum, + }) + ) { +%>
%> VALUE="ON"> <%= $part_pkg->pkgpart %>: - <%= $part_pkg->pkg %> (<%= $part_pkg->comment %>) + <%= $part_pkg->pkg %> - <%= $part_pkg->comment %> + <%= $part_pkg->disabled =~ /^Y/i ? ' (DISABLED)' : '' %> <% } %>