freeside/httemplate/edit part_pkg.cgi,1.50,1.51
ivan
ivan at pouncequick.420.am
Thu Mar 10 00:58:05 PST 2005
Update of /home/cvs/cvsroot/freeside/httemplate/edit
In directory pouncequick:/tmp/cvs-serv866
Modified Files:
part_pkg.cgi
Log Message:
fixes package editing problem with extraneous services showing up, closes: Bug#1170
Index: part_pkg.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/edit/part_pkg.cgi,v
retrieving revision 1.50
retrieving revision 1.51
diff -u -d -r1.50 -r1.51
--- part_pkg.cgi 31 Dec 2004 08:47:08 -0000 1.50
+++ part_pkg.cgi 10 Mar 2005 08:58:02 -0000 1.51
@@ -176,7 +176,16 @@
my @fixups = ();
my $count = 0;
my $columns = 3;
-my @part_svc = qsearch( 'part_svc', { 'disabled' => '' } );
+my @part_svc = qsearch(
+ 'part_svc',
+ {},
+ '',
+ "WHERE disabled IS NULL OR disabled = ''
+ OR 0 < ( SELECT quantity FROM pkg_svc
+ WHERE pkg_svc.svcpart = part_svc.svcpart
+ AND pkgpart = 72
+ )"
+);
foreach my $part_svc ( @part_svc ) {
my $svcpart = $part_svc->svcpart;
my $pkgpart = $cgi->param('clone') || $part_pkg->pkgpart;
@@ -206,7 +215,9 @@
print '></TD>';
}
print qq!<TD><A HREF="part_svc.cgi?!,$part_svc->svcpart,
- qq!">!, $part_svc->getfield('svc'), "</A></TD></TR>";
+ qq!">!, $part_svc->getfield('svc'), '</A>';
+ print ' (DISABLED)' if $part_svc->disabled =~ /^Y/i;
+ print '</TD></TR>';
# print "</TABLE></TD><TD>$thead" if ++$count == int(scalar(@part_svc) / 2);
$count+=1;
foreach ( 1 .. $columns-1 ) {
More information about the freeside-commits
mailing list