#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
'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