From 82b3d89923f1a78605dad5e83b32eda66670808b Mon Sep 17 00:00:00 2001 From: Quentin VIAL-GOUTEYRON Date: Tue, 15 Feb 2022 11:31:09 +0100 Subject: [PATCH 1/3] FIX wieght is loose if it's comma on combinations --- htdocs/variants/combinations.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/variants/combinations.php b/htdocs/variants/combinations.php index 933d379e48a..0b08bd00758 100644 --- a/htdocs/variants/combinations.php +++ b/htdocs/variants/combinations.php @@ -235,7 +235,7 @@ if (($action == 'add' || $action == 'create') && empty($massaction) && !GETPOST( exit(); } - $prodcomb->variation_weight = $weight_impact; + $prodcomb->variation_weight = price2num($weight_impact); // for conf PRODUIT_MULTIPRICES if ($conf->global->PRODUIT_MULTIPRICES) { From 8b0280a9d2e656549f4164d3b857b515b4956f33 Mon Sep 17 00:00:00 2001 From: Alexis LAURIER Date: Wed, 16 Feb 2022 10:26:44 +0100 Subject: [PATCH 2/3] add missing entity check on list of withdraws on index of paymentbybanktransfert --- htdocs/compta/paymentbybanktransfer/index.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/compta/paymentbybanktransfer/index.php b/htdocs/compta/paymentbybanktransfer/index.php index 78425398017..1cb47d1c1dc 100644 --- a/htdocs/compta/paymentbybanktransfer/index.php +++ b/htdocs/compta/paymentbybanktransfer/index.php @@ -182,6 +182,7 @@ $limit = 5; $sql = "SELECT p.rowid, p.ref, p.amount, p.datec, p.statut"; $sql .= " FROM ".MAIN_DB_PREFIX."prelevement_bons as p"; $sql .= " WHERE p.type = 'bank-transfer'"; +$sql .= " AND p.entity IN (".getEntity('invoice').")"; $sql .= " ORDER BY datec DESC"; $sql .= $db->plimit($limit); From ff8dcdc4b7436d3ea206f471ab27aa9224462a67 Mon Sep 17 00:00:00 2001 From: Alexis LAURIER Date: Wed, 16 Feb 2022 10:52:20 +0100 Subject: [PATCH 3/3] manage details of prelevment line for bank transfer --- htdocs/compta/prelevement/line.php | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/htdocs/compta/prelevement/line.php b/htdocs/compta/prelevement/line.php index ccb60486c76..3e3ecb8e0ba 100644 --- a/htdocs/compta/prelevement/line.php +++ b/htdocs/compta/prelevement/line.php @@ -268,12 +268,20 @@ if ($id) $sql .= " FROM ".MAIN_DB_PREFIX."prelevement_bons as p"; $sql .= " , ".MAIN_DB_PREFIX."prelevement_lignes as pl"; $sql .= " , ".MAIN_DB_PREFIX."prelevement_facture as pf"; - $sql .= " , ".MAIN_DB_PREFIX."facture as f"; + if ($type == 'bank-transfer') { + $sql .= " , ".MAIN_DB_PREFIX."facture_fourn as f"; + } else { + $sql .= " , ".MAIN_DB_PREFIX."facture as f"; + } $sql .= " , ".MAIN_DB_PREFIX."societe as s"; $sql .= " WHERE pf.fk_prelevement_lignes = pl.rowid"; $sql .= " AND pl.fk_prelevement_bons = p.rowid"; $sql .= " AND f.fk_soc = s.rowid"; - $sql .= " AND pf.fk_facture = f.rowid"; + if ($type == 'bank-transfer') { + $sql .= " AND pf.fk_facture_fourn = f.rowid"; + } else { + $sql .= " AND pf.fk_facture = f.rowid"; + } $sql .= " AND f.entity IN (".getEntity('invoice').")"; $sql .= " AND pl.rowid=".$id; if ($socid) $sql .= " AND s.rowid = ".$socid;