[freeside-commits] freeside/FS/FS Conf.pm, 1.498, 1.499 cust_bill.pm, 1.367, 1.368
Ivan,,,
ivan at wavetail.420.am
Mon Jan 2 21:10:29 PST 2012
Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail.420.am:/tmp/cvs-serv10299/FS/FS
Modified Files:
Conf.pm cust_bill.pm
Log Message:
add option for "Month of MMM" line item date style, RT#15858
Index: Conf.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/Conf.pm,v
retrieving revision 1.498
retrieving revision 1.499
diff -u -w -d -r1.498 -r1.499
--- Conf.pm 30 Dec 2011 10:16:39 -0000 1.498
+++ Conf.pm 3 Jan 2012 05:10:27 -0000 1.499
@@ -3532,6 +3532,16 @@
},
{
+ 'key' => 'cust_bill-line_item-date_style',
+ 'section' => 'billing',
+ 'description' => 'Display format for line item date ranges on invoice line items.',
+ 'type' => 'select',
+ 'select_hash' => [ '' => 'STARTDATE-ENDDATE',
+ 'month_of' => 'Month of MONTHNAME',
+ ],
+ },
+
+ {
'key' => 'support_packages',
'section' => '',
'description' => 'A list of packages eligible for RT ticket time transfer, one pkgpart per line.', #this should really be a select multiple, or specified in the packages themselves...
Index: cust_bill.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/cust_bill.pm,v
retrieving revision 1.367
retrieving revision 1.368
diff -u -w -d -r1.367 -r1.368
--- cust_bill.pm 8 Dec 2011 21:13:16 -0000 1.367
+++ cust_bill.pm 3 Jan 2012 05:10:27 -0000 1.368
@@ -4986,11 +4986,20 @@
my $description = ($is_summary && $type && $type eq 'U')
? "Usage charges" : $desc;
- $description .= " (" . time2str($date_format, $cust_bill_pkg->sdate).
- " - ". time2str($date_format, $cust_bill_pkg->edate).
- ")"
- unless $conf->exists('disable_line_item_date_ranges')
- || $cust_pkg->part_pkg->option('disable_line_item_date_ranges',1);
+ unless (
+ $conf->exists('disable_line_item_date_ranges')
+ || $cust_pkg->part_pkg->option('disable_line_item_date_ranges',1)
+ ) {
+ my $time_period;
+ my $date_style = $conf->config('cust_bill-line_item-date_style');
+ if ( $date_style eq 'month_of' ) {
+ $time_period = time2str('The month of %B', $cust_bill_pkg->sdate);
+ } else {
+ $time_period = time2str($date_format, $cust_bill_pkg->sdate).
+ " - ". time2str($date_format, $cust_bill_pkg->edate);
+ }
+ $description .= " ($time_period)";
+ }
my @d = ();
my @seconds = (); # for display of usage info
More information about the freeside-commits
mailing list