fix missing invoice details (RT#11561), but will this cause them to show up when...
[freeside.git] / FS / FS / cust_bill.pm
index 6e48c0c..2c58a98 100644 (file)
@@ -2551,8 +2551,10 @@ sub print_generic {
   my $max_edate = 0;
   foreach my $cust_bill_pkg ( $self->cust_bill_pkg ) {
     next unless $cust_bill_pkg->pkgnum > 0;
-    $min_sdate = $cust_bill_pkg->sdate if $cust_bill_pkg->sdate < $min_sdate;
-    $max_edate = $cust_bill_pkg->edate if $cust_bill_pkg->edate > $max_edate;
+    $min_sdate = $cust_bill_pkg->sdate
+      if length($cust_bill_pkg->sdate) && $cust_bill_pkg->sdate < $min_sdate;
+    $max_edate = $cust_bill_pkg->edate
+      if length($cust_bill_pkg->edate) && $cust_bill_pkg->edate > $max_edate;
   }
 
   $invoice_data{'bill_period'} = '';
@@ -4552,7 +4554,7 @@ sub _items_cust_bill_pkg {
             if $DEBUG > 1;
 
           push @d, $cust_bill_pkg->details(%details_opt)
-            unless ($is_summary || $type && $type eq 'R');
+            unless $is_summary; # || ($type && $type eq 'R');
 
           warn "$me _items_cust_bill_pkg calculating amount\n"
             if $DEBUG > 1;