[freeside-commits] freeside/httemplate/elements select-part_pkg.html, 1.2, 1.3
Ivan,,,
ivan at wavetail.420.am
Sun Feb 8 17:49:31 PST 2009
Update of /home/cvs/cvsroot/freeside/httemplate/elements
In directory wavetail.420.am:/tmp/cvs-serv4506/httemplate/elements
Modified Files:
select-part_pkg.html
Log Message:
further work on agents editing own packages: fix fallout on package customization from turning agent_virt on in edit/part_pkg.cgi, add a "clone package" to package browse, like clone service, and have agent type selection disappear when you set an agentnum. RT#1331
Index: select-part_pkg.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/elements/select-part_pkg.html,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- select-part_pkg.html 8 Feb 2009 02:05:25 -0000 1.2
+++ select-part_pkg.html 9 Feb 2009 01:49:28 -0000 1.3
@@ -33,20 +33,6 @@
$opt{'records'} = delete $opt{'part_pkg'}
if $opt{'part_pkg'};
-#false laziness w/browse/part_pkg.cgi
-my $agentnums = join(',', $FS::CurrentUser::CurrentUser->agentnums);
-
-$opt{'extra_sql'} .=
- " AND ( agentnum IS NOT NULL
- OR 0 < ( SELECT COUNT(*)
- FROM type_pkgs
- LEFT JOIN agent_type USING ( typenum )
- LEFT JOIN agent AS typeagent USING ( typenum )
- WHERE type_pkgs.pkgpart = part_pkg.pkgpart
- AND typeagent.agentnum IN ($agentnums)
- )
- )
- ";
-#eofalse
+$opt{'extra_sql'} .= ' AND '. FS::part_pkg->curuser_pkgs_sql;
</%init>
More information about the freeside-commits
mailing list