[freeside-commits] freeside/FS/FS cust_pkg.pm,1.73.2.22,1.73.2.23
Ivan,,,
ivan at wavetail.420.am
Fri Oct 10 16:36:19 PDT 2008
Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail.420.am:/tmp/cvs-serv6916
Modified Files:
Tag: FREESIDE_1_7_BRANCH
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.73.2.22
retrieving revision 1.73.2.23
diff -u -d -r1.73.2.22 -r1.73.2.23
--- cust_pkg.pm 12 Sep 2008 07:58:35 -0000 1.73.2.22
+++ cust_pkg.pm 10 Oct 2008 23:36:17 -0000 1.73.2.23
@@ -1380,7 +1380,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