From a5635825f34ffbf6c4697a765349371ae5b85122 Mon Sep 17 00:00:00 2001 From: gauthier Date: Thu, 14 Nov 2019 12:09:32 +0100 Subject: [PATCH 1/7] FIX : wrong invoice id for fetchObjetctLinked --- htdocs/compta/facture/class/facture.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index f35281f73d6..9f13313ffe1 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -875,7 +875,7 @@ class Facture extends CommonInvoice } elseif ($this->type == self::TYPE_SITUATION && !empty($conf->global->INVOICE_USE_SITUATION)) { - $this->fetchObjectLinked('', '', $facture->id, 'facture'); + $this->fetchObjectLinked('', '', $this->id, 'facture'); foreach ($this->linkedObjectsIds as $typeObject => $Tfk_object) { From 3937b45c5f18a8964299081538bcee7a406a8286 Mon Sep 17 00:00:00 2001 From: Alexandre SPANGARO Date: Sat, 16 Nov 2019 07:51:38 +0100 Subject: [PATCH 2/7] Core - Fix accountancy write social contribution in bookkeeping (Need for FEC format) --- htdocs/accountancy/journal/bankjournal.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/htdocs/accountancy/journal/bankjournal.php b/htdocs/accountancy/journal/bankjournal.php index a532379c358..16996358425 100644 --- a/htdocs/accountancy/journal/bankjournal.php +++ b/htdocs/accountancy/journal/bankjournal.php @@ -632,7 +632,9 @@ if (! $error && $action == 'writebookkeeping') { $bookkeeping->subledger_account = ''; $bookkeeping->subledger_label = ''; $bookkeeping->numero_compte = $k; - $bookkeeping->label_compte = $objmid->labelc; + + $accountingaccount->fetch(null, $k, true); + $bookkeeping->label_compte = $accountingaccount->label; } elseif ($tabtype[$key] == 'payment_vat') { $bookkeeping->subledger_account = ''; $bookkeeping->subledger_label = ''; From 79ee2b8c4d1816f1bbb77713c385d823880fb6a2 Mon Sep 17 00:00:00 2001 From: Alexandre SPANGARO Date: Mon, 18 Nov 2019 11:48:44 +0100 Subject: [PATCH 3/7] Missing language key --- htdocs/langs/en_US/stocks.lang | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/langs/en_US/stocks.lang b/htdocs/langs/en_US/stocks.lang index 17f914b7405..96e4a911d10 100644 --- a/htdocs/langs/en_US/stocks.lang +++ b/htdocs/langs/en_US/stocks.lang @@ -210,3 +210,4 @@ StockIncreaseAfterCorrectTransfer=Increase by correction/transfer StockDecreaseAfterCorrectTransfer=Decrease by correction/transfer StockIncrease=Stock increase StockDecrease=Stock decrease +StockIsRequiredToChooseWhichLotToUse=Stock is required to choose which lot to use From 99f93dbbf5894ee0ed8f8447069a976f13786e7a Mon Sep 17 00:00:00 2001 From: atm-greg Date: Mon, 18 Nov 2019 14:33:01 +0100 Subject: [PATCH 4/7] fix bad getpost --- htdocs/contact/card.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/contact/card.php b/htdocs/contact/card.php index cfe86fb3793..909dfd9e2e2 100644 --- a/htdocs/contact/card.php +++ b/htdocs/contact/card.php @@ -927,7 +927,7 @@ else // Civility print ''; - print $formcompany->select_civility(GETPOSTISSET("civility_code")?GETPOST("civility", "aZ09"):$object->civility_code, 'civility_code'); + print $formcompany->select_civility(GETPOSTISSET("civility_code")?GETPOST("civility_code", "aZ09"):$object->civility_code, 'civility_code'); print ''; print ''; From 74c85b742e4836406abffb9934f2e64ec48d7145 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 18 Nov 2019 18:09:12 +0100 Subject: [PATCH 5/7] Fix ref must be null until the generation of ref is ok --- htdocs/install/mysql/migration/9.0.0-10.0.0.sql | 3 +++ 1 file changed, 3 insertions(+) diff --git a/htdocs/install/mysql/migration/9.0.0-10.0.0.sql b/htdocs/install/mysql/migration/9.0.0-10.0.0.sql index e9130c5d5c4..df796e54f49 100644 --- a/htdocs/install/mysql/migration/9.0.0-10.0.0.sql +++ b/htdocs/install/mysql/migration/9.0.0-10.0.0.sql @@ -328,6 +328,9 @@ UPDATE llx_c_shipment_mode SET label = 'https://www.laposte.fr/outils/suivre-vos UPDATE llx_c_shipment_mode SET label = 'https://www.laposte.fr/outils/suivre-vos-envois?code={TRACKID}' WHERE code IN ('LETTREMAX'); +-- VMYSQL4.3 ALTER TABLE llx_holiday MODIFY COLUMN ref varchar(30) NULL; +-- VPGSQL8.2 ALTER TABLE llx_holiday ALTER COLUMN ref DROP NOT NULL; + create table llx_reception ( From 918f476c2b802f6770fb5f127ffe5091c765e7f5 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 18 Nov 2019 19:02:12 +0100 Subject: [PATCH 6/7] Fix backport fix not checking mandatory extrafields of type select --- htdocs/core/class/extrafields.class.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/htdocs/core/class/extrafields.class.php b/htdocs/core/class/extrafields.class.php index b3c257bfaaa..5b171d70bfb 100644 --- a/htdocs/core/class/extrafields.class.php +++ b/htdocs/core/class/extrafields.class.php @@ -1830,7 +1830,7 @@ class ExtraFields function setOptionalsFromPost($extralabels, &$object, $onlykey='') { global $_POST, $langs; - $nofillrequired='';// For error when required field left blank + $nofillrequired=0;// For error when required field left blank $error_field_required = array(); if (is_array($this->attributes[$object->table_element]['label'])) $extralabels=$this->attributes[$object->table_element]['label']; @@ -1861,8 +1861,9 @@ class ExtraFields if ($this->attributes[$object->table_element]['required'][$key]) // Value is required { // Check if empty without using GETPOST, value can be alpha, int, array, etc... - if ((! is_array($_POST["options_".$key]) && empty($_POST["options_".$key]) && $_POST["options_".$key] != '0') - || (is_array($_POST["options_".$key]) && empty($_POST["options_".$key]))) + if ((! is_array($_POST["options_".$key]) && empty($_POST["options_".$key]) && $this->attributes[$object->table_element]['type'][$key] != 'select' && $_POST["options_".$key] != '0') + || (! is_array($_POST["options_".$key]) && empty($_POST["options_".$key]) && $this->attributes[$object->table_element]['type'][$key] == 'select') + || (is_array($_POST["options_".$key]) && empty($_POST["options_".$key]))) { //print 'ccc'.$value.'-'.$this->attributes[$object->table_element]['required'][$key]; $nofillrequired++; From 010219bf097851bc40db06114efe5ef3f93b6a3f Mon Sep 17 00:00:00 2001 From: florian HENRY Date: Mon, 18 Nov 2019 19:47:34 +0100 Subject: [PATCH 7/7] fix title pasge linked files user --- htdocs/user/document.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/htdocs/user/document.php b/htdocs/user/document.php index 91d0e7219ce..3b0282179d2 100644 --- a/htdocs/user/document.php +++ b/htdocs/user/document.php @@ -115,8 +115,7 @@ if (empty($reshook)) { $form = new Form($db); -$help_url='EN:Module_Third_Parties|FR:Module_Tiers|ES:Empresas'; -llxHeader('', $langs->trans("ThirdParty").' - '.$langs->trans("Files"), $help_url); +llxHeader('', $langs->trans("UserCard").' - '.$langs->trans("Files")); if ($object->id) {