diff --git a/htdocs/contrat/index.php b/htdocs/contrat/index.php index 601e8da2e4c..7432ca1cd47 100644 --- a/htdocs/contrat/index.php +++ b/htdocs/contrat/index.php @@ -85,12 +85,14 @@ if (! empty($conf->global->MAIN_SEARCH_FORM_ON_HOME_AREAS)) // This is usele { print '
'; print ''; + + print '
'; print ''; print ''; print ''; print ''; print ''; - print "
'.$langs->trans("Search").'
'.$langs->trans("Contract").':
\n"; + print "
\n"; print "
"; } } @@ -183,7 +185,7 @@ else dol_print_error($db); } - +print '
'; print ''; print ''."\n"; $listofstatus=array(0,4,4,5); $bool=false; @@ -232,7 +234,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 +257,7 @@ if (! empty($conf->contrat->enabled) && $user->rights->contrat->lire) { $num = $db->num_rows($resql); + print '
'; print ''; print ''; print ''; @@ -290,7 +293,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 +336,7 @@ if ($result) $num = $db->num_rows($result); $i = 0; + print '
'; print ''; print ''; @@ -368,7 +372,7 @@ if ($result) } $db->free($result); - print "
'.$langs->trans("LastContracts", 5).'
"; + print "
"; } else { @@ -400,6 +404,7 @@ if ($resql) $num = $db->num_rows($resql); $i = 0; + print '
'; print ''; print ''; @@ -446,7 +451,7 @@ if ($resql) } $db->free(); - print "
'.$langs->trans("LastModifiedServices", $max).'
"; + print "
"; } else { @@ -479,6 +484,7 @@ if ($resql) $num = $db->num_rows($resql); $i = 0; + print '
'; print ''; print ''; @@ -524,7 +530,7 @@ if ($resql) } $db->free(); - print "
'.$langs->trans("NotActivatedServices").' '.$num.'
"; + print "
"; } else { @@ -558,6 +564,7 @@ if ($resql) $num = $db->num_rows($resql); $i = 0; + print '
'; print ''; print ''; @@ -603,7 +610,7 @@ if ($resql) } $db->free(); - print "
'.$langs->trans("ListOfExpiredServices").' '.$num.'
"; + print "
"; } else { diff --git a/htdocs/expensereport/index.php b/htdocs/expensereport/index.php index 39bcab7f4ec..2acae4fb03c 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; diff --git a/htdocs/fourn/commande/index.php b/htdocs/fourn/commande/index.php index 3587b8fd3b8..dfd37e1579a 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,6 +115,7 @@ if ($resql) } $db->free($resql); + print '
'; print ''; print ''; print "\n"; @@ -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 "

"; } */ 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; 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 ee55852906f..be438ce66df 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 diff --git a/htdocs/langs/en_US/agenda.lang b/htdocs/langs/en_US/agenda.lang index 465846a43db..42e8aef5b54 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 produced +MO_DELETEInDolibarr=MO deleted ##### End agenda events ##### AgendaModelModule=Document templates for event DateActionStart=Start date 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/product/fournisseurs.php b/htdocs/product/fournisseurs.php index 31819043202..777c467ad67 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}) . ""; + } } } } 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); } /** 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( 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; }