diff options
author | ivan <ivan> | 2012-01-03 05:10:27 +0000 |
---|---|---|
committer | ivan <ivan> | 2012-01-03 05:10:27 +0000 |
commit | 62e88a3f8fb39a772367bd6eddfaffbdd521e1af (patch) | |
tree | 8590cfa319e76afbdf77c905d9291d8e57041de6 /FS/FS/cust_bill.pm | |
parent | 33668d4e9e8e538f75a4b6ef7958d27a98eb3a9d (diff) |
add option for "Month of MMM" line item date style, RT#15858
Diffstat (limited to 'FS/FS/cust_bill.pm')
-rw-r--r-- | FS/FS/cust_bill.pm | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/FS/FS/cust_bill.pm b/FS/FS/cust_bill.pm index 41ff6aaa9..7f6b3b9a9 100644 --- a/FS/FS/cust_bill.pm +++ b/FS/FS/cust_bill.pm @@ -4986,11 +4986,20 @@ sub _items_cust_bill_pkg { 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 |