Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 18.0

This commit is contained in:
Laurent Destailleur 2024-01-16 13:33:37 +01:00
commit d26086324d
2 changed files with 6 additions and 3 deletions

View file

@ -2340,10 +2340,13 @@ class ExpenseReport extends CommonObject
*/
public function periode_existe($fuser, $date_debut, $date_fin)
{
global $conf;
// phpcs:enable
$sql = "SELECT rowid, date_debut, date_fin";
$sql .= " FROM ".MAIN_DB_PREFIX.$this->table_element;
$sql .= " WHERE fk_user_author = ".((int) $fuser->id);
$sql .= " WHERE entity = ".((int) $conf->entity); // not shared, only for the current entity
$sql .= " AND fk_user_author = ".((int) $fuser->id);
dol_syslog(get_class($this)."::periode_existe sql=".$sql);
$result = $this->db->query($sql);

View file

@ -175,8 +175,8 @@ if (($action == 'add' || $action == 'create') && empty($massaction) && !GETPOST(
$sanit_features[$explode[0]] = $explode[1];
$tmp = new ProductCombination2ValuePair($db);
$tmp->fk_prod_attr = $explode[0];
$tmp->fk_prod_attr_val = $explode[1];
$tmp->fk_prod_attr = (int) $explode[0];
$tmp->fk_prod_attr_val = (int) $explode[1];
$productCombination2ValuePairs1[] = $tmp;
}