[freeside-commits] freeside/FS/FS cust_pkg.pm, 1.139, 1.140 Conf.pm, 1.325, 1.326
Ivan,,,
ivan at wavetail.420.am
Thu Oct 22 18:41:30 PDT 2009
Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail.420.am:/tmp/cvs-serv28311
Modified Files:
cust_pkg.pm Conf.pm
Log Message:
add cust_bill-consolidate_services config to collapse multiple phone numbers (or whatever) into as few lines as possible on invoices, RT#5223
Index: Conf.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/Conf.pm,v
retrieving revision 1.325
retrieving revision 1.326
diff -u -d -r1.325 -r1.326
--- Conf.pm 22 Oct 2009 12:50:04 -0000 1.325
+++ Conf.pm 23 Oct 2009 01:41:28 -0000 1.326
@@ -2902,6 +2902,13 @@
},
{
+ 'key' => 'cust_bill-consolidate_services',
+ 'section' => 'billing',
+ 'description' => 'Consolidate service display into fewer lines on invoices rather than one per service.',
+ 'type' => 'checkbox',
+ },
+
+ {
'key' => 'suspend_email_admin',
'section' => '',
'description' => 'Destination admin email address to enable suspension notices',
Index: cust_pkg.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/cust_pkg.pm,v
retrieving revision 1.139
retrieving revision 1.140
diff -u -d -r1.139 -r1.140
--- cust_pkg.pm 28 Sep 2009 15:55:12 -0000 1.139
+++ cust_pkg.pm 23 Oct 2009 01:41:28 -0000 1.140
@@ -1881,7 +1881,18 @@
if ( $num > $max_same_services ) {
push @labels, "$label ($num)";
} else {
- push @labels, map { "$label: $_" } @values;
+ if ( $conf->exists('cust_bill-consolidate_services') ) {
+ # push @labels, "$label: ". join(', ', @values);
+ while ( @values ) {
+ my $detail = "$label: ";
+ $detail .= shift(@values). ', '
+ while @values && length($detail.$values[0]) < 78;
+ $detail =~ s/, $//;
+ push @labels, $detail;
+ }
+ } else {
+ push @labels, map { "$label: $_" } @values;
+ }
}
}
More information about the freeside-commits
mailing list