From 19ee163f31e29857e611b7c57268a968d2203ddd Mon Sep 17 00:00:00 2001 From: jpb Date: Wed, 6 Jan 2021 13:54:51 +0100 Subject: [PATCH 1/7] Fix add ticket on elementList --- htdocs/admin/dict.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/htdocs/admin/dict.php b/htdocs/admin/dict.php index cce441c4052..92675cbc883 100644 --- a/htdocs/admin/dict.php +++ b/htdocs/admin/dict.php @@ -577,6 +577,7 @@ if ($id == 11) // 'contract' => $langs->trans('Contract'), 'project' => $langs->trans('Project'), 'project_task' => $langs->trans('Task'), + 'ticket' => $langs->trans('Ticket'), 'agenda' => $langs->trans('Agenda'), 'dolresource' => $langs->trans('Resource'), // old deprecated @@ -1454,6 +1455,7 @@ if ($id) foreach ($fieldlist as $field => $value) { //var_dump($fieldlist); + $class = ''; $showfield = 1; $valuetoshow = $obj->{$fieldlist[$field]}; From e8ba4de83248206d4f2fb6116d5e8c816ae360b9 Mon Sep 17 00:00:00 2001 From: kevin Date: Wed, 6 Jan 2021 14:46:56 +0100 Subject: [PATCH 2/7] Fix #14353 --- htdocs/fourn/facture/card.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/fourn/facture/card.php b/htdocs/fourn/facture/card.php index ef8bd79b519..c063e636a91 100644 --- a/htdocs/fourn/facture/card.php +++ b/htdocs/fourn/facture/card.php @@ -1107,7 +1107,7 @@ if (empty($reshook)) $tva_tx = (GETPOST('tva_tx') ? GETPOST('tva_tx') : 0); - if (GETPOST('price_ht') != '') + if (GETPOST('price_ht') != '' || GETPOST('multicurrency_subprice') != '') { $up = price2num(GETPOST('price_ht')); $price_base_type = 'HT'; From 5164a96aa0e52adaeeab3c8f414c8cba955b68da Mon Sep 17 00:00:00 2001 From: kevin Date: Wed, 6 Jan 2021 15:35:33 +0100 Subject: [PATCH 3/7] Fix #15829 --- htdocs/societe/class/societe.class.php | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php index ee91363dba1..bc808391562 100644 --- a/htdocs/societe/class/societe.class.php +++ b/htdocs/societe/class/societe.class.php @@ -3650,7 +3650,7 @@ class Societe extends CommonObject public function create_from_member(Adherent $member, $socname = '', $socalias = '', $customercode = '') { // phpcs:enable - global $user, $langs; + global $conf, $user, $langs; dol_syslog(get_class($this)."::create_from_member", LOG_DEBUG); @@ -3683,6 +3683,22 @@ class Societe extends CommonObject $result = $this->create($user); if ($result >= 0) { + // Auto-create contact on thirdparty creation + if (!empty($conf->global->THIRDPARTY_DEFAULT_CREATE_CONTACT)) + { + // Fill fields needed by contact + $this->name_bis = $member->lastname; + $this->firstname = $member->firstname; + $this->civility_id = $member->civility_id; + dol_syslog("We ask to create a contact/address too", LOG_DEBUG); + $result = $this->create_individual($user); + if ($result < 0) + { + setEventMessages($this->error, $this->errors, 'errors'); + return -1; + } + } + $sql = "UPDATE ".MAIN_DB_PREFIX."adherent"; $sql .= " SET fk_soc=".$this->id; $sql .= " WHERE rowid=".$member->id; From 99b977a08e892e240f167837d8ff2a39538bc729 Mon Sep 17 00:00:00 2001 From: jpb Date: Wed, 6 Jan 2021 15:38:30 +0100 Subject: [PATCH 4/7] add categories params on llxHeader filter --- htdocs/product/list.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/htdocs/product/list.php b/htdocs/product/list.php index 5e50925fbbe..dc56f607841 100644 --- a/htdocs/product/list.php +++ b/htdocs/product/list.php @@ -466,7 +466,11 @@ if ($resql) } } - llxHeader('', $title, $helpurl, ''); + foreach ($searchCategoryProductList as $searchCategoryProduct) { + $paramsCat .= "&search_category_product_list[]=".urlencode($searchCategoryProduct); + } + llxHeader('', $title, $helpurl, '',0,0,"","",$paramsCat); + // Displays product removal confirmation if (GETPOST('delprod')) { From f9ae8acbc76d11749d43d899181936aef4bbeba0 Mon Sep 17 00:00:00 2001 From: stickler-ci Date: Wed, 6 Jan 2021 14:47:54 +0000 Subject: [PATCH 5/7] Fixing style errors. --- htdocs/product/list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/product/list.php b/htdocs/product/list.php index dc56f607841..b3b4e3be2dd 100644 --- a/htdocs/product/list.php +++ b/htdocs/product/list.php @@ -469,7 +469,7 @@ if ($resql) foreach ($searchCategoryProductList as $searchCategoryProduct) { $paramsCat .= "&search_category_product_list[]=".urlencode($searchCategoryProduct); } - llxHeader('', $title, $helpurl, '',0,0,"","",$paramsCat); + llxHeader('', $title, $helpurl, '', 0, 0, "", "", $paramsCat); // Displays product removal confirmation From cf324f75d734f8dc7a83e0d54e16902331656f1a Mon Sep 17 00:00:00 2001 From: ATM john Date: Wed, 6 Jan 2021 16:01:19 +0100 Subject: [PATCH 6/7] Fix bom line unit display #13831 --- htdocs/bom/tpl/objectline_create.tpl.php | 1 - htdocs/bom/tpl/objectline_edit.tpl.php | 1 - htdocs/bom/tpl/objectline_view.tpl.php | 2 +- 3 files changed, 1 insertion(+), 3 deletions(-) diff --git a/htdocs/bom/tpl/objectline_create.tpl.php b/htdocs/bom/tpl/objectline_create.tpl.php index eeffb625381..20d523ff512 100644 --- a/htdocs/bom/tpl/objectline_create.tpl.php +++ b/htdocs/bom/tpl/objectline_create.tpl.php @@ -116,7 +116,6 @@ if ($conf->global->PRODUCT_USE_UNITS) { $coldisplay++; print ''; - print $form->selectUnits($line->fk_unit, "units"); print ''; } diff --git a/htdocs/bom/tpl/objectline_edit.tpl.php b/htdocs/bom/tpl/objectline_edit.tpl.php index 3840f495dea..31a4b1ee008 100644 --- a/htdocs/bom/tpl/objectline_edit.tpl.php +++ b/htdocs/bom/tpl/objectline_edit.tpl.php @@ -112,7 +112,6 @@ if ($conf->global->PRODUCT_USE_UNITS) { $coldisplay++; print ''; - print $form->selectUnits($line->fk_unit, "units"); print ''; } diff --git a/htdocs/bom/tpl/objectline_view.tpl.php b/htdocs/bom/tpl/objectline_view.tpl.php index e1e94dc2076..c9770465458 100644 --- a/htdocs/bom/tpl/objectline_view.tpl.php +++ b/htdocs/bom/tpl/objectline_view.tpl.php @@ -82,7 +82,7 @@ print ''; if ($conf->global->PRODUCT_USE_UNITS) { print ''; - $label = $line->getLabelOfUnit('short'); + $label = $tmpproduct->getLabelOfUnit('short'); if ($label !== '') { print $langs->trans($label); } From 2be2cdaadf67bdebb3b09e40fdfbeace137dba98 Mon Sep 17 00:00:00 2001 From: jpb Date: Wed, 6 Jan 2021 16:06:03 +0100 Subject: [PATCH 7/7] fix style errors --- htdocs/product/list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/product/list.php b/htdocs/product/list.php index dc56f607841..b3b4e3be2dd 100644 --- a/htdocs/product/list.php +++ b/htdocs/product/list.php @@ -469,7 +469,7 @@ if ($resql) foreach ($searchCategoryProductList as $searchCategoryProduct) { $paramsCat .= "&search_category_product_list[]=".urlencode($searchCategoryProduct); } - llxHeader('', $title, $helpurl, '',0,0,"","",$paramsCat); + llxHeader('', $title, $helpurl, '', 0, 0, "", "", $paramsCat); // Displays product removal confirmation