diff --git a/htdocs/bom/class/bom.class.php b/htdocs/bom/class/bom.class.php
index 9f3679ac44a..b838aac8cd9 100644
--- a/htdocs/bom/class/bom.class.php
+++ b/htdocs/bom/class/bom.class.php
@@ -738,19 +738,17 @@ class BOM extends CommonObject
public function getNomUrl($withpicto = 0, $option = '', $notooltip = 0, $morecss = '', $save_lastsearch_value = -1)
{
global $db, $conf, $langs, $hookmanager;
- global $dolibarr_main_authentication, $dolibarr_main_demo;
- global $menumanager;
if (!empty($conf->dol_no_mouse_hover)) $notooltip = 1; // Force disable tooltips
$result = '';
- $label = img_picto('', $this->picto).' '.$langs->trans("BillOfMaterials").'';
+ $label = img_picto('', $this->picto).' '.$langs->trans("BillOfMaterials").'';
+ if (isset($this->status)) {
+ $label .= ' '.$this->getLibStatut(5);
+ }
$label .= '
';
$label .= ''.$langs->trans('Ref').': '.$this->ref;
- if (isset($this->status)) {
- $label .= '
'.$langs->trans("Status").": ".$this->getLibStatut(5);
- }
$url = dol_buildpath('/bom/bom_card.php', 1).'?id='.$this->id;
diff --git a/htdocs/compta/index.php b/htdocs/compta/index.php
index c37f36dd4e5..822f4a04940 100644
--- a/htdocs/compta/index.php
+++ b/htdocs/compta/index.php
@@ -206,6 +206,7 @@ if (!empty($conf->facture->enabled) && $user->rights->facture->lire)
$facturestatic->total_tva = $obj->total_tva;
$facturestatic->total_ttc = $obj->total_ttc;
$facturestatic->ref_client = $obj->ref_client;
+ $facturestatic->statut =
$companystatic->id = $obj->socid;
$companystatic->name = $obj->name;
@@ -600,7 +601,7 @@ if (!empty($conf->don->enabled) && $user->rights->don->lire)
$langs->load("boxes");
$donationstatic = new Don($db);
- $sql = "SELECT d.rowid, d.lastname, d.firstname, d.societe, d.datedon as date, d.tms as dm, d.amount, d.fk_statut";
+ $sql = "SELECT d.rowid, d.lastname, d.firstname, d.societe, d.datedon as date, d.tms as dm, d.amount, d.fk_statut as status";
$sql .= " FROM ".MAIN_DB_PREFIX."don as d";
$sql .= " WHERE d.entity IN (".getEntity('donation').")";
// Add where from hooks
@@ -648,6 +649,9 @@ if (!empty($conf->don->enabled) && $user->rights->don->lire)
$donationstatic->ref = $objp->rowid;
$donationstatic->lastname = $objp->lastname;
$donationstatic->firstname = $objp->firstname;
+ $donationstatic->date = $objp->date;
+ $donationstatic->statut = $objp->status;
+ $donationstatic->status = $objp->status;
$label = $donationstatic->getFullName($langs);
if ($objp->societe) $label .= ($label ? ' - ' : '').$objp->societe;
@@ -657,7 +661,7 @@ if (!empty($conf->don->enabled) && $user->rights->don->lire)
print '
'.$label.' | ';
print ''.price($objp->amount).' | ';
print ''.dol_print_date($db->jdate($objp->dm), 'day').' | ';
- print ''.$donationstatic->LibStatut($objp->fk_statut, 3).' | ';
+ print ''.$donationstatic->getLibStatut(3).' | ';
print '';
$i++;
@@ -737,6 +741,7 @@ if (!empty($conf->tax->enabled) && $user->rights->tax->charges->lire)
$chargestatic->ref = $obj->rowid;
$chargestatic->label = $obj->label;
$chargestatic->paye = $obj->paye;
+ $chargestatic->status = $obj->paye;
print '';
print '| '.$chargestatic->getNomUrl(1).' | ';
@@ -860,6 +865,7 @@ if (!empty($conf->facture->enabled) && !empty($conf->commande->enabled) && $user
$commandestatic->id = $obj->rowid;
$commandestatic->ref = $obj->ref;
+ $commandestatic->statut = $obj->fk_statut;
print '
';
print '';
diff --git a/htdocs/compta/sociales/class/chargesociales.class.php b/htdocs/compta/sociales/class/chargesociales.class.php
index 6e018e0bb84..2ea2497efbb 100644
--- a/htdocs/compta/sociales/class/chargesociales.class.php
+++ b/htdocs/compta/sociales/class/chargesociales.class.php
@@ -538,10 +538,12 @@ class ChargeSociales extends CommonObject
if ($add_save_lastsearch_values) $url .= '&save_lastsearch_values=1';
}
-
if (empty($this->ref)) $this->ref = $this->label;
- $label = ''.$langs->trans("SocialContribution").'';
+ $label = img_picto('', 'tax').''.$langs->trans("SocialContribution").'';
+ if (isset($this->paye)) {
+ $label .= ' '.$this->getLibStatut(5);
+ }
if (!empty($this->ref))
$label .= ' '.$langs->trans('Ref').': '.$this->ref;
if (!empty($this->label))
diff --git a/htdocs/contact/class/contact.class.php b/htdocs/contact/class/contact.class.php
index e4602753785..1185ce5ecf8 100644
--- a/htdocs/contact/class/contact.class.php
+++ b/htdocs/contact/class/contact.class.php
@@ -1335,7 +1335,8 @@ class Contact extends CommonObject
$label .= '';
}
- $label .= img_picto('', $this->picto).' '.$langs->trans("Contact").'';
+ $label .= img_picto('', $this->picto).' '.$langs->trans("Contact").'';
+ $label .= ' '.$this->getLibStatut(4);
$label .= ' '.$langs->trans("Name").': '.$this->getFullName($langs);
//if ($this->civility_id) $label.= ' ' . $langs->trans("Civility") . ': '.$this->civility_id; // TODO Translate cibilty_id code
if (!empty($this->poste)) $label .= ' '.$langs->trans("Poste").': '.$this->poste;
diff --git a/htdocs/contact/list.php b/htdocs/contact/list.php
index 4d30977bf6a..72f404b51db 100644
--- a/htdocs/contact/list.php
+++ b/htdocs/contact/list.php
@@ -891,7 +891,7 @@ while ($i < min($num, $limit))
if (!empty($arrayfields['p.lastname']['checked']))
{
print ' | ';
- print $contactstatic->getNomUrl(1, '', 0);
+ print $contactstatic->getNomUrl(1);
print ' | ';
if (!$i) $totalarray['nbfield']++;
}
diff --git a/htdocs/don/class/don.class.php b/htdocs/don/class/don.class.php
index bb4f0717a5a..e163f146678 100644
--- a/htdocs/don/class/don.class.php
+++ b/htdocs/don/class/don.class.php
@@ -152,8 +152,8 @@ class Don extends CommonObject
/**
* Returns the donation status label (draft, valid, abandoned, paid)
*
- * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long
- * @return string Libelle
+ * @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto, 6=Long label + Picto
+ * @return string Label of status
*/
public function getLibStatut($mode = 0)
{
@@ -164,9 +164,9 @@ class Don extends CommonObject
/**
* Return the label of a given status
*
- * @param int $status Id statut
- * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto
- * @return string Libelle du statut
+ * @param int $status Id statut
+ * @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto, 6=Long label + Picto
+ * @return string Label of status
*/
public function LibStatut($status, $mode = 0)
{
@@ -922,7 +922,10 @@ class Don extends CommonObject
if (!empty($conf->dol_no_mouse_hover)) $notooltip = 1; // Force disable tooltips
$result = '';
- $label = img_picto('', $this->picto).' '.$langs->trans("Donation").'';
+ $label = img_picto('', $this->picto).' '.$langs->trans("Donation").'';
+ if (isset($this->status)) {
+ $label .= ' '.$this->getLibStatut(5);
+ }
if (!empty($this->id)) {
$label .= '
'.$langs->trans('Ref').': '.$this->id;
$label .= '
'.$langs->trans('Date').': '.dol_print_date($this->date, 'day');
diff --git a/htdocs/hrm/index.php b/htdocs/hrm/index.php
index 3955e3f849a..a713ec86100 100644
--- a/htdocs/hrm/index.php
+++ b/htdocs/hrm/index.php
@@ -294,6 +294,7 @@ if (!empty($conf->expensereport->enabled) && $user->rights->expensereport->lire)
$expensereportstatic->id = $obj->rowid;
$expensereportstatic->ref = $obj->ref;
$expensereportstatic->statut = $obj->status;
+ $expensereportstatic->status = $obj->status;
$userstatic->id = $obj->uid;
$userstatic->lastname = $obj->lastname;
diff --git a/htdocs/mrp/class/mo.class.php b/htdocs/mrp/class/mo.class.php
index ee10229bfdc..6b63e878f64 100644
--- a/htdocs/mrp/class/mo.class.php
+++ b/htdocs/mrp/class/mo.class.php
@@ -987,12 +987,12 @@ class Mo extends CommonObject
$result = '';
- $label = img_picto('', $this->picto).' '.$langs->trans("ManufacturingOrder").'';
+ $label = img_picto('', $this->picto).' '.$langs->trans("ManufacturingOrder").'';
+ if (isset($this->status)) {
+ $label .= ' '.$this->getLibStatut(5);
+ }
$label .= '
';
$label .= ''.$langs->trans('Ref').': '.$this->ref;
- if (isset($this->status)) {
- $label .= '
'.$langs->trans("Status").": ".$this->getLibStatut(5);
- }
$url = dol_buildpath('/mrp/mo_card.php', 1).'?id='.$this->id;
if ($option == 'production') $url = dol_buildpath('/mrp/mo_production.php', 1).'?id='.$this->id;
diff --git a/htdocs/mrp/mo_card.php b/htdocs/mrp/mo_card.php
index 84484956df8..ea0dd4c2181 100644
--- a/htdocs/mrp/mo_card.php
+++ b/htdocs/mrp/mo_card.php
@@ -37,10 +37,10 @@ $langs->loadLangs(array("mrp", "other"));
// Get parameters
$id = GETPOST('id', 'int');
-$ref = GETPOST('ref', 'alpha');
+$ref = GETPOST('ref', 'alpha');
$action = GETPOST('action', 'aZ09');
-$confirm = GETPOST('confirm', 'alpha');
-$cancel = GETPOST('cancel', 'aZ09');
+$confirm = GETPOST('confirm', 'alpha');
+$cancel = GETPOST('cancel', 'aZ09');
$contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'mocard'; // To manage different context of search
$backtopage = GETPOST('backtopage', 'alpha');
$backtopageforcancel = GETPOST('backtopageforcancel', 'alpha');
diff --git a/htdocs/product/class/html.formproduct.class.php b/htdocs/product/class/html.formproduct.class.php
index 3b74180f237..eed18bbf8bd 100644
--- a/htdocs/product/class/html.formproduct.class.php
+++ b/htdocs/product/class/html.formproduct.class.php
@@ -206,7 +206,7 @@ class FormProduct
/**
* Return list of warehouses
*
- * @param string|int $selected Id of preselected warehouse ('' for no value, 'ifone'=select value if one value otherwise no value)
+ * @param string|int $selected Id of preselected warehouse ('' or '-1' for no value, 'ifone'=select value if one value otherwise no value, '-2' to use the default value from setup)
* @param string $htmlname Name of html select html
* @param string $filterstatus warehouse status filter, following comma separated filter options can be used
* 'warehouseopen' = select products from open warehouses,
@@ -250,10 +250,10 @@ class FormProduct
if (strpos($htmlname, 'search_') !== 0) {
if (empty($user->fk_warehouse) || $user->fk_warehouse == -1) {
- if (empty($selected) && !empty($conf->global->MAIN_DEFAULT_WAREHOUSE)) $selected = $conf->global->MAIN_DEFAULT_WAREHOUSE;
+ if (($selected == '-2' || $selected == 'ifone') && !empty($conf->global->MAIN_DEFAULT_WAREHOUSE)) $selected = $conf->global->MAIN_DEFAULT_WAREHOUSE;
}
else {
- if (empty($selected) && !empty($conf->global->MAIN_DEFAULT_WAREHOUSE_USER)) $selected = $user->fk_warehouse;
+ if (($selected == '-2' || $selected == 'ifone') && !empty($conf->global->MAIN_DEFAULT_WAREHOUSE_USER)) $selected = $user->fk_warehouse;
}
}
diff --git a/htdocs/product/stock/card.php b/htdocs/product/stock/card.php
index 5abf87c497e..d2f9494e857 100644
--- a/htdocs/product/stock/card.php
+++ b/htdocs/product/stock/card.php
@@ -258,7 +258,7 @@ if ($action == 'create')
// Parent entrepot
print '
| '.$langs->trans("AddIn").' | ';
- print $formproduct->selectWarehouses('ifone', 'fk_parent', '', 1);
+ print img_picto('', 'stock').$formproduct->selectWarehouses((GETPOSTISSET('fk_parent') ? GETPOST('fk_parent', 'int') : 'ifone'), 'fk_parent', '', 1);
print ' |
';
// Description
@@ -690,7 +690,7 @@ if ($action == 'create')
// Ref
print '| '.$langs->trans("Ref").' | |
';
- print '| '.$langs->trans("LocationSummary").' | |
';
+ print '| '.$langs->trans("LocationSummary").' | |
';
// Parent entrepot
print '| '.$langs->trans("AddIn").' | ';
diff --git a/htdocs/product/stock/class/entrepot.class.php b/htdocs/product/stock/class/entrepot.class.php
index 170b1395984..14e25bad513 100644
--- a/htdocs/product/stock/class/entrepot.class.php
+++ b/htdocs/product/stock/class/entrepot.class.php
@@ -707,14 +707,14 @@ class Entrepot extends CommonObject
$result = '';
- $label = img_picto('', $this->picto).' '.$langs->trans("Warehouse").'';
+ $label = img_picto('', $this->picto).' '.$langs->trans("Warehouse").'';
+ if (isset($this->statut)) {
+ $label .= ' '.$this->getLibStatut(5);
+ }
$label .= ' '.$langs->trans('Ref').': '.(empty($this->ref) ? (empty($this->label) ? $this->libelle : $this->label) : $this->ref);
if (!empty($this->lieu)) {
$label .= ' '.$langs->trans('LocationSummary').': '.$this->lieu;
}
- if (isset($this->statut)) {
- $label .= ' '.$langs->trans("Status").": ".$this->getLibStatut(5);
- }
$url = DOL_URL_ROOT.'/product/stock/card.php?id='.$this->id;
diff --git a/htdocs/product/stock/list.php b/htdocs/product/stock/list.php
index f8700a1884e..f2c7133618b 100644
--- a/htdocs/product/stock/list.php
+++ b/htdocs/product/stock/list.php
@@ -530,7 +530,6 @@ if ($num)
$warehouse->{$key} = $obj->{$key};
}
-
// Show here line of result
print ' |
';
diff --git a/htdocs/product/stock/stockatdate.php b/htdocs/product/stock/stockatdate.php
index 8dabfdbf673..431bec3fd89 100644
--- a/htdocs/product/stock/stockatdate.php
+++ b/htdocs/product/stock/stockatdate.php
@@ -345,7 +345,7 @@ print ' '.$langs->trans('Warehouse').' ';
-print $formproduct->selectWarehouses($fk_warehouse, 'fk_warehouse', '', 1);
+print $formproduct->selectWarehouses((GETPOSTISSET('fk_warehouse') ? $fk_warehouse : 'ifone'), 'fk_warehouse', '', 1);
print '';
$parameters = array();
diff --git a/htdocs/recruitment/class/recruitmentcandidature.class.php b/htdocs/recruitment/class/recruitmentcandidature.class.php
index 4d01bc4b0db..fd4d446ef45 100644
--- a/htdocs/recruitment/class/recruitmentcandidature.class.php
+++ b/htdocs/recruitment/class/recruitmentcandidature.class.php
@@ -713,14 +713,14 @@ class RecruitmentCandidature extends CommonObject
$result = '';
- $label = img_picto('', $this->picto).' '.$langs->trans("RecruitmentCandidature").'';
+ $label = img_picto('', $this->picto).' '.$langs->trans("RecruitmentCandidature").'';
+ if (isset($this->status)) {
+ $label .= ' '.$this->getLibStatut(5);
+ }
$label .= '
';
$label .= ''.$langs->trans('Ref').': '.$this->ref;
$label .= '
'.$langs->trans('Email').': '.$this->email;
$label .= '
'.$langs->trans('Name').': '.$this->getFullName($langs);
- if (isset($this->status)) {
- $label .= '
'.$langs->trans("Status").": ".$this->getLibStatut(5);
- }
$url = dol_buildpath('/recruitment/recruitmentcandidature_card.php', 1).'?id='.$this->id;
diff --git a/htdocs/recruitment/class/recruitmentjobposition.class.php b/htdocs/recruitment/class/recruitmentjobposition.class.php
index fdc5ab30eaa..5ceca15e951 100644
--- a/htdocs/recruitment/class/recruitmentjobposition.class.php
+++ b/htdocs/recruitment/class/recruitmentjobposition.class.php
@@ -816,13 +816,13 @@ class RecruitmentJobPosition extends CommonObject
$result = '';
- $label = img_picto('', $this->picto).' '.$langs->trans("PositionToBeFilled").'';
+ $label = img_picto('', $this->picto).' '.$langs->trans("PositionToBeFilled").'';
+ if (isset($this->status)) {
+ $label .= ' '.$this->getLibStatut(5);
+ }
$label .= '
';
$label .= ''.$langs->trans('Ref').': '.$this->ref;
$label .= '
'.$langs->trans('Label').': '.$this->label;
- if (isset($this->status)) {
- $label .= '
'.$langs->trans("Status").": ".$this->getLibStatut(5);
- }
$url = dol_buildpath('/recruitment/recruitmentjobposition_card.php', 1).'?id='.$this->id;
diff --git a/htdocs/theme/eldy/global.inc.php b/htdocs/theme/eldy/global.inc.php
index 783444ab07d..39855b866cb 100644
--- a/htdocs/theme/eldy/global.inc.php
+++ b/htdocs/theme/eldy/global.inc.php
@@ -1272,11 +1272,11 @@ table[summary="list_of_modules"] .fa-cog {
.minwidth500imp { min-width: 250px !important; }
}
-.widthcentpercentminusx {
- width: calc(100% - 50px) !important;
+select.widthcentpercentminusx, input.widthcentpercentminusx {
+ width: calc(100% - 52px) !important;
display: inline-block;
}
-.widthcentpercentminusxx {
+select.widthcentpercentminusxx, input.widthcentpercentminusxx {
width: calc(100% - 70px) !important;
display: inline-block;
}
diff --git a/htdocs/user/card.php b/htdocs/user/card.php
index b7b3fdc689e..6a928e0bfee 100644
--- a/htdocs/user/card.php
+++ b/htdocs/user/card.php
@@ -690,12 +690,6 @@ llxHeader('', $langs->trans("UserCard"));
if ($action == 'create' || $action == 'adduserldap')
{
- /* ************************************************************************** */
- /* */
- /* Affichage fiche en mode creation */
- /* */
- /* ************************************************************************** */
-
print load_fiche_titre($langs->trans("NewUser"), '', 'user');
print ''.$langs->trans("CreateInternalUserDesc")."
\n";
@@ -704,11 +698,7 @@ if ($action == 'create' || $action == 'adduserldap')
if (!empty($conf->ldap->enabled) && (isset($conf->global->LDAP_SYNCHRO_ACTIVE) && $conf->global->LDAP_SYNCHRO_ACTIVE == 'ldap2dolibarr'))
{
- /*
- * Affiche formulaire d'ajout d'un compte depuis LDAP
- * si on est en synchro LDAP vers Dolibarr
- */
-
+ // Show form to add an account from LDAP if sync LDAP -> Dolibarr is set
$ldap = new Ldap();
$result = $ldap->connect_bind();
if ($result >= 0)
@@ -1272,12 +1262,7 @@ if ($action == 'create' || $action == 'adduserldap')
print "";
} else {
- /* ************************************************************************** */
- /* */
- /* View and edition */
- /* */
- /* ************************************************************************** */
-
+ // View and edit mode
if ($id > 0)
{
$object->fetch($id, '', '', 1);
@@ -1576,10 +1561,12 @@ if ($action == 'create' || $action == 'adduserldap')
if (!empty($conf->stock->enabled) && !empty($conf->global->MAIN_DEFAULT_WAREHOUSE_USER))
{
require_once DOL_DOCUMENT_ROOT.'/product/stock/class/entrepot.class.php';
- $warehousestatic = new Entrepot($db);
- $warehousestatic->fetch($object->fk_warehouse);
print '
| '.$langs->trans("DefaultWarehouse").' | ';
- print $warehousestatic->getNomUrl(1);
+ if ($object->fk_warehouse > 0) {
+ $warehousestatic = new Entrepot($db);
+ $warehousestatic->fetch($object->fk_warehouse);
+ print $warehousestatic->getNomUrl(1);
+ }
print ' |
';
}