diff options
Diffstat (limited to 'FS')
| -rw-r--r-- | FS/FS/Conf.pm | 7 | ||||
| -rw-r--r-- | FS/FS/cust_bill.pm | 26 | 
2 files changed, 28 insertions, 5 deletions
diff --git a/FS/FS/Conf.pm b/FS/FS/Conf.pm index b91651429..3aa08fa7e 100644 --- a/FS/FS/Conf.pm +++ b/FS/FS/Conf.pm @@ -2119,6 +2119,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', +  }, +  ); diff --git a/FS/FS/cust_bill.pm b/FS/FS/cust_bill.pm index 91a0adc74..18771de81 100644 --- a/FS/FS/cust_bill.pm +++ b/FS/FS/cust_bill.pm @@ -1552,8 +1552,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, @@ -2488,10 +2492,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),  | 
