diff --git a/htdocs/contrat/card.php b/htdocs/contrat/card.php index adb7a7ce90e..8772aac8573 100644 --- a/htdocs/contrat/card.php +++ b/htdocs/contrat/card.php @@ -2352,7 +2352,7 @@ if ($action == 'create') { } // Sign - if ($object->status > Contrat::STATUS_DRAFT) { + if (getDolGlobalString('CONTRACT_SHOW_SIGNATURE_STATUS_WITH_SERVICE_STATUS') && $object->status > Contrat::STATUS_DRAFT) { if ($object->signed_status != Contrat::$SIGNED_STATUSES['STATUS_SIGNED_ALL']) { print '
'; } else { diff --git a/htdocs/core/modules/modCategorie.class.php b/htdocs/core/modules/modCategorie.class.php index 1aa9baf562f..4115daf56df 100644 --- a/htdocs/core/modules/modCategorie.class.php +++ b/htdocs/core/modules/modCategorie.class.php @@ -663,7 +663,7 @@ class modCategorie extends DolibarrModules $this->import_label[$r] = "CatMembersLinks"; // Translation key $this->import_icon[$r] = $this->picto; $this->import_entities_array[$r] = array(); // We define here only fields that use another icon that the one defined into import_icon - $this->import_tables_array[$r] = array('cm' => MAIN_DB_PREFIX.'categorie_contact'); + $this->import_tables_array[$r] = array('cm' => MAIN_DB_PREFIX.'categorie_member'); $this->import_fields_array[$r] = array('cm.fk_categorie' => "Category*", 'cm.fk_member' => "Member*"); $this->import_regex_array[$r] = array('cm.fk_categorie' => 'rowid@'.MAIN_DB_PREFIX.'categorie:type=3'); diff --git a/htdocs/core/triggers/interface_50_modTicket_TicketEmail.class.php b/htdocs/core/triggers/interface_50_modTicket_TicketEmail.class.php index 4427f41b831..f5aad1f0515 100644 --- a/htdocs/core/triggers/interface_50_modTicket_TicketEmail.class.php +++ b/htdocs/core/triggers/interface_50_modTicket_TicketEmail.class.php @@ -207,7 +207,7 @@ class InterfaceTicketEmail extends DolibarrTriggers // if contact selected send to email's contact else send to email's thirdparty - $contactid = empty($object->context['contactid']) ? 0 : $object->context['contactid']; + $contactid = empty($object->context['contact_id']) ? 0 : $object->context['contact_id']; $res = 0; $contactObj = null; @@ -268,7 +268,8 @@ class InterfaceTicketEmail extends DolibarrTriggers $linked_contacts[]['email'] = $object->thirdparty->email; } - $contactid = empty($object->context['contactid']) ? 0 : $object->context['contactid']; + $contactid = empty($object->context['contact_id']) ? 0 : $object->context['contact_id']; + $res = 0; $contactObj = null; if ($contactid > 0) { diff --git a/htdocs/expedition/class/expedition.class.php b/htdocs/expedition/class/expedition.class.php index c83b9b59ccc..d3f6dc4b12b 100644 --- a/htdocs/expedition/class/expedition.class.php +++ b/htdocs/expedition/class/expedition.class.php @@ -1031,7 +1031,15 @@ class Expedition extends CommonObject } // Change status of order to "shipment in process" - $ret = $this->setStatut(Commande::STATUS_SHIPMENTONPROCESS, $this->origin_id, $this->origin); + $triggerKey = 'SHIPPING_'; // Because when the trigger is fired the object is a shipping and not the real target object, so I add a prefix like SHIPPING_ to avoid confusion + if ($this->origin == 'commande') { + $triggerKey.= 'ORDER_SHIPMENTONPROCESS'; + } else { + $triggerKey.= strtoupper($this->origin).'_SHIPMENTONPROCESS'; + } + + // TODO : load the origin object to trigger the right setStatus according to origin object + $ret = $this->setStatut(Commande::STATUS_SHIPMENTONPROCESS, $this->origin_id, $this->origin, $triggerKey); if (!$ret) { $error++; } diff --git a/htdocs/ticket/card.php b/htdocs/ticket/card.php index 6f5edc022b7..9e3318f0cac 100644 --- a/htdocs/ticket/card.php +++ b/htdocs/ticket/card.php @@ -281,7 +281,7 @@ if (empty($reshook)) { $object->origin_email = null; $notifyTiers = GETPOST("notify_tiers_at_create", 'alpha'); $object->notify_tiers_at_create = empty($notifyTiers) ? 0 : 1; - $object->context['contact_id'] = GETPOSTINT('contact_id'); + $object->context['contact_id'] = GETPOSTINT('contactid'); $id = $object->create($user); } else { $id = $object->update($user); @@ -473,7 +473,7 @@ if (empty($reshook)) { if ($action == "confirm_public_close" && GETPOST('confirm', 'alpha') == 'yes' && $permissiontoadd) { $object->fetch(GETPOSTINT('id'), '', GETPOST('track_id', 'alpha')); if ($_SESSION['email_customer'] == $object->origin_email || $_SESSION['email_customer'] == $object->thirdparty->email) { - $object->context['contact_id'] = GETPOSTINT('contact_id'); + $object->context['contact_id'] = GETPOSTINT('contactid'); $object->close($user);