prevent adding 0 value line items
authorjeff <jeff>
Wed, 6 Aug 2008 06:39:22 +0000 (06:39 +0000)
committerjeff <jeff>
Wed, 6 Aug 2008 06:39:22 +0000 (06:39 +0000)
FS/FS/part_pkg/voip_cdr.pm

index a7c1903..14f812f 100644 (file)
@@ -470,6 +470,9 @@ sub append_cust_bill_pkgs {
   my @details = ();
   my $charges = $self->calc_usage($cust_pkg, $sdate, \@details, $param);
 
+  return []
+    unless $charges;  # unless @details?
+
   my $cust_bill_pkg = new FS::cust_bill_pkg {
     'pkgnum'    => $cust_pkg->pkgnum,
     'setup'     => 0,