don't set %item_dates for custom invoice formats if package option disable_line_item_...
authorIvan Kohler <ivan@freeside.biz>
Thu, 27 Dec 2012 00:12:45 +0000 (16:12 -0800)
committerIvan Kohler <ivan@freeside.biz>
Thu, 27 Dec 2012 00:12:45 +0000 (16:12 -0800)
FS/FS/Template_Mixin.pm

index 025e0d1..adab9d5 100644 (file)
@@ -2239,7 +2239,9 @@ sub _items_cust_bill_pkg {
 
         # start/end dates for invoice formats that do nonstandard 
         # things with them
-        my %item_dates = map { $_ => $cust_bill_pkg->$_ } ('sdate', 'edate');
+        my %item_dates = ();
+        %item_dates = map { $_ => $cust_bill_pkg->$_ } ('sdate', 'edate')
+          unless $cust_pkg->part_pkg->option('disable_line_item_date_ranges',1);
 
         if (    (!$type || $type eq 'S')
              && (    $cust_bill_pkg->setup != 0