avoid spurious bash default usage category charges
authorjeff <jeff>
Wed, 19 May 2010 04:05:45 +0000 (04:05 +0000)
committerjeff <jeff>
Wed, 19 May 2010 04:05:45 +0000 (04:05 +0000)
FS/FS/cust_bill_pkg.pm

index 538d792..80077aa 100644 (file)
@@ -655,7 +655,10 @@ sub disintegrate {
       $cust_bill_pkg{''}->recur( $classless );
       $cust_bill_pkg{$class} = $cust_bill_pkg_usage;
     }
-    delete $cust_bill_pkg{''} unless $cust_bill_pkg{''}->recur;
+    warn "Unexpected classless usage value: ". $cust_bill_pkg{''}->recur
+      if ($cust_bill_pkg{''}->recur && $cust_bill_pkg{''}->recur < 0);
+    delete $cust_bill_pkg{''}
+      unless ($cust_bill_pkg{''}->recur && $cust_bill_pkg{''}->recur > 0);
   }
 
 #  # sort setup,recur,'', and the rest numeric && return