From 408d2d8d90fa1f2674902ffdec7844b1d18bbf50 Mon Sep 17 00:00:00 2001
From: Ivan Kohler <ivan@freeside.biz>
Date: Tue, 30 Dec 2014 19:24:42 -0800
Subject: [PATCH 1/1] add condition on "Invoice is newer than last payment type
 change", RT#31185

---
 FS/FS/part_event/Condition/cust_bill_age_before_payby.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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..96d9da8d8 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
-- 
2.20.1