diff --git a/htdocs/admin/dict.php b/htdocs/admin/dict.php
index 05149030f9e..62e95b2c001 100644
--- a/htdocs/admin/dict.php
+++ b/htdocs/admin/dict.php
@@ -621,6 +621,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
@@ -1492,11 +1493,9 @@ if ($id)
continue;
}
- if ($value == 'element')
- {
+ if ($value == 'element') {
$valuetoshow = isset($elementList[$valuetoshow]) ? $elementList[$valuetoshow] : $valuetoshow;
- } elseif ($value == 'source')
- {
+ } elseif ($value == 'source') {
$valuetoshow = isset($sourceList[$valuetoshow]) ? $sourceList[$valuetoshow] : $valuetoshow;
} elseif ($valuetoshow == 'all') {
$valuetoshow = $langs->trans('All');
diff --git a/htdocs/bom/tpl/objectline_create.tpl.php b/htdocs/bom/tpl/objectline_create.tpl.php
index d29cdb7c6bb..1f0a00cb4b8 100644
--- a/htdocs/bom/tpl/objectline_create.tpl.php
+++ b/htdocs/bom/tpl/objectline_create.tpl.php
@@ -113,7 +113,6 @@ if (!empty($conf->global->PRODUCT_USE_UNITS))
{
$coldisplay++;
print '
';
- // print $form->selectUnits(empty($line->fk_unit) ? $conf->global->PRODUCT_USE_UNITS : $line->fk_unit, "units");
print ' | ';
}
diff --git a/htdocs/bom/tpl/objectline_edit.tpl.php b/htdocs/bom/tpl/objectline_edit.tpl.php
index 77638b875ff..f31db94403b 100644
--- a/htdocs/bom/tpl/objectline_edit.tpl.php
+++ b/htdocs/bom/tpl/objectline_edit.tpl.php
@@ -112,7 +112,6 @@ if (!empty($conf->global->PRODUCT_USE_UNITS))
{
$coldisplay++;
print '';
- // print $form->selectUnits($line->fk_unit, "units");
print ' | ';
}
diff --git a/htdocs/core/boxes/box_shipments.php b/htdocs/core/boxes/box_shipments.php
index 5a1f093ce87..22b28d42761 100644
--- a/htdocs/core/boxes/box_shipments.php
+++ b/htdocs/core/boxes/box_shipments.php
@@ -105,6 +105,7 @@ class box_shipments extends ModeleBoxes
if (!$user->rights->societe->client->voir && !$user->socid) $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON e.fk_soc = sc.fk_soc";
$sql .= " WHERE e.entity IN (".getEntity('expedition').")";
if (!empty($conf->global->ORDER_BOX_LAST_SHIPMENTS_VALIDATED_ONLY)) $sql .= " AND e.fk_statut = 1";
+ if ($user->socid > 0) $sql.= " AND s.rowid = ".$user->socid;
if (!$user->rights->societe->client->voir && !$user->socid) $sql .= " AND sc.fk_user = ".$user->id;
else $sql .= " ORDER BY e.date_delivery, e.ref DESC ";
$sql .= $this->db->plimit($max, 0);
diff --git a/htdocs/fourn/facture/card.php b/htdocs/fourn/facture/card.php
index 998ef884766..ab13801319f 100644
--- a/htdocs/fourn/facture/card.php
+++ b/htdocs/fourn/facture/card.php
@@ -1079,7 +1079,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/class/product.class.php b/htdocs/product/class/product.class.php
index 63e0fea2b36..b3381ea7ebe 100644
--- a/htdocs/product/class/product.class.php
+++ b/htdocs/product/class/product.class.php
@@ -5428,7 +5428,6 @@ class Product extends CommonObject
$langs->load('products');
$label_type = 'label';
-
if ($type == 'short') {
$label_type = 'short_label';
}
diff --git a/htdocs/product/list.php b/htdocs/product/list.php
index 26b0eca9ee5..b2f7489cbfe 100644
--- a/htdocs/product/list.php
+++ b/htdocs/product/list.php
@@ -486,7 +486,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 4c25a002a8f..62815300437 100644
--- a/htdocs/societe/class/societe.class.php
+++ b/htdocs/societe/class/societe.class.php
@@ -3621,8 +3621,8 @@ class Societe extends CommonObject
*/
public function create_from_member(Adherent $member, $socname = '', $socalias = '', $customercode = '')
{
- // phpcs:enable
- global $user, $langs;
+ // phpcs:enable
+ global $conf, $user, $langs;
dol_syslog(get_class($this)."::create_from_member", LOG_DEBUG);
@@ -3656,6 +3656,23 @@ class Societe extends CommonObject
// Cree et positionne $this->id
$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');
+ $this->db->rollback();
+ return -1;
+ }
+ }
+
$sql = "UPDATE ".MAIN_DB_PREFIX."adherent";
$sql .= " SET fk_soc=".$this->id;
$sql .= " WHERE rowid=".$member->id;