FIX: holiday: balances not updated correctly with pgsql because of case sensitivity

This commit is contained in:
Marc de Lima Lucio 2021-07-05 16:31:33 +02:00
parent 246f7b054e
commit eea90cef56

View File

@ -2112,7 +2112,7 @@ class Holiday extends CommonObject
{ {
global $mysoc; global $mysoc;
$sql = "SELECT rowid, code, label, affect, delay, newByMonth"; $sql = "SELECT rowid, code, label, affect, delay, newbymonth";
$sql .= " FROM ".MAIN_DB_PREFIX."c_holiday_types"; $sql .= " FROM ".MAIN_DB_PREFIX."c_holiday_types";
$sql .= " WHERE (fk_country IS NULL OR fk_country = ".$mysoc->country_id.')'; $sql .= " WHERE (fk_country IS NULL OR fk_country = ".$mysoc->country_id.')';
if ($active >= 0) $sql .= " AND active = ".((int) $active); if ($active >= 0) $sql .= " AND active = ".((int) $active);
@ -2126,7 +2126,7 @@ class Holiday extends CommonObject
{ {
while ($obj = $this->db->fetch_object($result)) while ($obj = $this->db->fetch_object($result))
{ {
$types[$obj->rowid] = array('rowid'=> $obj->rowid, 'code'=> $obj->code, 'label'=>$obj->label, 'affect'=>$obj->affect, 'delay'=>$obj->delay, 'newByMonth'=>$obj->newByMonth); $types[$obj->rowid] = array('rowid'=> $obj->rowid, 'code'=> $obj->code, 'label'=>$obj->label, 'affect'=>$obj->affect, 'delay'=>$obj->delay, 'newByMonth'=>$obj->newbymonth);
} }
return $types; return $types;