From f3154566a49274f4373d1abae028ff1c28dfd064 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Tue, 5 Nov 2019 19:03:28 +0100 Subject: [PATCH 01/12] Update index.php --- htdocs/contrat/index.php | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/htdocs/contrat/index.php b/htdocs/contrat/index.php index 9d96ca7be5e..e08a33e78ba 100644 --- a/htdocs/contrat/index.php +++ b/htdocs/contrat/index.php @@ -85,12 +85,13 @@ if (! empty($conf->global->MAIN_SEARCH_FORM_ON_HOME_AREAS)) // This is usele { print '
'; print ''; - print ''; + print '
'; + print '
'; print ''; print ''; print ''; print ''; - print "
'.$langs->trans("Search").'
'.$langs->trans("Contract").':
\n"; + print "\n"; print "
"; } } @@ -183,7 +184,7 @@ else dol_print_error($db); } - +print '
'; print ''; print ''."\n"; $listofstatus=array(0,4,4,5); $bool=false; @@ -232,7 +233,7 @@ foreach($listofstatus as $status) //if ($totalinprocess != $total) //print ''; print ''; -print "
'.$langs->trans("Statistics").' - '.$langs->trans("Services").'
'.$langs->trans("Total").' ('.$langs->trans("ServicesRunning").')'.$totalinprocess.'
'.$langs->trans("Total").''.$total.'

"; +print "

"; // Draft contracts @@ -255,6 +256,7 @@ if (! empty($conf->contrat->enabled) && $user->rights->contrat->lire) { $num = $db->num_rows($resql); + print '
'; print ''; print ''; print ''; @@ -290,7 +292,7 @@ if (! empty($conf->contrat->enabled) && $user->rights->contrat->lire) { print ''; } - print "
'.$langs->trans("DraftContracts").($num?' '.$num.'':'').'
'.$langs->trans("NoContracts").'

"; + print "

"; $db->free($resql); } else @@ -333,6 +335,7 @@ if ($result) $num = $db->num_rows($result); $i = 0; + print '
'; print ''; print ''; @@ -368,7 +371,7 @@ if ($result) } $db->free($result); - print "
'.$langs->trans("LastContracts", 5).'
"; + print "
"; } else { @@ -400,6 +403,7 @@ if ($resql) $num = $db->num_rows($resql); $i = 0; + print '
'; print ''; print ''; @@ -446,7 +450,7 @@ if ($resql) } $db->free(); - print "
'.$langs->trans("LastModifiedServices", $max).'
"; + print "
"; } else { @@ -479,6 +483,7 @@ if ($resql) $num = $db->num_rows($resql); $i = 0; + print '
'; print ''; print ''; @@ -524,7 +529,7 @@ if ($resql) } $db->free(); - print "
'.$langs->trans("NotActivatedServices").' '.$num.'
"; + print "
"; } else { @@ -558,6 +563,7 @@ if ($resql) $num = $db->num_rows($resql); $i = 0; + print '
'; print ''; print ''; @@ -603,7 +609,7 @@ if ($resql) } $db->free(); - print "
'.$langs->trans("ListOfExpiredServices").' '.$num.'
"; + print "
"; } else { From d2e59fc2afe6ed23656d91319391278984838749 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Tue, 5 Nov 2019 21:14:22 +0100 Subject: [PATCH 02/12] css --- htdocs/fourn/commande/index.php | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/htdocs/fourn/commande/index.php b/htdocs/fourn/commande/index.php index 5a8e0446cea..487be054e7e 100644 --- a/htdocs/fourn/commande/index.php +++ b/htdocs/fourn/commande/index.php @@ -63,11 +63,12 @@ if (! empty($conf->global->MAIN_SEARCH_FORM_ON_HOME_AREAS)) // This is usele { print '
'; print ''; + print '
'; print ''; print ''; print ''; - print "
'.$langs->trans("Search").'
'; print $langs->trans("SupplierOrder").':

\n"; + print "

\n"; } @@ -114,7 +115,8 @@ if ($resql) } $db->free($resql); - print ''; + print '
'; + print '
'; print ''; print "\n"; foreach (array(0,1,2,3,4,5,6) as $status) @@ -148,7 +150,7 @@ if ($resql) //print ''; print ''; - print "
'.$langs->trans("Statistics").' - '.$langs->trans("SuppliersOrders").'
'.$langs->trans("Total").' ('.$langs->trans("SuppliersOrdersRunning").')'.$totalinprocess.'
'.$langs->trans("Total").''.$total.'

"; + print "
"; } else { @@ -178,6 +180,7 @@ if ($resql) $num = $db->num_rows($resql); $i = 0; + print '
'; print ''; print ''; @@ -195,7 +198,7 @@ if ($resql) print "\n"; $i++; } - print "
'.$langs->trans("Status").'

"; + print "

"; $db->free($resql); } else @@ -223,6 +226,7 @@ if (! empty($conf->fournisseur->enabled)) $resql=$db->query($sql); if ($resql) { + print '
'; print ''; print ''; print ''; @@ -242,7 +246,7 @@ if (! empty($conf->fournisseur->enabled)) $i++; } } - print "
'.$langs->trans("DraftOrders").'

"; + print "

"; } } @@ -268,6 +272,7 @@ if ($resql) $num = $db->num_rows($resql); $i = 0; + print '
'; print ''; print ''; print "\n"; @@ -287,7 +292,7 @@ if ($resql) print "\n"; $i++; } - print "
'.$langs->trans("UserWithApproveOrderGrant").'

"; + print "

"; $db->free($resql); } else @@ -319,6 +324,7 @@ $sql.= $db->plimit($max, 0); $resql=$db->query($sql); if ($resql) { + print '
'; print ''; print ''; print ''; @@ -362,7 +368,7 @@ if ($resql) $i++; } } - print "
'.$langs->trans("LastModifiedOrders", $max).'

"; + print "

"; } else dol_print_error($db); @@ -387,6 +393,7 @@ if ($resql) { $num = $db->num_rows($resql); +print '
'; print ''; print ''; print ''; @@ -431,7 +438,7 @@ $i++; } } -print "
'.$langs->trans("OrdersToProcess").' ('.$num.')

"; +print "

"; } */ From 0e242a3402e81d0bf161a8340e43840cc473e1ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Tue, 5 Nov 2019 21:37:12 +0100 Subject: [PATCH 03/12] add info for tooltip --- htdocs/expensereport/index.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/htdocs/expensereport/index.php b/htdocs/expensereport/index.php index c849a5c62f9..f24d1224fca 100644 --- a/htdocs/expensereport/index.php +++ b/htdocs/expensereport/index.php @@ -164,7 +164,8 @@ $max=10; $langs->load("boxes"); -$sql = "SELECT u.rowid as uid, u.lastname, u.firstname, u.login, u.statut, u.photo, d.rowid, d.ref, d.date_debut as dated, d.date_fin as datef, d.date_create as dm, d.total_ht, d.total_ttc, d.fk_statut as fk_status"; +$sql = "SELECT u.rowid as uid, u.lastname, u.firstname, u.login, u.statut, u.photo, u.email, u.admin"; +$sql.= ", d.rowid, d.ref, d.date_debut as dated, d.date_fin as datef, d.date_create as dm, d.total_ht, d.total_ttc, d.fk_statut as fk_status"; $sql.= " FROM ".MAIN_DB_PREFIX."expensereport as d, ".MAIN_DB_PREFIX."user as u"; if (!$user->rights->societe->client->voir && !$user->socid) $sql.= ", ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."societe_commerciaux as sc"; $sql.= " WHERE u.rowid = d.fk_user_author"; @@ -211,6 +212,8 @@ if ($result) $expensereportstatic->id=$obj->rowid; $expensereportstatic->ref=$obj->ref; $userstatic->id=$obj->uid; + $userstatic->admin = $obj->admin; + $userstatic->email = $obj->email; $userstatic->lastname=$obj->lastname; $userstatic->firstname=$obj->firstname; $userstatic->login=$obj->login; From 361e8eb822c7a6c73189fa2e1d9486fac5d4bd60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Tue, 5 Nov 2019 21:44:32 +0100 Subject: [PATCH 04/12] add info for tooltip --- htdocs/holiday/list.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/htdocs/holiday/list.php b/htdocs/holiday/list.php index 273c3cf9133..4262280233c 100644 --- a/htdocs/holiday/list.php +++ b/htdocs/holiday/list.php @@ -265,12 +265,16 @@ $sql.= " cp.detail_refuse,"; $sql.= " uu.lastname as user_lastname,"; $sql.= " uu.firstname as user_firstname,"; +$sql.= " uu.admin as user_admin,"; +$sql.= " uu.email as user_email,"; $sql.= " uu.login as user_login,"; $sql.= " uu.statut as user_statut,"; $sql.= " uu.photo as user_photo,"; $sql.= " ua.lastname as validator_lastname,"; $sql.= " ua.firstname as validator_firstname,"; +$sql.= " ua.admin as validator_admin,"; +$sql.= " ua.email as validator_email,"; $sql.= " ua.login as validator_login,"; $sql.= " ua.statut as validator_statut,"; $sql.= " ua.photo as validator_photo"; @@ -663,6 +667,8 @@ if ($resql) $userstatic->id=$obj->fk_user; $userstatic->lastname=$obj->user_lastname; $userstatic->firstname=$obj->user_firstname; + $userstatic->admin = $obj->user_admin; + $userstatic->email = $obj->user_email; $userstatic->login=$obj->user_login; $userstatic->statut=$obj->user_statut; $userstatic->photo=$obj->user_photo; @@ -671,6 +677,8 @@ if ($resql) $approbatorstatic->id=$obj->fk_validator; $approbatorstatic->lastname=$obj->validator_lastname; $approbatorstatic->firstname=$obj->validator_firstname; + $approbatorstatic->admin = $obj->validator_admin; + $approbatorstatic->email = $obj->validator_email; $approbatorstatic->login=$obj->validator_login; $approbatorstatic->statut=$obj->validator_statut; $approbatorstatic->photo=$obj->validator_photo; From 7d24610d4ce95b62e20a1b9f3d5273d21811a2c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Tue, 5 Nov 2019 21:57:11 +0100 Subject: [PATCH 05/12] Update agenda.lang --- htdocs/langs/en_US/agenda.lang | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/htdocs/langs/en_US/agenda.lang b/htdocs/langs/en_US/agenda.lang index 465846a43db..b162c483ea9 100644 --- a/htdocs/langs/en_US/agenda.lang +++ b/htdocs/langs/en_US/agenda.lang @@ -104,6 +104,14 @@ TICKET_MODIFYInDolibarr=Ticket %s modified TICKET_ASSIGNEDInDolibarr=Ticket %s assigned TICKET_CLOSEInDolibarr=Ticket %s closed TICKET_DELETEInDolibarr=Ticket %s deleted +BOM_VALIDATEInDolibarr=BOM validated +BOM_UNVALIDATEInDolibarr=BOM unvalidated +BOM_CLOSEInDolibarr=BOM disabled +BOM_REOPENInDolibarr=BOM reopen +BOM_DELETEInDolibarr=BOM deleted +MO_VALIDATEInDolibarr=MO validated +MO_PRODUCEDInDolibarr=MO disabled +MO_DELETEInDolibarr=MO deleted ##### End agenda events ##### AgendaModelModule=Document templates for event DateActionStart=Start date From df77370a6315105630741b4cc6f854350b14fd18 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Tue, 5 Nov 2019 22:01:06 +0100 Subject: [PATCH 06/12] Update agenda.lang --- htdocs/langs/en_US/agenda.lang | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/htdocs/langs/en_US/agenda.lang b/htdocs/langs/en_US/agenda.lang index b162c483ea9..c00bee6d52e 100644 --- a/htdocs/langs/en_US/agenda.lang +++ b/htdocs/langs/en_US/agenda.lang @@ -104,13 +104,13 @@ TICKET_MODIFYInDolibarr=Ticket %s modified TICKET_ASSIGNEDInDolibarr=Ticket %s assigned TICKET_CLOSEInDolibarr=Ticket %s closed TICKET_DELETEInDolibarr=Ticket %s deleted -BOM_VALIDATEInDolibarr=BOM validated -BOM_UNVALIDATEInDolibarr=BOM unvalidated -BOM_CLOSEInDolibarr=BOM disabled -BOM_REOPENInDolibarr=BOM reopen -BOM_DELETEInDolibarr=BOM deleted -MO_VALIDATEInDolibarr=MO validated -MO_PRODUCEDInDolibarr=MO disabled +BOM_VALIDATEInDolibarr=BOM validated +BOM_UNVALIDATEInDolibarr=BOM unvalidated +BOM_CLOSEInDolibarr=BOM disabled +BOM_REOPENInDolibarr=BOM reopen +BOM_DELETEInDolibarr=BOM deleted +MO_VALIDATEInDolibarr=MO validated +MO_PRODUCEDInDolibarr=MO disabled MO_DELETEInDolibarr=MO deleted ##### End agenda events ##### AgendaModelModule=Document templates for event From f292b1f2440aae6a085d924bc68dc800294acb55 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Tue, 5 Nov 2019 22:25:30 +0100 Subject: [PATCH 07/12] missing table product_fournisseur_price_extrafields @Tim-Otte --- htdocs/install/mysql/migration/10.0.0-11.0.0.sql | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/htdocs/install/mysql/migration/10.0.0-11.0.0.sql b/htdocs/install/mysql/migration/10.0.0-11.0.0.sql index fcd7ede9bcc..94439145e8b 100644 --- a/htdocs/install/mysql/migration/10.0.0-11.0.0.sql +++ b/htdocs/install/mysql/migration/10.0.0-11.0.0.sql @@ -420,6 +420,14 @@ create table llx_c_shipment_package_type entity integer DEFAULT 1 NOT NULL -- Multi company id )ENGINE=innodb; +CREATE TABLE llx_product_fournisseur_price_extrafields ( + rowid integer AUTO_INCREMENT PRIMARY KEY, + tms timestamp, + fk_object integer NOT NULL, + import_key varchar(14) -- import key +) ENGINE=innodb; + +ALTER TABLE llx_product_fournisseur_price_extrafields ADD INDEX idx_product_fournisseur_price_extrafields (fk_object); CREATE TABLE llx_mrp_mo( -- BEGIN MODULEBUILDER FIELDS From d1131e6b5a35c864743000b66b8cb2358d9d39e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Tue, 5 Nov 2019 22:27:30 +0100 Subject: [PATCH 08/12] Update fournisseurs.php --- htdocs/product/fournisseurs.php | 54 ++++++++++++++++++--------------- 1 file changed, 30 insertions(+), 24 deletions(-) diff --git a/htdocs/product/fournisseurs.php b/htdocs/product/fournisseurs.php index e1940864dd0..5bca0794fbc 100644 --- a/htdocs/product/fournisseurs.php +++ b/htdocs/product/fournisseurs.php @@ -768,17 +768,19 @@ SCRIPT; $extralabels=$extrafields->attributes["product_fournisseur_price"]['label']; // Extrafields $resql = $db->query("SELECT * FROM " . MAIN_DB_PREFIX . "product_fournisseur_price_extrafields WHERE fk_object = " . $rowid); - if ($db->num_rows($resql) != 1) { - foreach ($extralabels as $key => $value) { - if (! empty($extrafields->attributes["product_fournisseur_price"]['list'][$key]) && ($extrafields->attributes["product_fournisseur_price"]['list'][$key] == 1 || $extrafields->attributes["product_fournisseur_price"]['list'][$key] == 3 || ($action == "update_price" && $extrafields->attributes["product_fournisseur_price"]['list'][$key] == 4))) { - print 'attributes["product_fournisseur_price"]['required'][$key] ? ' class="fieldrequired"' : '') . '>' . $langs->trans($value) . '' . $extrafields->showInputField($key, '', '', '', '', '', 0, 'product_fournisseur_price') . ''; + if (!empty($extralabels)) { + if ($db->num_rows($resql) != 1) { + foreach ($extralabels as $key => $value) { + if (! empty($extrafields->attributes["product_fournisseur_price"]['list'][$key]) && ($extrafields->attributes["product_fournisseur_price"]['list'][$key] == 1 || $extrafields->attributes["product_fournisseur_price"]['list'][$key] == 3 || ($action == "update_price" && $extrafields->attributes["product_fournisseur_price"]['list'][$key] == 4))) { + print 'attributes["product_fournisseur_price"]['required'][$key] ? ' class="fieldrequired"' : '') . '>' . $langs->trans($value) . '' . $extrafields->showInputField($key, '', '', '', '', '', 0, 'product_fournisseur_price') . ''; + } } - } - } else { - $resql = $db->fetch_object($resql); - foreach ($extralabels as $key => $value) { - if (! empty($extrafields->attributes["product_fournisseur_price"]['list'][$key]) && ($extrafields->attributes["product_fournisseur_price"]['list'][$key] == 1 || $extrafields->attributes["product_fournisseur_price"]['list'][$key] == 3 || ($action == "update_price" && $extrafields->attributes["product_fournisseur_price"]['list'][$key] == 4))) { - print 'attributes["product_fournisseur_price"]['required'][$key] ? ' class="fieldrequired"' : '') . '>' . $langs->trans($value) . '' . $extrafields->showInputField($key, $resql->{$key}, '', '', '', '', 0, 'product_fournisseur_price') . ''; + } else { + $resql = $db->fetch_object($resql); + foreach ($extralabels as $key => $value) { + if (! empty($extrafields->attributes["product_fournisseur_price"]['list'][$key]) && ($extrafields->attributes["product_fournisseur_price"]['list'][$key] == 1 || $extrafields->attributes["product_fournisseur_price"]['list'][$key] == 3 || ($action == "update_price" && $extrafields->attributes["product_fournisseur_price"]['list'][$key] == 4))) { + print 'attributes["product_fournisseur_price"]['required'][$key] ? ' class="fieldrequired"' : '') . '>' . $langs->trans($value) . '' . $extrafields->showInputField($key, $resql->{$key}, '', '', '', '', 0, 'product_fournisseur_price') . ''; + } } } } @@ -874,10 +876,12 @@ SCRIPT; // fetch optionals attributes and labels $extrafields->fetch_name_optionals_label("product_fournisseur_price"); $extralabels=$extrafields->attributes["product_fournisseur_price"]['label']; - foreach ($extralabels as $key => $value) { - // Show field if not hidden - if (! empty($extrafields->attributes["product_fournisseur_price"]['list'][$key]) && $extrafields->attributes["product_fournisseur_price"]['list'][$key] != 3) { - print_liste_field_titre($value, $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder, 'right '); + if (!empty($extralabels)) { + foreach ($extralabels as $key => $value) { + // Show field if not hidden + if (! empty($extrafields->attributes["product_fournisseur_price"]['list'][$key]) && $extrafields->attributes["product_fournisseur_price"]['list'][$key] != 3) { + print_liste_field_titre($value, $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder, 'right '); + } } } @@ -1004,17 +1008,19 @@ SCRIPT; // Extrafields $resql = $db->query("SELECT * FROM " . MAIN_DB_PREFIX . "product_fournisseur_price_extrafields WHERE fk_object = " . $productfourn->product_fourn_price_id); - if ($db->num_rows($resql) != 1) { - foreach ($extralabels as $key => $value) { - if (! empty($extrafields->attributes["product_fournisseur_price"]['list'][$key]) && $extrafields->attributes["product_fournisseur_price"]['list'][$key] != 3) { - print ""; + if (! empty($extralabels)) { + if ($db->num_rows($resql) != 1) { + foreach ($extralabels as $key => $value) { + if (! empty($extrafields->attributes["product_fournisseur_price"]['list'][$key]) && $extrafields->attributes["product_fournisseur_price"]['list'][$key] != 3) { + print ""; + } } - } - } else { - $resql = $db->fetch_object($resql); - foreach ($extralabels as $key => $value) { - if (! empty($extrafields->attributes["product_fournisseur_price"]['list'][$key]) && $extrafields->attributes["product_fournisseur_price"]['list'][$key] != 3) { - print '' . $extrafields->showOutputField($key, $resql->{$key}) . ""; + } else { + $resql = $db->fetch_object($resql); + foreach ($extralabels as $key => $value) { + if (! empty($extrafields->attributes["product_fournisseur_price"]['list'][$key]) && $extrafields->attributes["product_fournisseur_price"]['list'][$key] != 3) { + print '' . $extrafields->showOutputField($key, $resql->{$key}) . ""; + } } } } From a278500b64623b7264246ee58817866acb1afc87 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Tue, 5 Nov 2019 22:56:31 +0100 Subject: [PATCH 09/12] Update list.php --- htdocs/reception/list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/reception/list.php b/htdocs/reception/list.php index a01ee64f30d..989339590b3 100644 --- a/htdocs/reception/list.php +++ b/htdocs/reception/list.php @@ -84,7 +84,7 @@ $extrafields = new ExtraFields($db); // fetch optionals attributes and labels $extrafields->fetch_name_optionals_label($object->table_element); -$search_array_options=$extrafields->getOptionalsFromPost(null, '', 'search_'); +$search_array_options = (array) $extrafields->getOptionalsFromPost($object->table_element, '', 'search_'); // List of fields to search into when doing a "search in all" $fieldstosearchall = array( From 90f80d137f99f0d9e0143cf4aba3c7677c45613e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Tue, 5 Nov 2019 23:19:11 +0100 Subject: [PATCH 10/12] can't have static and $this at same time --- htdocs/product/inventory/class/inventory.class.php | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/htdocs/product/inventory/class/inventory.class.php b/htdocs/product/inventory/class/inventory.class.php index 4434f82fbcf..e93942d16d4 100644 --- a/htdocs/product/inventory/class/inventory.class.php +++ b/htdocs/product/inventory/class/inventory.class.php @@ -396,16 +396,11 @@ class Inventory extends CommonObject // phpcs:enable global $langs; - if (empty($this->labelStatus)) - { - global $langs; - //$langs->load("mrp"); - $this->labelStatus[self::STATUS_DRAFT] = $langs->trans('Draft'); - $this->labelStatus[self::STATUS_VALIDATED] = $langs->trans('Enabled'); - $this->labelStatus[self::STATUS_CANCELED] = $langs->trans('Canceled'); - } + $labelStatus[self::STATUS_DRAFT] = $langs->trans('Draft'); + $labelStatus[self::STATUS_VALIDATED] = $langs->trans('Enabled'); + $labelStatus[self::STATUS_CANCELED] = $langs->trans('Canceled'); - return dolGetStatus($this->labelStatus[$status], $this->labelStatus[$status], '', 'status'.$status, $mode); + return dolGetStatus($labelStatus[$status], $labelStatus[$status], '', 'status'.$status, $mode); } /** From 1b7fe9a427950060b9c445c94638d5143177f040 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Wed, 6 Nov 2019 10:40:21 +0100 Subject: [PATCH 11/12] fix error message --- htdocs/langs/en_US/ticket.lang | 1 + htdocs/ticket/class/ticket.class.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/langs/en_US/ticket.lang b/htdocs/langs/en_US/ticket.lang index 14f06f8831f..7a408e8952a 100644 --- a/htdocs/langs/en_US/ticket.lang +++ b/htdocs/langs/en_US/ticket.lang @@ -228,6 +228,7 @@ TicketNotNotifyTiersAtCreate=Not notify company at create Unread=Unread TicketNotCreatedFromPublicInterface=Not available. Ticket was not created from public interface. PublicInterfaceNotEnabled=Public interface was not enabled +ErrorTicketRefRequired=Ticket reference name is required # # Logs diff --git a/htdocs/ticket/class/ticket.class.php b/htdocs/ticket/class/ticket.class.php index 589067934d5..d606fc1716c 100644 --- a/htdocs/ticket/class/ticket.class.php +++ b/htdocs/ticket/class/ticket.class.php @@ -306,7 +306,7 @@ class Ticket extends CommonObject } if (empty($this->ref)) { - $this->errors[] = 'ErrorBadRef'; + $this->errors[] = 'ErrorTicketRefRequired'; dol_syslog(get_class($this) . "::create error -1 ref null", LOG_ERR); $result = -1; } From 883fcd7a72a1dca4723666ff24257c14523679b5 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 7 Nov 2019 11:29:45 +0100 Subject: [PATCH 12/12] Update agenda.lang --- htdocs/langs/en_US/agenda.lang | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/langs/en_US/agenda.lang b/htdocs/langs/en_US/agenda.lang index c00bee6d52e..42e8aef5b54 100644 --- a/htdocs/langs/en_US/agenda.lang +++ b/htdocs/langs/en_US/agenda.lang @@ -110,7 +110,7 @@ BOM_CLOSEInDolibarr=BOM disabled BOM_REOPENInDolibarr=BOM reopen BOM_DELETEInDolibarr=BOM deleted MO_VALIDATEInDolibarr=MO validated -MO_PRODUCEDInDolibarr=MO disabled +MO_PRODUCEDInDolibarr=MO produced MO_DELETEInDolibarr=MO deleted ##### End agenda events ##### AgendaModelModule=Document templates for event