RT#42043: Check for cancelled packages with a cancellation date age option [age_newes...
[freeside.git] / FS / FS / part_event / Condition.pm
index 60697c1..d1d5196 100644 (file)
@@ -52,6 +52,7 @@ sub eventtable_hashref {
     { 'cust_main'      => 1,
       'cust_bill'      => 1,
       'cust_pkg'       => 1,
+      'cust_pay'       => 1,
       'cust_pay_batch' => 1,
       'cust_statement' => 1,
       'svc_acct'       => 1,
@@ -311,7 +312,7 @@ sub option_age_from {
   } elsif ( $age =~ /^(\d+)d$/i ) {
     $mday -= $1;
   } elsif ( $age =~ /^(\d+)h$/i ) {
-    $hour -= $hour;
+    $hour -= $1;
   } else {
     die "unparsable age: $age";
   }