From f85b6315fbfbafb9ba3a17752f16c62997725993 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?No=C3=A9=20Courtier?= Date: Thu, 3 Nov 2022 16:46:15 +0100 Subject: [PATCH 1/5] FIX: Wrong Extrafields Element For Assets" --- htdocs/asset/admin/assets_extrafields.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/asset/admin/assets_extrafields.php b/htdocs/asset/admin/assets_extrafields.php index 9a68f99fe06..0c9267a6550 100644 --- a/htdocs/asset/admin/assets_extrafields.php +++ b/htdocs/asset/admin/assets_extrafields.php @@ -41,7 +41,7 @@ foreach ($tmptype2label as $key => $val) { $action = GETPOST('action', 'aZ09'); $attrname = GETPOST('attrname', 'alpha'); -$elementtype = 'don'; //Must be the $table_element of the class that manage extrafield +$elementtype = 'asset'; //Must be the $table_element of the class that manage extrafield if (!$user->admin) { accessforbidden(); From dba6c681815411d9e0f890d708e8b91a75e22fb6 Mon Sep 17 00:00:00 2001 From: Thomas Negre Date: Thu, 10 Nov 2022 16:55:23 +0100 Subject: [PATCH 2/5] Fix supplier proposal clone : when a line subprice is empty, it should be saved as 0 in the Database, not null. --- htdocs/supplier_proposal/class/supplier_proposal.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/supplier_proposal/class/supplier_proposal.class.php b/htdocs/supplier_proposal/class/supplier_proposal.class.php index 6b76cf23af6..78fc1c7fd15 100644 --- a/htdocs/supplier_proposal/class/supplier_proposal.class.php +++ b/htdocs/supplier_proposal/class/supplier_proposal.class.php @@ -3035,7 +3035,7 @@ class SupplierProposalLine extends CommonObjectLine $sql .= " ".price2num($this->localtax2_tx).","; $sql .= " '".$this->db->escape($this->localtax1_type)."',"; $sql .= " '".$this->db->escape($this->localtax2_type)."',"; - $sql .= " ".(!empty($this->subprice) ?price2num($this->subprice) : "null").","; + $sql .= " ".(!empty($this->subprice) ?price2num($this->subprice) : 0).","; $sql .= " ".price2num($this->remise_percent).","; $sql .= " ".(isset($this->info_bits) ? "'".$this->db->escape($this->info_bits)."'" : "null").","; $sql .= " ".price2num($this->total_ht).","; From b766e6de662e7b8b5cfa0b4898d35c713fafa06b Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 14 Nov 2022 21:08:54 +0100 Subject: [PATCH 3/5] FIX #22786 --- htdocs/product/reassort.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/product/reassort.php b/htdocs/product/reassort.php index a711c630414..79498562210 100644 --- a/htdocs/product/reassort.php +++ b/htdocs/product/reassort.php @@ -141,7 +141,7 @@ $reshook = $hookmanager->executeHooks('printFieldListSelect', $parameters); // N $sql .= $hookmanager->resPrint; $sql .= ' FROM '.MAIN_DB_PREFIX.'product as p'; $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'product_stock as s ON p.rowid = s.fk_product'; -$sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'entrepot as e ON s.fk_entrepot = e.rowid AND e.entity IN ('.getEntity('entrepot').')'; +$sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'entrepot as e ON s.fk_entrepot = e.rowid AND e.entity IN ('.getEntity('stock').')'; if (!empty($conf->global->PRODUCT_USE_UNITS)) { $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_units as u on p.fk_unit = u.rowid'; } From cd2b9538c17c23ef2d2b375f546ac0f539959125 Mon Sep 17 00:00:00 2001 From: daraelmin Date: Tue, 15 Nov 2022 11:51:20 +0100 Subject: [PATCH 4/5] FIx #18304 No adh create if error on public form FIX #18304 - Member subscription confirmation email sent even if mandatory fields are missing --- htdocs/public/members/new.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/htdocs/public/members/new.php b/htdocs/public/members/new.php index 7f788a84671..7b0ce31700b 100644 --- a/htdocs/public/members/new.php +++ b/htdocs/public/members/new.php @@ -279,7 +279,10 @@ if ($action == 'add') $ret = $extrafields->setOptionalsFromPost(null, $adh); if ($ret < 0) $error++; - $result = $adh->create($user); + if (empty($error)) { + $result = $adh->create($user); + } + if ($result > 0) { require_once DOL_DOCUMENT_ROOT.'/core/class/CMailFile.class.php'; From c81c91755de94921d86557c2767d1ffaad441ba6 Mon Sep 17 00:00:00 2001 From: stickler-ci Date: Tue, 15 Nov 2022 10:55:09 +0000 Subject: [PATCH 5/5] Fixing style errors. --- htdocs/public/members/new.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/public/members/new.php b/htdocs/public/members/new.php index 7b0ce31700b..fba9edacaca 100644 --- a/htdocs/public/members/new.php +++ b/htdocs/public/members/new.php @@ -282,7 +282,7 @@ if ($action == 'add') if (empty($error)) { $result = $adh->create($user); } - + if ($result > 0) { require_once DOL_DOCUMENT_ROOT.'/core/class/CMailFile.class.php';