[freeside-commits] freeside/FS/FS cust_pkg.pm,1.100,1.101
Ivan,,,
ivan at wavetail.420.am
Fri Oct 10 16:30:45 PDT 2008
Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail.420.am:/tmp/cvs-serv6681
Modified Files:
cust_pkg.pm
Log Message:
quick kludge to eliminate exact duplicates in h_labels_short in an effort to reduce the number of "XXX service listing twice on invoice" incidents, RT#3944. still should be possible to fundamentally do better with the function in the first place
Index: cust_pkg.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/cust_pkg.pm,v
retrieving revision 1.100
retrieving revision 1.101
diff -u -d -r1.100 -r1.101
--- cust_pkg.pm 12 Sep 2008 07:58:34 -0000 1.100
+++ cust_pkg.pm 10 Oct 2008 23:30:41 -0000 1.101
@@ -1504,7 +1504,8 @@
foreach $self->h_labels(@_);
my @labels;
foreach my $label ( keys %labels ) {
- my @values = @{ $labels{$label} };
+ my %seen = ();
+ my @values = grep { ! $seen{$_}++ } @{ $labels{$label} };
my $num = scalar(@values);
if ( $num > $max_same_services ) {
push @labels, "$label ($num)";
More information about the freeside-commits
mailing list