Merge pull request #18094 from marc-dll/11.0_FIX_holiday_pgsql

FIX: holiday: balances not updated correctly with pgsql because of case sensitivity
This commit is contained in:
Laurent Destailleur 2021-07-06 14:47:08 +02:00 committed by GitHub
commit 026f38fe06
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2112,7 +2112,7 @@ class Holiday extends CommonObject
{
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 .= " WHERE (fk_country IS NULL OR fk_country = ".$mysoc->country_id.')';
if ($active >= 0) $sql .= " AND active = ".((int) $active);
@ -2126,7 +2126,7 @@ class Holiday extends CommonObject
{
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;