From 0cf659eb8588378d2595881460b1c67e60400dc9 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 10 Apr 2021 00:26:28 +0200 Subject: [PATCH 1/3] Fix syntax error --- htdocs/product/class/api_products.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/product/class/api_products.class.php b/htdocs/product/class/api_products.class.php index a572d0946c4..6b26421d0f8 100644 --- a/htdocs/product/class/api_products.class.php +++ b/htdocs/product/class/api_products.class.php @@ -808,7 +808,7 @@ class Products extends DolibarrApi $sql .= ' WHERE t.entity IN ('.getEntity('product').')'; if ($supplier > 0) { - $sql .= " AND s.fk_soc = "((int) $supplier); + $sql .= " AND s.fk_soc = ".((int) $supplier); } if ($socid > 0) { // if external user $sql .= " AND s.fk_soc = ".((int) $socid); From 280d534b7ad0f11a2e5dd6c55ae6424bf68429ee Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 10 Apr 2021 00:29:32 +0200 Subject: [PATCH 2/3] Fix phpcs --- htdocs/fourn/class/fournisseur.commande.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/fourn/class/fournisseur.commande.class.php b/htdocs/fourn/class/fournisseur.commande.class.php index 94f1210041a..5f88a1a3f1e 100644 --- a/htdocs/fourn/class/fournisseur.commande.class.php +++ b/htdocs/fourn/class/fournisseur.commande.class.php @@ -2708,7 +2708,7 @@ class CommandeFournisseur extends CommonOrder if ($qty < $this->line->packaging) { $qty = $this->line->packaging; } else { - if (! empty($this->line->packaging) && ($qty % $this->line->packaging) > 0) { + if (! empty($this->line->packaging) && ($qty % $this->line->packaging) > 0) { $coeff = intval($qty / $this->line->packaging) + 1; $qty = $this->line->packaging * $coeff; setEventMessage($langs->trans('QtyRecalculatedWithPackaging'), 'mesgs'); From 83e272951fb3e265c71af3ef0d9c7fe1c4d73eca Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 10 Apr 2021 00:31:20 +0200 Subject: [PATCH 3/3] Fix phpcs --- htdocs/core/lib/website2.lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/lib/website2.lib.php b/htdocs/core/lib/website2.lib.php index 675c691c624..6510d5fff8d 100644 --- a/htdocs/core/lib/website2.lib.php +++ b/htdocs/core/lib/website2.lib.php @@ -108,7 +108,7 @@ function dolSavePageAlias($filealias, $object, $objectpage) $dirname = dirname($filealias); $filename = basename($filealias); foreach (explode(',', $object->otherlang) as $sublang) { - // Avoid to erase main alias file if $sublang is empty string + // Avoid to erase main alias file if $sublang is empty string if (empty(trim($sublang))) continue; $filealiassub = $dirname.'/'.$sublang.'/'.$filename;