summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjeff <jeff>2007-06-06 22:34:19 +0000
committerjeff <jeff>2007-06-06 22:34:19 +0000
commit32c73194ceb8bacbaffea7a5bd802c293bb979a0 (patch)
treec2b8c3f1672fb832fdda9b35d74c2a8ba177b255
parent5d94787d261653677b64bda02166d59aadf98e9a (diff)
service dates on invoices optional (#1658)
-rw-r--r--FS/FS/Conf.pm8
-rw-r--r--FS/FS/cust_bill.pm26
2 files changed, 28 insertions, 6 deletions
diff --git a/FS/FS/Conf.pm b/FS/FS/Conf.pm
index bcfa5f6bb..394ffeb02 100644
--- a/FS/FS/Conf.pm
+++ b/FS/FS/Conf.pm
@@ -1804,7 +1804,13 @@ httemplate/docs/config.html
'type' => 'text',
},
+ {
+ 'key' => 'disable_line_item_date_ranges',
+ 'section' => 'billing',
+ 'description' => 'Prevent freeside from automatically generating date ranges on invoice line items.',
+ 'type' => 'checkbox',
+ },
+
);
1;
-
diff --git a/FS/FS/cust_bill.pm b/FS/FS/cust_bill.pm
index 3af0c54a8..b44dde63f 100644
--- a/FS/FS/cust_bill.pm
+++ b/FS/FS/cust_bill.pm
@@ -1548,8 +1548,12 @@ sub print_text {
if ( $cust_bill_pkg->recur != 0 ) {
push @buf, [
- "$desc (" . time2str("%x", $cust_bill_pkg->sdate) . " - " .
- time2str("%x", $cust_bill_pkg->edate) . ")",
+ $desc .
+ ( $conf->exists('disable_line_item_date_ranges')
+ ? ''
+ : " (" . time2str("%x", $cust_bill_pkg->sdate) . " - " .
+ time2str("%x", $cust_bill_pkg->edate) . ")"
+ ),
$money_char. sprintf("%10.2f", $cust_bill_pkg->recur)
];
push @buf,
@@ -2530,10 +2534,22 @@ sub _items_cust_bill_pkg {
}
if ( $cust_bill_pkg->recur != 0 ) {
+ push @buf, [
+ $desc .
+ ( $conf->exists('disable_line_item_date_ranges')
+ ? ''
+ : " (" . time2str("%x", $cust_bill_pkg->sdate) . " - " .
+ time2str("%x", $cust_bill_pkg->edate) . ")"
+ ),
+ $money_char. sprintf("%10.2f", $cust_bill_pkg->recur)
+ ];
push @b, {
- description => "$desc (" .
- time2str('%x', $cust_bill_pkg->sdate). ' - '.
- time2str('%x', $cust_bill_pkg->edate). ')',
+ description => $desc .
+ ( $conf->exists('disable_line_item_date_ranges')
+ ? ''
+ : " (" .time2str("%x", $cust_bill_pkg->sdate).
+ " - ".time2str("%x", $cust_bill_pkg->edate).")"
+ ),
#pkgpart => $part_pkg->pkgpart,
pkgnum => $cust_bill_pkg->pkgnum,
amount => sprintf("%.2f", $cust_bill_pkg->recur),