X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fpart_event%2FCondition%2Fcust_bill_age_before_payby.pm;h=5a81fbbd015c64013a1cfa44fb9d55a9e1e65288;hb=HEAD;hp=273f508d95d1df9d7d2994556507204d364096aa;hpb=357211ff7f54864dbc04876db6e84580e02e807c;p=freeside.git diff --git a/FS/FS/part_event/Condition/cust_bill_age_before_payby.pm b/FS/FS/part_event/Condition/cust_bill_age_before_payby.pm index 273f508d9..5a81fbbd0 100644 --- a/FS/FS/part_event/Condition/cust_bill_age_before_payby.pm +++ b/FS/FS/part_event/Condition/cust_bill_age_before_payby.pm @@ -20,7 +20,7 @@ sub condition { #my $cust_main = $cust_bill->cust_main; my $change_date = 0; - my $newest = 4294967295; #2^32-1 + my $newest = 2147483647; #2038 problem, because the field does #this is pretty expensive, it would be way more efficient to check for # changed payby in SQL @@ -34,12 +34,12 @@ sub condition { 'order_by' => 'ORDER BY history_date DESC LIMIT 1', })) { - my $newest = $replace_new->history_date; + $newest = $replace_new->history_date; my $replace_old = qsearchs({ 'table' => 'h_cust_main', 'hashref' => { 'custnum' => $replace_new->custnum, 'history_action' => 'replace_old', - 'history_date' => $replace_new->history_date, + 'history_date' => $replace_new->history_date, #fuzz? } }) or next; #no replace_old? ignore and continue on i guess