[freeside-commits] freeside/FS/FS cust_pkg.pm, 1.139, 1.139.2.1 Conf.pm, 1.324, 1.324.2.1
Ivan,,,
ivan at wavetail.420.am
Thu Oct 22 18:41:33 PDT 2009
Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail.420.am:/tmp/cvs-serv28315
Modified Files:
Tag: FREESIDE_1_9_BRANCH
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.324
retrieving revision 1.324.2.1
diff -u -d -r1.324 -r1.324.2.1
--- Conf.pm 8 Oct 2009 01:15:06 -0000 1.324
+++ Conf.pm 23 Oct 2009 01:41:31 -0000 1.324.2.1
@@ -2901,6 +2901,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.139.2.1
diff -u -d -r1.139 -r1.139.2.1
--- cust_pkg.pm 28 Sep 2009 15:55:12 -0000 1.139
+++ cust_pkg.pm 23 Oct 2009 01:41:31 -0000 1.139.2.1
@@ -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