[freeside-commits] freeside/FS/FS Conf.pm, 1.468.2.29, 1.468.2.30 cust_bill.pm, 1.350.2.17, 1.350.2.18
Ivan,,,
ivan at wavetail.420.am
Mon Jan 2 21:10:28 PST 2012
Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail.420.am:/tmp/cvs-serv10305/FS/FS
Modified Files:
Tag: FREESIDE_2_3_BRANCH
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.468.2.29
retrieving revision 1.468.2.30
diff -u -w -d -r1.468.2.29 -r1.468.2.30
--- Conf.pm 19 Dec 2011 21:27:58 -0000 1.468.2.29
+++ Conf.pm 3 Jan 2012 05:10:25 -0000 1.468.2.30
@@ -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.350.2.17
retrieving revision 1.350.2.18
diff -u -w -d -r1.350.2.17 -r1.350.2.18
--- cust_bill.pm 8 Dec 2011 21:13:57 -0000 1.350.2.17
+++ cust_bill.pm 3 Jan 2012 05:10:25 -0000 1.350.2.18
@@ -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