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]}; 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); } 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'; diff --git a/htdocs/product/list.php b/htdocs/product/list.php index 5e50925fbbe..b3b4e3be2dd 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')) { diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php index 3842a8cd2a9..2fcfaecb19e 100644 --- a/htdocs/societe/class/societe.class.php +++ b/htdocs/societe/class/societe.class.php @@ -3654,7 +3654,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); @@ -3687,6 +3687,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;