X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fpart_event%2FCondition.pm;h=d1d519683f16ec29552b1c1a4a9761761b960db7;hb=ff27c3f36240aee48ed50153dd5d8fe3ac3f2443;hp=fc69f1d0c6025387775fd9350bb18845283f9f14;hpb=a6fe07e49e3fc12169e801b1ed6874c3a5bd8500;p=freeside.git diff --git a/FS/FS/part_event/Condition.pm b/FS/FS/part_event/Condition.pm index fc69f1d0c..d1d519683 100644 --- a/FS/FS/part_event/Condition.pm +++ b/FS/FS/part_event/Condition.pm @@ -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"; } @@ -524,7 +525,7 @@ comparison to other integers is type-correct. sub condition_sql_option_integer { my ($class, $option, $driver_name) = @_; - my $integer = ($driver_name =~ /^mysql/) ? 'UNSIGNED INTEGER' : 'INTEGER'; + my $integer = (driver_name() =~ /^mysql/) ? 'UNSIGNED INTEGER' : 'INTEGER'; 'CAST( COALESCE('. $class->condition_sql_option($option).