';
print '';
-print getTitleFieldOfList($langs->trans("File"), 0, $_SERVER["PHP_SELF"], 'file', "", $param, ($align?'align="'.$align.'"':''), $sortfield, $sortorder, '', 1)."\n";
print getTitleFieldOfList('', 0, $_SERVER["PHP_SELF"], 'none', "", $param, '', $sortfield, $sortorder, '', 1)."\n";
+print getTitleFieldOfList($langs->trans("File"), 0, $_SERVER["PHP_SELF"], 'file', "", $param, ($align?'align="'.$align.'"':''), $sortfield, $sortorder, '', 1)."\n";
print getTitleFieldOfList($langs->trans("Active"), 0, $_SERVER["PHP_SELF"], 'active', "", $param, 'align="center"', $sortfield, $sortorder, '', 1)."\n";
print getTitleFieldOfList('', 0, $_SERVER["PHP_SELF"], 'none', "", $param, ($align?'align="'.$align.'"':''), $sortfield, $sortorder, '', 1)."\n";
print ' ';
@@ -69,7 +69,7 @@ print '';
foreach ($triggers as $trigger)
{
print '';
- print ''.$trigger['picto'].' ';
+ print ''.$trigger['picto'].' ';
print ''.$trigger['file'].' ';
print ''.$trigger['status'].' ';
print '';
diff --git a/htdocs/asset/list.php b/htdocs/asset/list.php
index 8ea4f46c89d..9c9b8d12bff 100644
--- a/htdocs/asset/list.php
+++ b/htdocs/asset/list.php
@@ -152,8 +152,8 @@ if (empty($reshook))
// Mass actions
$objectclass='Asset';
$objectlabel='Asset';
- $permtoread = $user->rights->asset->read;
- $permtodelete = $user->rights->asset->delete;
+ $permissiontoread = $user->rights->asset->read;
+ $permissiontodelete = $user->rights->asset->delete;
$uploaddir = $conf->asset->dir_output;
include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php';
}
diff --git a/htdocs/bom/bom_card.php b/htdocs/bom/bom_card.php
index 231679f7b3a..f4124b2b9db 100644
--- a/htdocs/bom/bom_card.php
+++ b/htdocs/bom/bom_card.php
@@ -72,14 +72,14 @@ include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be inclu
// Security check - Protection if external user
//if ($user->socid > 0) access_forbidden();
//if ($user->socid > 0) $socid = $user->socid;
-//$isdraft = (($object->statut == BillOfMaterials::STATUS_DRAFT) ? 1 : 0);
+//$isdraft = (($object->statut == $object::STATUS_DRAFT) ? 1 : 0);
//$result = restrictedArea($user, 'bom', $object->id, '', '', 'fk_soc', 'rowid', $isdraft);
$permissionnote=$user->rights->bom->write; // Used by the include of actions_setnotes.inc.php
$permissiondellink=$user->rights->bom->write; // Used by the include of actions_dellink.inc.php
$permissionedit=$user->rights->bom->write; // Used by the include of actions_lineupdown.inc.php
$permissiontoadd=$user->rights->bom->write; // Used by the include of actions_addupdatedelete.inc.php
-$permissiontodelete = $user->rights->bom->delete || ($permissiontoadd && $object->status == 0);
+$permissiontodelete = $user->rights->bom->delete || ($permissiontoadd && isset($object->status) && $object->status == $object::STATUS_DRAFT);
/*
@@ -457,7 +457,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
{
$langs->load("projects");
$morehtmlref.=' '.$langs->trans('Project') . ' ';
- if ($user->rights->bom->write)
+ if ($permissiontoadd)
{
if ($action != 'classify')
$morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : ';
@@ -532,7 +532,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
}
print '';
- if (! empty($object->lines) || ($object->status == 0 && $permissiontoadd && $action != 'selectlines' && $action != 'editline'))
+ if (! empty($object->lines) || ($object->status == $object::STATUS_DRAFT && $permissiontoadd && $action != 'selectlines' && $action != 'editline'))
{
print '
';
}
@@ -555,7 +555,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
}
}
- if (! empty($object->lines) || ($object->status == 0 && $permissiontoadd && $action != 'selectlines' && $action != 'editline'))
+ if (! empty($object->lines) || ($object->status == $object::STATUS_DRAFT && $permissiontoadd && $action != 'selectlines' && $action != 'editline'))
{
print '
';
}
@@ -565,8 +565,8 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
}
-
// Buttons for actions
+
if ($action != 'presend' && $action != 'editline') {
print '
'."\n";
$parameters=array();
@@ -584,7 +584,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
}
// Modify
- if ($user->rights->bom->write)
+ if ($permissiontoadd)
{
print '
id.'&action=edit">'.$langs->trans("Modify").' '."\n";
}
@@ -619,7 +619,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
}
// Clone
- if ($user->rights->bom->write)
+ if ($permissiontoadd)
{
print '
' . $langs->trans("ToClone") . ' ';
}
@@ -638,7 +638,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
}
*/
- if ($user->rights->bom->delete)
+ if ($permissiontodelete)
{
print '
id.'&action=delete">'.$langs->trans('Delete').' '."\n";
}
diff --git a/htdocs/bom/bom_list.php b/htdocs/bom/bom_list.php
index 0775c2cc370..aa690b9468a 100644
--- a/htdocs/bom/bom_list.php
+++ b/htdocs/bom/bom_list.php
@@ -1,6 +1,5 @@
- * Copyright (C) ---Put here your own copyright and developer email---
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -114,6 +113,9 @@ if (is_array($extrafields->attributes[$object->table_element]['label']) && count
$object->fields = dol_sort_array($object->fields, 'position');
$arrayfields = dol_sort_array($arrayfields, 'position');
+$permissiontoread = $user->rights->bom->read;
+$permissiontoadd = $user->rights->bom->write;
+$permissiontodelete = $user->rights->bom->delete;
/*
@@ -151,13 +153,68 @@ if (empty($reshook))
// Mass actions
$objectclass='BOM';
$objectlabel='BillOfMaterials';
- $permtoread = $user->rights->bom->read;
- $permtodelete = $user->rights->bom->delete;
+ $permissiontoread = $user->rights->bom->read;
+ $permissiontodelete = $user->rights->bom->delete;
$uploaddir = $conf->bom->dir_output;
include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php';
-}
+ // Validate records
+ if (! $error && $massaction == 'disable' && $permissiontoadd)
+ {
+ $objecttmp=new $objectclass($db);
+
+ if (! $error)
+ {
+ $db->begin();
+
+ $nbok = 0;
+ foreach($toselect as $toselectid)
+ {
+ $result=$objecttmp->fetch($toselectid);
+ if ($result > 0)
+ {
+ if ($objecttmp->status != $objecttmp::STATUS_VALIDATED)
+ {
+ $langs->load("errors");
+ setEventMessages($langs->trans("ErrorObjectMustHaveStatusValidatedToBeDisabled", $objecttmp->ref), null, 'errors');
+ $error++;
+ break;
+ }
+
+ // Can be 'cancel()' or 'close()'
+ $result = $objecttmp->cancel($user);
+ if ($result < 0)
+ {
+ setEventMessages($objecttmp->error, $objecttmp->errors, 'errors');
+ $error++;
+ break;
+ }
+ else $nbok++;
+ }
+ else
+ {
+ setEventMessages($objecttmp->error, $objecttmp->errors, 'errors');
+ $error++;
+ break;
+ }
+ }
+
+ if (! $error)
+ {
+ if ($nbok > 1) setEventMessages($langs->trans("RecordsModified", $nbok), null, 'mesgs');
+ else setEventMessages($langs->trans("RecordsModified", $nbok), null, 'mesgs');
+ $db->commit();
+ }
+ else
+ {
+ $db->rollback();
+ }
+ //var_dump($listofobjectthirdparties);exit;
+ }
+ }
+}
+
/*
* View
@@ -303,7 +360,7 @@ include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php';
// List of mass actions available
$arrayofmassactions = array(
//'presend'=>$langs->trans("SendByMail"),
- //'builddoc'=>$langs->trans("PDFMerge"),
+ 'disable'=>$langs->trans("Disable"),
);
if ($user->rights->bom->delete) $arrayofmassactions['predelete']='
'.$langs->trans("Delete");
if (GETPOST('nomassaction', 'int') || in_array($massaction, array('presend', 'predelete'))) $arrayofmassactions=array();
@@ -539,6 +596,7 @@ print '
'."\n";
print ''."\n";
+
if (in_array('builddoc', $arrayofmassactions) && ($nbtotalofrecords === '' || $nbtotalofrecords))
{
$hidegeneratedfilelistifempty=1;
diff --git a/htdocs/bom/class/bom.class.php b/htdocs/bom/class/bom.class.php
index 4a623c3f36d..65f619cb0b2 100644
--- a/htdocs/bom/class/bom.class.php
+++ b/htdocs/bom/class/bom.class.php
@@ -91,7 +91,7 @@ class BOM extends CommonObject
'ref' => array('type'=>'varchar(128)', 'label'=>'Ref', 'enabled'=>1, 'noteditable'=>1, 'visible'=>4, 'position'=>10, 'notnull'=>1, 'default'=>'(PROV)', 'index'=>1, 'searchall'=>1, 'comment'=>"Reference of BOM", 'showoncombobox'=>'1',),
'label' => array('type'=>'varchar(255)', 'label'=>'Label', 'enabled'=>1, 'visible'=>1, 'position'=>30, 'notnull'=>1, 'searchall'=>1, 'showoncombobox'=>'1',),
'description' => array('type'=>'text', 'label'=>'Description', 'enabled'=>1, 'visible'=>-1, 'position'=>60, 'notnull'=>-1,),
- 'fk_product' => array('type'=>'integer:Product:product/class/product.class.php:1', 'label'=>'Product', 'enabled'=>1, 'visible'=>1, 'position'=>35, 'notnull'=>1, 'index'=>1, 'help'=>'ProductBOMHelp'),
+ 'fk_product' => array('type'=>'integer:Product:product/class/product.class.php:1:(finished IS NULL or finished <> 0)', 'label'=>'Product', 'enabled'=>1, 'visible'=>1, 'position'=>35, 'notnull'=>1, 'index'=>1, 'help'=>'ProductBOMHelp'),
'qty' => array('type'=>'real', 'label'=>'Quantity', 'enabled'=>1, 'visible'=>1, 'default'=>1, 'position'=>55, 'notnull'=>1, 'isameasure'=>'1', 'css'=>'maxwidth75imp'),
'efficiency' => array('type'=>'real', 'label'=>'ManufacturingEfficiency', 'enabled'=>1, 'visible'=>-1, 'default'=>1, 'position'=>100, 'notnull'=>0, 'css'=>'maxwidth50imp', 'help'=>'ValueOfMeansLoss'),
'duration' => array('type'=>'real', 'label'=>'EstimatedDuration', 'enabled'=>1, 'visible'=>-1, 'position'=>101, 'notnull'=>-1, 'css'=>'maxwidth50imp', 'help'=>'EstimatedDurationDesc'),
diff --git a/htdocs/bom/lib/bom.lib.php b/htdocs/bom/lib/bom.lib.php
index e78ef64b5c7..7da2c768b7f 100644
--- a/htdocs/bom/lib/bom.lib.php
+++ b/htdocs/bom/lib/bom.lib.php
@@ -90,7 +90,7 @@ function bomPrepareHead($object)
if (!empty($object->note_public)) $nbNote++;
$head[$h][0] = DOL_URL_ROOT.'/bom/bom_note.php?id='.$object->id;
$head[$h][1] = $langs->trans('Notes');
- if ($nbNote > 0) $head[$h][1].= '
'.$nbNote.' ';
+ if ($nbNote > 0) $head[$h][1].= '
'.$nbNote.' ';
$head[$h][2] = 'note';
$h++;
}
@@ -102,7 +102,7 @@ function bomPrepareHead($object)
$nbLinks=Link::count($db, $object->element, $object->id);
$head[$h][0] = DOL_URL_ROOT.'/bom/bom_document.php?id='.$object->id;
$head[$h][1] = $langs->trans('Documents');
- if (($nbFiles+$nbLinks) > 0) $head[$h][1].= '
'.($nbFiles+$nbLinks).' ';
+ if (($nbFiles+$nbLinks) > 0) $head[$h][1].= '
'.($nbFiles+$nbLinks).' ';
$head[$h][2] = 'document';
$h++;
diff --git a/htdocs/comm/action/list.php b/htdocs/comm/action/list.php
index 65852d053b4..48faa5ca2c0 100644
--- a/htdocs/comm/action/list.php
+++ b/htdocs/comm/action/list.php
@@ -488,7 +488,7 @@ if ($resql)
if (! empty($arrayfields['a.tms']['checked'])) print '
';
if (! empty($arrayfields['a.percent']['checked'])) {
print '
';
- $formactions->form_select_status_action('formaction', $status, 1, 'status', 1, 2);
+ $formactions->form_select_status_action('formaction', $status, 1, 'status', 1, 2, 'minwidth100imp maxwidth125');
print ajax_combobox('selectstatus');
print ' ';
}
diff --git a/htdocs/comm/mailing/list.php b/htdocs/comm/mailing/list.php
index ff69bd00c0c..0e3d7a7725e 100644
--- a/htdocs/comm/mailing/list.php
+++ b/htdocs/comm/mailing/list.php
@@ -102,8 +102,8 @@ if (empty($reshook))
// Mass actions
/*$objectclass='MyObject';
$objectlabel='MyObject';
- $permtoread = $user->rights->mymodule->read;
- $permtodelete = $user->rights->mymodule->delete;
+ $permissiontoread = $user->rights->mymodule->read;
+ $permissiontodelete = $user->rights->mymodule->delete;
$uploaddir = $conf->mymodule->dir_output;
include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php';
*/
diff --git a/htdocs/comm/propal/list.php b/htdocs/comm/propal/list.php
index a83d7ee5161..0c52fea9f35 100644
--- a/htdocs/comm/propal/list.php
+++ b/htdocs/comm/propal/list.php
@@ -241,9 +241,9 @@ if (empty($reshook))
{
$objectclass='Propal';
$objectlabel='Proposals';
- $permtoread = $user->rights->propal->lire;
- $permtodelete = $user->rights->propal->supprimer;
- $permtoclose = $user->rights->propal->cloturer;
+ $permissiontoread = $user->rights->propal->lire;
+ $permissiontodelete = $user->rights->propal->supprimer;
+ $permissiontoclose = $user->rights->propal->cloturer;
$uploaddir = $conf->propal->multidir_output[$conf->entity];
include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php';
}
diff --git a/htdocs/commande/list.php b/htdocs/commande/list.php
index 5f9906b58dc..23af81ab24e 100644
--- a/htdocs/commande/list.php
+++ b/htdocs/commande/list.php
@@ -220,8 +220,8 @@ if (empty($reshook))
// Mass actions
$objectclass='Commande';
$objectlabel='Orders';
- $permtoread = $user->rights->commande->lire;
- $permtodelete = $user->rights->commande->supprimer;
+ $permissiontoread = $user->rights->commande->lire;
+ $permissiontodelete = $user->rights->commande->supprimer;
$uploaddir = $conf->commande->multidir_output[$conf->entity];
$trigger_name='ORDER_SENTBYMAIL';
include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php';
diff --git a/htdocs/compta/bank/bankentries_list.php b/htdocs/compta/bank/bankentries_list.php
index 773ee1e9255..4a9d0947b1e 100644
--- a/htdocs/compta/bank/bankentries_list.php
+++ b/htdocs/compta/bank/bankentries_list.php
@@ -209,8 +209,8 @@ if (empty($reshook))
{
$objectclass='Account';
$objectlabel='BankTransaction';
- $permtoread = $user->rights->banque->lire;
- $permtodelete = $user->rights->banque->supprimer;
+ $permissiontoread = $user->rights->banque->lire;
+ $permissiontodelete = $user->rights->banque->supprimer;
$uploaddir = $conf->bank->dir_output;
include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php';
}
diff --git a/htdocs/compta/bank/list.php b/htdocs/compta/bank/list.php
index 524e3f44cbc..e1e7ca777b5 100644
--- a/htdocs/compta/bank/list.php
+++ b/htdocs/compta/bank/list.php
@@ -1,6 +1,6 @@
- * Copyright (C) 2004-2016 Laurent Destailleur
+ * Copyright (C) 2004-2019 Laurent Destailleur
* Copyright (C) 2005-2012 Regis Houssin
* Copyright (C) 2015 Jean-François Ferry
* Copyright (C) 2018 Ferran Marcet
@@ -512,8 +512,7 @@ foreach ($accounts as $key=>$type)
} else {
print ''.$result->nbtodo.' ';
if ($result->nbtodolate) {
- print ' ';
- print '';
+ print '';
print ' '.$result->nbtodolate;
print ' ';
}
diff --git a/htdocs/compta/cashcontrol/cashcontrol_list.php b/htdocs/compta/cashcontrol/cashcontrol_list.php
index e0461d35368..45129b6ee19 100644
--- a/htdocs/compta/cashcontrol/cashcontrol_list.php
+++ b/htdocs/compta/cashcontrol/cashcontrol_list.php
@@ -168,8 +168,8 @@ if (empty($reshook))
// Mass actions
$objectclass='CashControl';
$objectlabel='CashControl';
- $permtoread = ($user->rights->cashdesk->use || $user->rights->takepos->use);
- $permtodelete = ($user->rights->cashdesk->use || $user->rights->takepos->use);
+ $permissiontoread = ($user->rights->cashdesk->use || $user->rights->takepos->use);
+ $permissiontodelete = ($user->rights->cashdesk->use || $user->rights->takepos->use);
//$uploaddir = '';
//include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php';
diff --git a/htdocs/compta/facture/fiche-rec.php b/htdocs/compta/facture/card-rec.php
similarity index 94%
rename from htdocs/compta/facture/fiche-rec.php
rename to htdocs/compta/facture/card-rec.php
index 2c5cd1a87c7..49cb9529c71 100644
--- a/htdocs/compta/facture/fiche-rec.php
+++ b/htdocs/compta/facture/card-rec.php
@@ -25,7 +25,7 @@
*/
/**
- * \file htdocs/compta/facture/fiche-rec.php
+ * \file htdocs/compta/facture/card-rec.php
* \ingroup facture
* \brief Page to show predefined invoice
*/
@@ -146,8 +146,8 @@ if (empty($reshook))
// Mass actions
/*$objectclass='MyObject';
$objectlabel='MyObject';
- $permtoread = $user->rights->mymodule->read;
- $permtodelete = $user->rights->mymodule->delete;
+ $permissiontoread = $user->rights->mymodule->read;
+ $permissiontodelete = $user->rights->mymodule->delete;
$uploaddir = $conf->mymodule->dir_output;
include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php';*/
@@ -387,6 +387,15 @@ if (empty($reshook))
setEventMessages($object->error, $object->errors, 'errors');
}
}
+ // Multicurrency Code
+ elseif ($action == 'setmulticurrencycode' && $usercancreate) {
+ $result = $object->setMulticurrencyCode(GETPOST('multicurrency_code', 'alpha'));
+ }
+
+ // Multicurrency rate
+ elseif ($action == 'setmulticurrencyrate' && $usercancreate) {
+ $result = $object->setMulticurrencyRate(price2num(GETPOST('multicurrency_tx')), GETPOST('calculation_mode', 'int'));
+ }
// Delete line
if ($action == 'confirm_deleteline' && $confirm == 'yes' && $user->rights->facture->creer)
@@ -1346,6 +1355,52 @@ else
}
print ' ';
+ // Multicurrency
+ if (! empty($conf->multicurrency->enabled))
+ {
+ // Multicurrency code
+ print '';
+ print '';
+ print '';
+ print ' ';
+ $htmlname = (($usercancreate && $action == 'editmulticurrencycode')?'multicurrency_code':'none');
+ $form->form_multicurrency_code($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->multicurrency_code, $htmlname);
+ print ' ';
+
+ // Multicurrency rate
+ if ($object->multicurrency_code != $conf->currency || $object->multicurrency_tx != 1)
+ {
+ print '';
+ print '';
+ print '';
+ print ' ';
+ if ($action == 'editmulticurrencyrate' || $action == 'actualizemulticurrencyrate') {
+ if($action == 'actualizemulticurrencyrate') {
+ list($object->fk_multicurrency, $object->multicurrency_tx) = MultiCurrency::getIdAndTxFromCode($object->db, $object->multicurrency_code);
+ }
+ $form->form_multicurrency_rate($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->multicurrency_tx, ($usercancreate?'multicurrency_tx':'none'), $object->multicurrency_code);
+ } else {
+ $form->form_multicurrency_rate($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->multicurrency_tx, 'none', $object->multicurrency_code);
+ if($object->statut == $object::STATUS_DRAFT && $object->multicurrency_code && $object->multicurrency_code != $conf->currency) {
+ print '';
+ }
+ }
+ print ' ';
+ }
+ }
+
// Help of substitution key
$dateexample=dol_now();
if (! empty($object->frequency) && ! empty($object->date_when)) $dateexample=$object->date_when;
@@ -1701,11 +1756,11 @@ else
{
if (empty($object->suspended))
{
- print '';
+ print '';
}
else
{
- print '';
+ print '';
}
}
diff --git a/htdocs/compta/facture/card.php b/htdocs/compta/facture/card.php
index 7aff05a8c03..fce1fb7cb25 100644
--- a/htdocs/compta/facture/card.php
+++ b/htdocs/compta/facture/card.php
@@ -2579,7 +2579,6 @@ $title = $langs->trans('InvoiceCustomer') . " - " . $langs->trans('Card');
$helpurl = "EN:Customers_Invoices|FR:Factures_Clients|ES:Facturas_a_clientes";
llxHeader('', $title, $helpurl);
-
// Mode creation
if ($action == 'create')
@@ -2600,18 +2599,19 @@ if ($action == 'create')
{
// Parse element/subelement (ex: project_task)
$element = $subelement = $origin;
+ $regs = array();
if (preg_match('/^([^_]+)_([^_]+)/i', $origin, $regs)) {
- $element = $regs [1];
- $subelement = $regs [2];
+ $element = $reg[1];
+ $subelement = $regs[2];
}
if ($element == 'project') {
$projectid = $originid;
- if (!$cond_reglement_id) {
+ if (empty($cond_reglement_id)) {
$cond_reglement_id = $soc->cond_reglement_id;
}
- if (!$mode_reglement_id) {
+ if (empty($mode_reglement_id)) {
$mode_reglement_id = $soc->mode_reglement_id;
}
if (!$remise_percent) {
@@ -2754,7 +2754,7 @@ if ($action == 'create')
// Thirdparty
print '' . $langs->trans('Customer') . ' ';
- if ($soc->id > 0 && ! GETPOST('fac_rec', 'alpha'))
+ if ($soc->id > 0 && ! GETPOST('fac_rec', 'int'))
{
print '';
print $soc->getNomUrl(1);
@@ -2797,7 +2797,7 @@ if ($action == 'create')
$exampletemplateinvoice=new FactureRec($db);
- // Overwrite value if creation of invoice is from a predefined invoice
+ // Overwrite some values if creation of invoice is from a predefined invoice
if (empty($origin) && empty($originid) && GETPOST('fac_rec', 'int') > 0)
{
$invoice_predefined = new FactureRec($db);
@@ -2811,6 +2811,9 @@ if ($action == 'create')
$note_public = $invoice_predefined->note_public;
$note_private = $invoice_predefined->note_private;
+ if (! empty($invoice_predefined->multicurrency_code)) $currency_code = $invoice_predefined->multicurrency_code;
+ if (! empty($invoice_predefined->multicurrency_tx)) $currency_tx = $invoice_predefined->multicurrency_tx;
+
$sql = 'SELECT r.rowid, r.titre as title, r.total_ttc';
$sql .= ' FROM ' . MAIN_DB_PREFIX . 'facture_rec as r';
$sql .= ' WHERE r.fk_soc = ' . $invoice_predefined->socid;
@@ -2833,7 +2836,7 @@ if ($action == 'create')
if (GETPOST('fac_rec') == $objp->rowid)
{
print ' selected';
- $exampletemplateinvoice->fetch(GETPOST('fac_rec'));
+ $exampletemplateinvoice->fetch(GETPOST('fac_rec', 'int'));
}
print '>' . $objp->title . ' (' . price($objp->total_ttc) . ' ' . $langs->trans("TTC") . ')';
$i ++;
@@ -2921,12 +2924,17 @@ if ($action == 'create')
// Next situation invoice
$opt = $form->selectSituationInvoices(GETPOST('originid'), $socid);
+
print '';
$tmp='
' . $langs->trans('NoSituations') . '') || (GETPOST('origin') && GETPOST('origin') != 'facture' && GETPOST('origin') != 'commande')) $tmp.=' disabled';
+ if ($opt == ('
' . $langs->trans('NoSituations') . ' ') || (GETPOST('origin') && GETPOST('origin') != 'facture' && GETPOST('origin') != 'commande'))
+ $tmp.=' disabled';
$tmp.= '> ';
$text = '
'.$tmp.$langs->trans("InvoiceSituationAsk") . ' ';
- $text .= '
';
+ $text .= '' . $langs->trans('NoSituations') . '') || (GETPOST('origin') && GETPOST('origin') != 'facture' && GETPOST('origin') != 'commande'))
+ $text .= ' disabled';
+ $text .='>';
$text .= $opt;
$text .= ' ';
$desc = $form->textwithpicto($text, $langs->transnoentities("InvoiceSituationDesc"), 1, 'help', '', 0, 3);
@@ -5026,7 +5034,7 @@ elseif ($id > 0 || ! empty($ref))
{
if (! $objectidnext && count($object->lines) > 0)
{
- print '' . $langs->trans("ChangeIntoRepeatableInvoice") . ' ';
+ print '' . $langs->trans("ChangeIntoRepeatableInvoice") . ' ';
}
}
diff --git a/htdocs/compta/facture/class/facture-rec.class.php b/htdocs/compta/facture/class/facture-rec.class.php
index 9ff90b7b025..408ce2c1303 100644
--- a/htdocs/compta/facture/class/facture-rec.class.php
+++ b/htdocs/compta/facture/class/facture-rec.class.php
@@ -896,7 +896,7 @@ class FactureRec extends CommonInvoice
* @param int $date_start_fill 1=Flag to fill start date when generating invoice
* @param int $date_end_fill 1=Flag to fill end date when generating invoice
* @param int $fk_fournprice Id of origin supplier price
- * @param int $pa_ht Price (without tax) of product when it was bought
+ * @param int $pa_ht Price (without tax) of product for margin calculation
* @return int <0 if KO, Id of line if OK
*/
public function updateline($rowid, $desc, $pu_ht, $qty, $txtva, $txlocaltax1 = 0, $txlocaltax2 = 0, $fk_product = 0, $remise_percent = 0, $price_base_type = 'HT', $info_bits = 0, $fk_remise_except = '', $pu_ttc = 0, $type = 0, $rang = -1, $special_code = 0, $label = '', $fk_unit = null, $pu_ht_devise = 0, $notrigger = 0, $date_start_fill = 0, $date_end_fill = 0, $fk_fournprice = null, $pa_ht = 0)
@@ -920,8 +920,9 @@ class FactureRec extends CommonInvoice
$remise_percent=price2num($remise_percent);
$qty=price2num($qty);
if (empty($info_bits)) $info_bits=0;
- $pu_ht=price2num($pu_ht);
- $pu_ttc=price2num($pu_ttc);
+ $pu_ht = price2num($pu_ht);
+ $pu_ttc = price2num($pu_ttc);
+ $pu_ht_devise = price2num($pu_ht_devise);
$txtva=price2num($txtva);
$txlocaltax1 = price2num($txlocaltax1);
$txlocaltax2 = price2num($txlocaltax2);
@@ -1258,7 +1259,7 @@ class FactureRec extends CommonInvoice
}
}
- $url = DOL_URL_ROOT.'/compta/facture/fiche-rec.php?facid='.$this->id;
+ $url = DOL_URL_ROOT.'/compta/facture/card-rec.php?facid='.$this->id;
if ($short) return $url;
diff --git a/htdocs/compta/facture/invoicetemplate_list.php b/htdocs/compta/facture/invoicetemplate_list.php
index 09873f5ee61..941aa0723ef 100644
--- a/htdocs/compta/facture/invoicetemplate_list.php
+++ b/htdocs/compta/facture/invoicetemplate_list.php
@@ -191,8 +191,8 @@ if (empty($reshook))
// Mass actions
/*$objectclass='MyObject';
$objectlabel='MyObject';
- $permtoread = $user->rights->mymodule->read;
- $permtodelete = $user->rights->mymodule->delete;
+ $permissiontoread = $user->rights->mymodule->read;
+ $permissiontodelete = $user->rights->mymodule->delete;
$uploaddir = $conf->mymodule->dir_output;
include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php';*/
}
diff --git a/htdocs/compta/facture/list.php b/htdocs/compta/facture/list.php
index 74c27c1e467..43f8d41db10 100644
--- a/htdocs/compta/facture/list.php
+++ b/htdocs/compta/facture/list.php
@@ -265,9 +265,9 @@ if (empty($reshook))
{
$objectclass='Facture';
$objectlabel='Invoices';
- $permtoread = $user->rights->facture->lire;
- $permtocreate = $user->rights->facture->creer;
- $permtodelete = $user->rights->facture->supprimer;
+ $permissiontoread = $user->rights->facture->lire;
+ $permissiontoadd = $user->rights->facture->creer;
+ $permissiontodelete = $user->rights->facture->supprimer;
$uploaddir = $conf->facture->dir_output;
include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php';
}
diff --git a/htdocs/contact/list.php b/htdocs/contact/list.php
index f8d92d19b34..d23963fde0a 100644
--- a/htdocs/contact/list.php
+++ b/htdocs/contact/list.php
@@ -254,8 +254,8 @@ if (empty($reshook))
// Mass actions
$objectclass='Contact';
$objectlabel='Contact';
- $permtoread = $user->rights->societe->lire;
- $permtodelete = $user->rights->societe->supprimer;
+ $permissiontoread = $user->rights->societe->lire;
+ $permissiontodelete = $user->rights->societe->supprimer;
$uploaddir = $conf->societe->dir_output;
include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php';
}
diff --git a/htdocs/contrat/class/contrat.class.php b/htdocs/contrat/class/contrat.class.php
index 0b9c6768eda..7049ce77076 100644
--- a/htdocs/contrat/class/contrat.class.php
+++ b/htdocs/contrat/class/contrat.class.php
@@ -1875,8 +1875,8 @@ class Contrat extends CommonObject
/**
* Return label of a contract status
*
- * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Long label of all services, 5=Libelle court + Picto, 6=Picto of all services, 7=Same than 6 with fixed length
- * @return string Label
+ * @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, 7=Same than 6 with fixed length
+ * @return string Label
*/
public function getLibStatut($mode)
{
@@ -1888,7 +1888,7 @@ class Contrat extends CommonObject
* Renvoi label of a given contrat status
*
* @param int $status Id status
- * @param int $mode 0=Long label, 1=Short label, 2=Picto + Libelle court, 3=Picto, 4=Picto + Long label of all services, 5=Libelle court + Picto, 6=Picto of all services, 7=Same than 6 with fixed length
+ * @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, 7=Same than 6 with fixed length
* @return string Label
*/
public function LibStatut($status, $mode)
@@ -1921,13 +1921,13 @@ class Contrat extends CommonObject
$text.=': ';
$text.='';
}
- $text.=($mode == 7?'':'');
+ $text.=($mode == 7?'':'');
$text.=($mode != 7 || $this->nbofserviceswait > 0) ? ($this->nbofserviceswait.ContratLigne::LibStatut(0, 3, -1, 'class="marginleft2"')).(($mode != 7 || $this->nbofservicesopened || $this->nbofservicesexpired || $this->nbofservicesclosed)?' ':'') : '';
- $text.=($mode == 7?' ':'');
+ $text.=($mode == 7?' ':'');
$text.=($mode != 7 || $this->nbofservicesopened > 0) ? ($this->nbofservicesopened.ContratLigne::LibStatut(4, 3, 0, 'class="marginleft2"')).(($mode != 7 || $this->nbofservicesexpired || $this->nbofservicesclosed)?' ':'') : '';
- $text.=($mode == 7?' ':'');
+ $text.=($mode == 7?' ':'');
$text.=($mode != 7 || $this->nbofservicesexpired > 0) ? ($this->nbofservicesexpired.ContratLigne::LibStatut(4, 3, 1, 'class="marginleft2"')).(($mode != 7 || $this->nbofservicesclosed)?' ':'') : '';
- $text.=($mode == 7?' ':'');
+ $text.=($mode == 7?' ':'');
$text.=($mode != 7 || $this->nbofservicesclosed > 0) ? ($this->nbofservicesclosed.ContratLigne::LibStatut(5, 3, -1, 'class="marginleft2"')) : '';
$text.=($mode == 7?' ':'');
return $text;
diff --git a/htdocs/contrat/list.php b/htdocs/contrat/list.php
index 3df193d53d2..f24105a93db 100644
--- a/htdocs/contrat/list.php
+++ b/htdocs/contrat/list.php
@@ -188,8 +188,8 @@ if (empty($reshook))
{
$objectclass='Contrat';
$objectlabel='Contracts';
- $permtoread = $user->rights->contrat->lire;
- $permtodelete = $user->rights->contrat->supprimer;
+ $permissiontoread = $user->rights->contrat->lire;
+ $permissiontodelete = $user->rights->contrat->supprimer;
$uploaddir = $conf->contrat->dir_output;
include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php';
}
@@ -591,10 +591,10 @@ if (! empty($arrayfields['lower_planned_end_date']['checked'])) {
print_liste_field_titre($arrayfields['lower_planned_end_date']['label'], $_SERVER["PHP_SELF"], "lower_planned_end_date", "", $param, '', $sortfield, $sortorder, 'center ');
}
if (! empty($arrayfields['status']['checked'])) {
- print_liste_field_titre($staticcontratligne->LibStatut(0, 3), '', '', '', '', 'width="16"');
- print_liste_field_titre($staticcontratligne->LibStatut(4, 3, 0), '', '', '', '', 'width="16"');
- print_liste_field_titre($staticcontratligne->LibStatut(4, 3, 1), '', '', '', '', 'width="16"');
- print_liste_field_titre($staticcontratligne->LibStatut(5, 3), '', '', '', '', 'width="16"');
+ print_liste_field_titre($staticcontratligne->LibStatut(0, 3, -1, 'class="nochangebackground"'), '', '', '', '', 'width="16"');
+ print_liste_field_titre($staticcontratligne->LibStatut(4, 3, 0, 'class="nochangebackground"'), '', '', '', '', 'width="16"');
+ print_liste_field_titre($staticcontratligne->LibStatut(4, 3, 1, 'class="nochangebackground"'), '', '', '', '', 'width="16"');
+ print_liste_field_titre($staticcontratligne->LibStatut(5, 3, -1, 'class="nochangebackground"'), '', '', '', '', 'width="16"');
}
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ');
print "\n";
diff --git a/htdocs/core/actions_massactions.inc.php b/htdocs/core/actions_massactions.inc.php
index febcba244c0..07f294479b3 100644
--- a/htdocs/core/actions_massactions.inc.php
+++ b/htdocs/core/actions_massactions.inc.php
@@ -30,7 +30,7 @@
// $objectclass and $objectlabel must be defined
// $parameters, $object, $action must be defined for the hook.
-// $permtoread, $permtocreate and $permtodelete may be defined
+// $permissiontoread, $permissiontoadd, $permissiontodelete, $permissiontoclose may be defined
// $uploaddir may be defined (example to $conf->projet->dir_output."/";)
// $toselect may be defined
// $diroutputmassaction may be defined
@@ -43,6 +43,11 @@ if (empty($objectclass) || empty($uploaddir))
exit;
}
+// For backward compatibility
+if (! empty($permtoread) && empty($permissiontoread)) $permissiontoread = $permtoread;
+if (! empty($permtocreate) && empty($permissiontoadd)) $permissiontoadd = $permtocreate;
+if (! empty($permtodelete) && empty($permissiontodelete)) $permissiontoread = $permtodelete;
+
// Mass actions. Controls on number of lines checked.
$maxformassaction=(empty($conf->global->MAIN_LIMIT_FOR_MASS_ACTIONS)?1000:$conf->global->MAIN_LIMIT_FOR_MASS_ACTIONS);
@@ -924,7 +929,7 @@ if (!$error && $massaction == 'cancelorders')
}
-if (! $error && $massaction == "builddoc" && $permtoread && ! GETPOST('button_search'))
+if (! $error && $massaction == "builddoc" && $permissiontoread && ! GETPOST('button_search'))
{
if (empty($diroutputmassaction))
{
@@ -1105,7 +1110,7 @@ if ($action == 'remove_file')
}
// Validate records
-if (! $error && $massaction == 'validate' && $permtocreate)
+if (! $error && $massaction == 'validate' && $permissiontoadd)
{
$objecttmp=new $objectclass($db);
@@ -1170,8 +1175,9 @@ if (! $error && $massaction == 'validate' && $permtocreate)
//var_dump($listofobjectthirdparties);exit;
}
}
+
// Closed records
-if (!$error && $massaction == 'closed' && $objectclass == "Propal" && $permtoclose) {
+if (!$error && $massaction == 'closed' && $objectclass == "Propal" && $permissiontoclose) {
$db->begin();
$objecttmp = new $objectclass($db);
@@ -1206,7 +1212,7 @@ if (!$error && $massaction == 'closed' && $objectclass == "Propal" && $permtoclo
}
}
// Delete record from mass action (massaction = 'delete' for direct delete, action/confirm='delete'/'yes' with a confirmation step before)
-if (! $error && ($massaction == 'delete' || ($action == 'delete' && $confirm == 'yes')) && $permtodelete)
+if (! $error && ($massaction == 'delete' || ($action == 'delete' && $confirm == 'yes')) && $permissiontodelete)
{
$db->begin();
@@ -1272,7 +1278,7 @@ if (! $error && ($massaction == 'delete' || ($action == 'delete' && $confirm ==
// Generate document foreach object according to model linked to object
// @TODO : propose model selection
-if (! $error && $massaction == 'generate_doc' && $permtoread)
+if (! $error && $massaction == 'generate_doc' && $permissiontoread)
{
$db->begin();
diff --git a/htdocs/core/boxes/box_accountancy_last_manual_entries.php b/htdocs/core/boxes/box_accountancy_last_manual_entries.php
index 2c788b66b71..474280d17a7 100644
--- a/htdocs/core/boxes/box_accountancy_last_manual_entries.php
+++ b/htdocs/core/boxes/box_accountancy_last_manual_entries.php
@@ -133,7 +133,7 @@ class box_accountancy_last_manual_entries extends ModeleBoxes
);
$this->info_box_contents[$line][] = array(
- 'td' => 'class="nowrap right"',
+ 'td' => 'class="nowraponall right"',
'text' => price($amount, 0, $langs, 0, -1, -1, $conf->currency),
);
diff --git a/htdocs/core/boxes/box_activity.php b/htdocs/core/boxes/box_activity.php
index 9609f596618..4864bcad371 100644
--- a/htdocs/core/boxes/box_activity.php
+++ b/htdocs/core/boxes/box_activity.php
@@ -173,7 +173,7 @@ class box_activity extends ModeleBoxes
$totalnb += $data[$j]->nb;
$this->info_box_contents[$line][3] = array(
- 'td' => 'class="nowrap right"',
+ 'td' => 'class="nowraponall right"',
'text' => price($data[$j]->Mnttot, 1, $langs, 0, 0, -1, $conf->currency),
);
$this->info_box_contents[$line][4] = array(
@@ -255,7 +255,7 @@ class box_activity extends ModeleBoxes
$totalnb += $data[$j]->nb;
$this->info_box_contents[$line][3] = array(
- 'td' => 'class="nowrap right"',
+ 'td' => 'class="nowraponall right"',
'text' => price($data[$j]->Mnttot, 1, $langs, 0, 0, -1, $conf->currency),
);
$this->info_box_contents[$line][4] = array(
@@ -339,7 +339,7 @@ class box_activity extends ModeleBoxes
);
$this->info_box_contents[$line][3] = array(
- 'td' => 'class="nowrap right"',
+ 'td' => 'class="nowraponall right"',
'text' => price($data[$j]->Mnttot, 1, $langs, 0, 0, -1, $conf->currency)
);
@@ -421,7 +421,7 @@ class box_activity extends ModeleBoxes
);
$totalnb += $data[$j]->nb;
$this->info_box_contents[$line][3] = array(
- 'td' => 'class="nowrap right"',
+ 'td' => 'class="nowraponall right"',
'text' => price($data[$j]->Mnttot, 1, $langs, 0, 0, -1, $conf->currency),
);
$this->info_box_contents[$line][4] = array(
diff --git a/htdocs/core/boxes/box_boms.php b/htdocs/core/boxes/box_boms.php
index b4ac04b3051..8f27ff739e0 100644
--- a/htdocs/core/boxes/box_boms.php
+++ b/htdocs/core/boxes/box_boms.php
@@ -116,7 +116,7 @@ class box_boms extends ModeleBoxes
$productstatic->ref = $objp->product_ref;
$this->info_box_contents[$line][] = array(
- 'td' => '',
+ 'td' => 'class="nowraponall"',
'text' => $bomstatic->getNomUrl(1),
'asis' => 1,
);
diff --git a/htdocs/core/boxes/box_commandes.php b/htdocs/core/boxes/box_commandes.php
index 40d809fd6e7..c8a050ea1d4 100644
--- a/htdocs/core/boxes/box_commandes.php
+++ b/htdocs/core/boxes/box_commandes.php
@@ -135,7 +135,7 @@ class box_commandes extends ModeleBoxes
$societestatic->logo = $objp->logo;
$this->info_box_contents[$line][] = array(
- 'td' => '',
+ 'td' => 'class="nowraponall"',
'text' => $commandestatic->getNomUrl(1),
'asis' => 1,
);
@@ -147,7 +147,7 @@ class box_commandes extends ModeleBoxes
);
$this->info_box_contents[$line][] = array(
- 'td' => 'class="nowrap right"',
+ 'td' => 'class="nowraponall right"',
'text' => price($objp->total_ht, 0, $langs, 0, -1, -1, $conf->currency),
);
diff --git a/htdocs/core/boxes/box_comptes.php b/htdocs/core/boxes/box_comptes.php
index c4259b6252a..00f5722076c 100644
--- a/htdocs/core/boxes/box_comptes.php
+++ b/htdocs/core/boxes/box_comptes.php
@@ -154,7 +154,7 @@ class box_comptes extends ModeleBoxes
);
$this->info_box_contents[$line][] = array(
- 'td' => 'class="liste_total right"',
+ 'td' => 'class="liste_total right nowraponall"',
'text' => price($solde, 0, $langs, 0, -1, -1, $key)
);
$line++;
diff --git a/htdocs/core/boxes/box_contacts.php b/htdocs/core/boxes/box_contacts.php
index 5bdb17ba0b9..9140b9b9d43 100644
--- a/htdocs/core/boxes/box_contacts.php
+++ b/htdocs/core/boxes/box_contacts.php
@@ -136,13 +136,13 @@ class box_contacts extends ModeleBoxes
$societestatic->fournisseur = $objp->fournisseur;
$this->info_box_contents[$line][] = array(
- 'td' => '',
+ 'td' => 'class="tdoverflowmax150 maxwidth150onsmartphone"',
'text' => $contactstatic->getNomUrl(1),
'asis' => 1,
);
$this->info_box_contents[$line][] = array(
- 'td' => '',
+ 'td' => 'class="tdoverflowmax150 maxwidth150onsmartphone"',
'text' => ($objp->fk_soc > 0 ? $societestatic->getNomUrl(1) : ''),
'asis' => 1,
);
@@ -164,7 +164,8 @@ class box_contacts extends ModeleBoxes
if ($num==0)
$this->info_box_contents[$line][0] = array(
'td' => 'class="center"',
- 'text'=>$langs->trans("NoRecordedContacts"),
+ 'text'=> ''.$langs->trans("NoRecordedContacts").' ',
+ 'asis'=> 1
);
$this->db->free($result);
diff --git a/htdocs/core/boxes/box_contracts.php b/htdocs/core/boxes/box_contracts.php
index 37fdf45f118..36a4f5416f9 100644
--- a/htdocs/core/boxes/box_contracts.php
+++ b/htdocs/core/boxes/box_contracts.php
@@ -136,7 +136,7 @@ class box_contracts extends ModeleBoxes
// if ($objp->fk_statut == 1 && $dateterm < ($now - $conf->contrat->cloture->warning_delay)) { $late = img_warning($langs->trans("Late")); }
$this->info_box_contents[$line][] = array(
- 'td' => '',
+ 'td' => 'class="nowraponall"',
'text' => $contractstatic->getNomUrl(1),
'text2'=> $late,
'asis'=>1
diff --git a/htdocs/core/boxes/box_factures_fourn_imp.php b/htdocs/core/boxes/box_factures_fourn_imp.php
index 3c0fc6444a2..d4cb4143463 100644
--- a/htdocs/core/boxes/box_factures_fourn_imp.php
+++ b/htdocs/core/boxes/box_factures_fourn_imp.php
@@ -145,13 +145,13 @@ class box_factures_fourn_imp extends ModeleBoxes
);
$this->info_box_contents[$line][] = array(
- 'td' => '',
+ 'td' => 'class="tdoverflowmax150 maxwidth150onsmartphone"',
'text' => $thirdpartytmp->getNomUrl(1, '', 40),
'asis' => 1,
);
$this->info_box_contents[$line][] = array(
- 'td' => 'class="nowrap right"',
+ 'td' => 'class="nowraponall right"',
'text' => price($objp->total_ht, 0, $langs, 0, -1, -1, $conf->currency),
);
diff --git a/htdocs/core/boxes/box_factures_imp.php b/htdocs/core/boxes/box_factures_imp.php
index 992e1333390..bb6eb95b32f 100644
--- a/htdocs/core/boxes/box_factures_imp.php
+++ b/htdocs/core/boxes/box_factures_imp.php
@@ -150,20 +150,20 @@ class box_factures_imp extends ModeleBoxes
}
$this->info_box_contents[$line][] = array(
- 'td' => '',
+ 'td' => 'class="nowraponall"',
'text' => $facturestatic->getNomUrl(1),
'text2'=> $late,
'asis' => 1,
);
$this->info_box_contents[$line][] = array(
- 'td' => '',
+ 'td' => 'class="tdoverflowmax150 maxwidth150onsmartphone"',
'text' => $societestatic->getNomUrl(1, '', 44),
'asis' => 1,
);
$this->info_box_contents[$line][] = array(
- 'td' => 'class="nowrap right"',
+ 'td' => 'class="nowraponall right"',
'text' => price($objp->total_ht, 0, $langs, 0, -1, -1, $conf->currency),
);
diff --git a/htdocs/core/boxes/box_ficheinter.php b/htdocs/core/boxes/box_ficheinter.php
index b0851ed28c0..a81b0cf3b86 100644
--- a/htdocs/core/boxes/box_ficheinter.php
+++ b/htdocs/core/boxes/box_ficheinter.php
@@ -120,13 +120,13 @@ class box_ficheinter extends ModeleBoxes
$companystatic->email = $objp->semail;
$this->info_box_contents[$i][] = array(
- 'td' => '',
+ 'td' => 'class="nowraponall"',
'text' => $ficheinterstatic->getNomUrl(1),
'asis' => 1,
);
$this->info_box_contents[$i][] = array(
- 'td' => '',
+ 'td' => 'class="tdoverflowmax150 maxwidth150onsmartphone"',
'text' => $companystatic->getNomUrl(1),
'asis' => 1,
);
diff --git a/htdocs/core/boxes/box_last_modified_ticket.php b/htdocs/core/boxes/box_last_modified_ticket.php
index de2bbd79181..18c2ebfe340 100644
--- a/htdocs/core/boxes/box_last_modified_ticket.php
+++ b/htdocs/core/boxes/box_last_modified_ticket.php
@@ -140,7 +140,7 @@ class box_last_modified_ticket extends ModeleBoxes
// Ticket
$this->info_box_contents[$i][0] = array(
- 'td' => 'class="left"',
+ 'td' => 'class="nowraponall"',
'text' => $ticket->getNomUrl(1),
'asis' => 1,
);
@@ -148,7 +148,7 @@ class box_last_modified_ticket extends ModeleBoxes
// Subject
$this->info_box_contents[$i][$r] = array(
- 'td' => 'class="left"',
+ 'td' => 'class="nowrap"',
'text' => $objp->subject, // Some event have no ref
'url' => DOL_URL_ROOT."/ticket/card.php?track_id=".$objp->track_id,
);
@@ -156,7 +156,7 @@ class box_last_modified_ticket extends ModeleBoxes
// Customer
$this->info_box_contents[$i][$r] = array(
- 'td' => 'class="left"',
+ 'td' => 'class="tdoverflowmax150 maxwidth300onsmartphone"',
'text' => $link,
'asis' => 1,
);
@@ -172,7 +172,7 @@ class box_last_modified_ticket extends ModeleBoxes
// Statut
$this->info_box_contents[$i][$r] = array(
- 'td' => 'class="right"',
+ 'td' => 'class="right nowraponall"',
'text' => $ticket->getLibStatut(3)
);
$r++;
diff --git a/htdocs/core/boxes/box_last_ticket.php b/htdocs/core/boxes/box_last_ticket.php
index 4c66c647477..4a0842139d6 100644
--- a/htdocs/core/boxes/box_last_ticket.php
+++ b/htdocs/core/boxes/box_last_ticket.php
@@ -141,7 +141,7 @@ class box_last_ticket extends ModeleBoxes
// Ticket
$this->info_box_contents[$i][$r] = array(
- 'td' => 'class="left"',
+ 'td' => 'class="nowraponall"',
'text' => $ticket->getNomUrl(1),
'asis' => 1
);
@@ -149,7 +149,7 @@ class box_last_ticket extends ModeleBoxes
// Subject
$this->info_box_contents[$i][$r] = array(
- 'td' => 'class="left"',
+ 'td' => '',
'text' => $objp->subject, // Some event have no ref
'url' => DOL_URL_ROOT."/ticket/card.php?track_id=" . $objp->track_id,
);
@@ -157,7 +157,7 @@ class box_last_ticket extends ModeleBoxes
// Customer
$this->info_box_contents[$i][$r] = array(
- 'td' => 'class="left"',
+ 'td' => '',
'text' => $link,
'asis' => 1,
);
@@ -172,7 +172,7 @@ class box_last_ticket extends ModeleBoxes
// Statut
$this->info_box_contents[$i][$r] = array(
- 'td' => 'class="right"',
+ 'td' => 'class="right nowraponall"',
'text' => $ticket->getLibStatut(3),
);
$r++;
diff --git a/htdocs/core/boxes/box_lastlogin.php b/htdocs/core/boxes/box_lastlogin.php
index 970619ee7ac..7a6c74e216c 100644
--- a/htdocs/core/boxes/box_lastlogin.php
+++ b/htdocs/core/boxes/box_lastlogin.php
@@ -78,11 +78,11 @@ class box_lastlogin extends ModeleBoxes
$line=0;
$this->info_box_contents[$line][0] = array(
- 'td' => '',
+ 'td' => 'class="tdoverflowmax150 maxwidth150onsmartphone"',
'text' => $langs->trans("User"),
);
$this->info_box_contents[$line][1] = array(
- 'td' => '',
+ 'td' => 'class="tdoverflowmax150 maxwidth150onsmartphone"',
'text' => $user->getNomUrl(-1),
'asis' => 1
);
diff --git a/htdocs/core/boxes/box_members.php b/htdocs/core/boxes/box_members.php
index 29f37751ce9..242f26e5d60 100644
--- a/htdocs/core/boxes/box_members.php
+++ b/htdocs/core/boxes/box_members.php
@@ -124,13 +124,13 @@ class box_members extends ModeleBoxes
}
$this->info_box_contents[$line][] = array(
- 'td' => '',
+ 'td' => 'class="tdoverflowmax150 maxwidth150onsmartphone"',
'text' => $memberstatic->getNomUrl(1),
'asis' => 1,
);
$this->info_box_contents[$line][] = array(
- 'td' => '',
+ 'td' => 'class="tdoverflowmax150 maxwidth150onsmartphone"',
'text' => $memberstatic->company,
'url' => DOL_URL_ROOT."/adherents/card.php?rowid=".$objp->rowid,
);
diff --git a/htdocs/core/boxes/box_mos.php b/htdocs/core/boxes/box_mos.php
index 32ae864fc2f..949f63776f6 100644
--- a/htdocs/core/boxes/box_mos.php
+++ b/htdocs/core/boxes/box_mos.php
@@ -116,7 +116,7 @@ class box_mos extends ModeleBoxes
$productstatic->ref = $objp->product_ref;
$this->info_box_contents[$line][] = array(
- 'td' => '',
+ 'td' => 'class="nowraponall"',
'text' => $mostatic->getNomUrl(1),
'asis' => 1,
);
diff --git a/htdocs/core/boxes/box_project.php b/htdocs/core/boxes/box_project.php
index 48a6d260e2c..edd6c89054d 100644
--- a/htdocs/core/boxes/box_project.php
+++ b/htdocs/core/boxes/box_project.php
@@ -123,7 +123,7 @@ class box_project extends ModeleBoxes
);
$this->info_box_contents[$i][] = array(
- 'td' => '',
+ 'td' => 'class="tdoverflowmax150 maxwidth200onsmartphone"',
'text' => $objp->title,
);
diff --git a/htdocs/core/boxes/box_propales.php b/htdocs/core/boxes/box_propales.php
index 1fe8c2a0ed8..58b97c89386 100644
--- a/htdocs/core/boxes/box_propales.php
+++ b/htdocs/core/boxes/box_propales.php
@@ -128,7 +128,7 @@ class box_propales extends ModeleBoxes
}
$this->info_box_contents[$line][] = array(
- 'td' => '',
+ 'td' => 'class="nowraponall"',
'text' => $propalstatic->getNomUrl(1),
'text2'=> $late,
'asis' => 1,
diff --git a/htdocs/core/boxes/box_services_expired.php b/htdocs/core/boxes/box_services_expired.php
index 9ddfa229e55..582b5101aa1 100644
--- a/htdocs/core/boxes/box_services_expired.php
+++ b/htdocs/core/boxes/box_services_expired.php
@@ -133,7 +133,7 @@ class box_services_expired extends ModeleBoxes
if (($dateline + $conf->contrat->services->expires->warning_delay) < $now) $late=img_warning($langs->trans("Late"));
$this->info_box_contents[$i][] = array(
- 'td' => '',
+ 'td' => 'class="nowraponall"',
'text' => $contract->getNomUrl(1),
'asis' => 1
);
@@ -145,7 +145,7 @@ class box_services_expired extends ModeleBoxes
);
$this->info_box_contents[$i][] = array(
- 'td' => 'class="center"',
+ 'td' => 'class="center nowraponall"',
'text' => dol_print_date($dateline, 'day'),
'text2'=> $late,
);
diff --git a/htdocs/core/boxes/box_supplier_orders.php b/htdocs/core/boxes/box_supplier_orders.php
index a95c008688b..881e17f73ec 100644
--- a/htdocs/core/boxes/box_supplier_orders.php
+++ b/htdocs/core/boxes/box_supplier_orders.php
@@ -124,19 +124,19 @@ class box_supplier_orders extends ModeleBoxes
$thirdpartytmp->logo = $objp->logo;
$this->info_box_contents[$line][] = array(
- 'td' => '',
+ 'td' => 'class="nowraponall"',
'text' => $supplierorderstatic->getNomUrl(1),
'asis' => 1
);
$this->info_box_contents[$line][] = array(
- 'td' => '',
+ 'td' => 'class="tdoverflowmax150 maxwidth150onsmartphone"',
'text' => $thirdpartytmp->getNomUrl(1, 'supplier'),
'asis' => 1,
);
$this->info_box_contents[$line][] = array(
- 'td' => 'class="right nowrap"',
+ 'td' => 'class="right nowraponall"',
'text' => price($objp->total_ht, 0, $langs, 0, -1, -1, $conf->currency),
);
diff --git a/htdocs/core/boxes/box_supplier_orders_awaiting_reception.php b/htdocs/core/boxes/box_supplier_orders_awaiting_reception.php
index 326a9297ce8..416dc7f2f2a 100644
--- a/htdocs/core/boxes/box_supplier_orders_awaiting_reception.php
+++ b/htdocs/core/boxes/box_supplier_orders_awaiting_reception.php
@@ -130,19 +130,19 @@ class box_supplier_orders_awaiting_reception extends ModeleBoxes
$thirdpartytmp->logo = $objp->logo;
$this->info_box_contents[$line][] = array(
- 'td' => '',
+ 'td' => 'class="nowraponall"',
'text' => $supplierorderstatic->getNomUrl(1),
'asis' => 1
);
$this->info_box_contents[$line][] = array(
- 'td' => '',
+ 'td' => 'class="tdoverflowmax150 maxwidth150onsmartphone"',
'text' => $thirdpartytmp->getNomUrl(1, 'supplier'),
'asis' => 1,
);
$this->info_box_contents[$line][] = array(
- 'td' => 'class="right nowrap"',
+ 'td' => 'class="right nowraponall"',
'text' => price($objp->total_ht, 0, $langs, 0, -1, -1, $conf->currency),
);
diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php
index 22acff7763d..4a55fa24bb3 100644
--- a/htdocs/core/class/html.formfile.class.php
+++ b/htdocs/core/class/html.formfile.class.php
@@ -667,21 +667,27 @@ class FormFile
{
$submodulepart = $modulepart;
- // For normalized standard modules
- $file=dol_buildpath('/core/modules/'.$modulepart.'/modules_'.$modulepart.'.php', 0);
+ // modulepart = 'nameofmodule' or 'nameofmodule:nameofsubmodule'
+ $tmp=explode(':', $modulepart);
+ if (! empty($tmp[1])) {
+ $modulepart=$tmp[0];
+ $submodulepart=$tmp[1];
+ }
+
+ // For normalized standard modules
+ $file=dol_buildpath('/core/modules/'.$modulepart.'/modules_'.$submodulepart.'.php', 0);
if (file_exists($file))
{
$res=include_once $file;
}
- // For normalized external modules. modulepart = 'nameofmodule' or 'nameofmodule:nameofsubmodule'
+ // For normalized external modules.
else
{
- $tmp=explode(':', $modulepart);
- if (! empty($tmp[2])) $submodulepart=$tmp[2];
- $file=dol_buildpath('/'.$modulepart.'/core/modules/'.$modulepart.'/modules_'.$submodulepart.'.php', 0);
+ $file=dol_buildpath('/'.$modulepart.'/core/modules/'.$modulepart.'/modules_'.$submodulepart.'.php', 0);
$res=include_once $file;
}
$class='ModelePDF'.ucfirst($submodulepart);
+
if (class_exists($class))
{
$modellist=call_user_func($class.'::liste_modeles', $this->db);
@@ -1465,7 +1471,7 @@ class FormFile
* @param string $param Parameters on sort links
* @param int $forcedownload Force to open dialog box "Save As" when clicking on file
* @param string $relativepath Relative path of docs (autodefined if not provided)
- * @param int $permtodelete Permission to delete
+ * @param int $permissiontodelete Permission to delete
* @param int $useinecm Change output for use in ecm module
* @param int $textifempty Text to show if filearray is empty
* @param int $maxlength Maximum length of file name shown
@@ -1474,7 +1480,7 @@ class FormFile
* @return int <0 if KO, nb of files shown if OK
* @see list_of_documents()
*/
- public function list_of_autoecmfiles($upload_dir, $filearray, $modulepart, $param, $forcedownload = 0, $relativepath = '', $permtodelete = 1, $useinecm = 0, $textifempty = '', $maxlength = 0, $url = '', $addfilterfields = 0)
+ public function list_of_autoecmfiles($upload_dir, $filearray, $modulepart, $param, $forcedownload = 0, $relativepath = '', $permissiontodelete = 1, $useinecm = 0, $textifempty = '', $maxlength = 0, $url = '', $addfilterfields = 0)
{
// phpcs:enable
global $user, $conf, $langs, $form;
@@ -1697,7 +1703,7 @@ class FormFile
//if ($forcedownload) print '&attachment=1';
//print '&file='.urlencode($relativefile).'">';
//print img_view().' ';
- //if ($permtodelete) print ''.img_delete().' ';
+ //if ($permissiontodelete) print ''.img_delete().' ';
//else print ' ';
print " \n";
}
@@ -1752,13 +1758,13 @@ class FormFile
* Show array with linked files
*
* @param Object $object Object
- * @param int $permtodelete Deletion is allowed
+ * @param int $permissiontodelete Deletion is allowed
* @param string $action Action
* @param string $selected ???
* @param string $param More param to add into URL
* @return int Number of links
*/
- public function listOfLinks($object, $permtodelete = 1, $action = null, $selected = null, $param = '')
+ public function listOfLinks($object, $permissiontodelete = 1, $action = null, $selected = null, $param = '')
{
global $user, $conf, $langs, $user;
global $sortfield, $sortorder;
@@ -1872,7 +1878,7 @@ class FormFile
print ' ';
print '';
print '' . img_edit() . ' '; // id= is included into $param
- if ($permtodelete) {
+ if ($permissiontodelete) {
print ' ' . img_delete() . ' '; // id= is included into $param
} else {
print ' ';
diff --git a/htdocs/core/class/interfaces.class.php b/htdocs/core/class/interfaces.class.php
index 86b4bbf0673..bdcfe6bbf75 100644
--- a/htdocs/core/class/interfaces.class.php
+++ b/htdocs/core/class/interfaces.class.php
@@ -343,7 +343,7 @@ class Interfaces
}
// We set info of modules
- $triggers[$j]['picto'] = $objMod->picto?img_object('', $objMod->picto):img_object('', 'generic');
+ $triggers[$j]['picto'] = $objMod->picto?img_object('', $objMod->picto, 'class="valignmiddle pictomodule "'):img_object('', 'generic', 'class="valignmiddle pictomodule "');
$triggers[$j]['file'] = $files[$key];
$triggers[$j]['fullpath'] = $fullpath[$key];
$triggers[$j]['relpath'] = $relpath[$key];
diff --git a/htdocs/core/lib/admin.lib.php b/htdocs/core/lib/admin.lib.php
index e31f9b6d7d7..1d3f7eb65c3 100644
--- a/htdocs/core/lib/admin.lib.php
+++ b/htdocs/core/lib/admin.lib.php
@@ -663,7 +663,7 @@ function security_prepare_head()
$head[$h][0] = DOL_URL_ROOT."/admin/perms.php";
$head[$h][1] = $langs->trans("DefaultRights");
- if ($nbPerms > 0) $head[$h][1].= ' '.$nbPerms.' ';
+ if ($nbPerms > 0) $head[$h][1].= ''.$nbPerms.' ';
$head[$h][2] = 'default';
$h++;
diff --git a/htdocs/core/lib/agenda.lib.php b/htdocs/core/lib/agenda.lib.php
index af859ccca7f..ad17cd259bd 100644
--- a/htdocs/core/lib/agenda.lib.php
+++ b/htdocs/core/lib/agenda.lib.php
@@ -473,7 +473,7 @@ function actions_prepare_head($object)
$listofresourcelinked = $resource->getElementResources($object->element, $object->id);
$nbResources=(is_array($listofresourcelinked)?count($listofresourcelinked):0);
$head[$h][1] = $langs->trans("Resources");
- if ($nbResources > 0) $head[$h][1].= ' '.($nbResources).' ';
+ if ($nbResources > 0) $head[$h][1].= ''.($nbResources).' ';
$head[$h][2] = 'resources';
$h++;
}
diff --git a/htdocs/core/lib/asset.lib.php b/htdocs/core/lib/asset.lib.php
index 3b59dfda73d..5c6bac579f2 100644
--- a/htdocs/core/lib/asset.lib.php
+++ b/htdocs/core/lib/asset.lib.php
@@ -102,7 +102,7 @@ function asset_prepare_head(Asset $object)
$nbLinks=Link::count($db, $object->element, $object->id);
$head[$h][0] = DOL_URL_ROOT.'/asset/document.php?id='.$object->id;
$head[$h][1] = $langs->trans('Documents');
- if (($nbFiles+$nbLinks) > 0) $head[$h][1].= ' '.($nbFiles+$nbLinks).' ';
+ if (($nbFiles+$nbLinks) > 0) $head[$h][1].= ''.($nbFiles+$nbLinks).' ';
$head[$h][2] = 'documents';
$h++;
@@ -111,7 +111,7 @@ function asset_prepare_head(Asset $object)
if(!empty($object->note_public)) $nbNote++;
$head[$h][0] = DOL_URL_ROOT.'/asset/note.php?id='.$object->id;
$head[$h][1] = $langs->trans("Notes");
- if ($nbNote > 0) $head[$h][1].= ' '.$nbNote.' ';
+ if ($nbNote > 0) $head[$h][1].= ''.$nbNote.' ';
$head[$h][2] = 'note';
$h++;
diff --git a/htdocs/core/lib/bank.lib.php b/htdocs/core/lib/bank.lib.php
index 91e0b719734..c4849d59adc 100644
--- a/htdocs/core/lib/bank.lib.php
+++ b/htdocs/core/lib/bank.lib.php
@@ -84,7 +84,7 @@ function bank_prepare_head(Account $object)
$head[$h][0] = DOL_URL_ROOT."/compta/bank/releve.php?account=".$object->id;
$head[$h][1] = $langs->trans("AccountStatements");
- if (($nbReceipts) > 0) $head[$h][1].= ' '.($nbReceipts).' ';
+ if (($nbReceipts) > 0) $head[$h][1].= ''.($nbReceipts).' ';
$head[$h][2] = 'statement';
$h++;
}
@@ -97,7 +97,7 @@ function bank_prepare_head(Account $object)
$nbLinks=Link::count($db, $object->element, $object->id);
$head[$h][0] = DOL_URL_ROOT . "/compta/bank/document.php?account=" . $object->id;
$head[$h][1] = $langs->trans("Documents");
- if (($nbFiles+$nbLinks) > 0) $head[$h][1].= ' '.($nbFiles+$nbLinks).' ';
+ if (($nbFiles+$nbLinks) > 0) $head[$h][1].= ''.($nbFiles+$nbLinks).' ';
$head[$h][2] = 'document';
$h++;
@@ -186,7 +186,7 @@ function various_payment_prepare_head($object)
$nbLinks=Link::count($db, $object->element, $object->id);
$head[$h][0] = DOL_URL_ROOT.'/compta/bank/various_payment/document.php?id='.$object->id;
$head[$h][1] = $langs->trans('Documents');
- if (($nbFiles+$nbLinks) > 0) $head[$h][1].= ' '.($nbFiles+$nbLinks).' ';
+ if (($nbFiles+$nbLinks) > 0) $head[$h][1].= ''.($nbFiles+$nbLinks).' ';
$head[$h][2] = 'documents';
$h++;
diff --git a/htdocs/core/lib/company.lib.php b/htdocs/core/lib/company.lib.php
index 9f4f1021b4c..8cb023237d4 100644
--- a/htdocs/core/lib/company.lib.php
+++ b/htdocs/core/lib/company.lib.php
@@ -69,7 +69,7 @@ function societe_prepare_head(Societe $object)
$head[$h][0] = DOL_URL_ROOT.'/societe/contact.php?socid='.$object->id;
$head[$h][1] = $langs->trans('ContactsAddresses');
- if ($nbContact > 0) $head[$h][1].= ' '.$nbContact.' ';
+ if ($nbContact > 0) $head[$h][1].= ''.$nbContact.' ';
$head[$h][2] = 'contact';
$h++;
}
@@ -79,7 +79,7 @@ function societe_prepare_head(Societe $object)
$head[$h][0] = DOL_URL_ROOT.'/societe/societecontact.php?socid='.$object->id;
$nbContact = count($object->liste_contact(-1, 'internal')) + count($object->liste_contact(-1, 'external'));
$head[$h][1] = $langs->trans("ContactsAddresses");
- if ($nbContact > 0) $head[$h][1].= ' '.$nbContact.' ';
+ if ($nbContact > 0) $head[$h][1].= ''.$nbContact.' ';
$head[$h][2] = 'contact';
$h++;
}
@@ -136,7 +136,7 @@ function societe_prepare_head(Societe $object)
else {
dol_print_error($db);
}
- if ($nbNote > 0) $head[$h][1].= ' '.$nbNote.' ';
+ if ($nbNote > 0) $head[$h][1].= ''.$nbNote.' ';
$head[$h][2] = 'project';
$h++;
}
@@ -229,7 +229,7 @@ function societe_prepare_head(Societe $object)
$head[$h][0] = DOL_URL_ROOT .'/societe/paymentmodes.php?socid='.$object->id;
$head[$h][1] = $title;
if ($foundonexternalonlinesystem) $head[$h][1].= ' ... ';
- elseif ($nbBankAccount > 0) $head[$h][1].= ' '.$nbBankAccount.' ';
+ elseif ($nbBankAccount > 0) $head[$h][1].= ''.$nbBankAccount.' ';
$head[$h][2] = 'rib';
$h++;
}
@@ -257,7 +257,7 @@ function societe_prepare_head(Societe $object)
else {
dol_print_error($db);
}
- if ($nbNote > 0) $head[$h][1].= ' '.$nbNote.' ';
+ if ($nbNote > 0) $head[$h][1].= ''.$nbNote.' ';
$head[$h][2] = 'website';
$h++;
}
@@ -295,7 +295,7 @@ function societe_prepare_head(Societe $object)
$head[$h][0] = DOL_URL_ROOT.'/societe/notify/card.php?socid='.$object->id;
$head[$h][1] = $langs->trans("Notifications");
- if ($nbNote > 0) $head[$h][1].= ' '.$nbNote.' ';
+ if ($nbNote > 0) $head[$h][1].= ''.$nbNote.' ';
$head[$h][2] = 'notify';
$h++;
}
@@ -306,7 +306,7 @@ function societe_prepare_head(Societe $object)
if(!empty($object->note_public)) $nbNote++;
$head[$h][0] = DOL_URL_ROOT.'/societe/note.php?id='.$object->id;
$head[$h][1] = $langs->trans("Notes");
- if ($nbNote > 0) $head[$h][1].= ' '.$nbNote.' ';
+ if ($nbNote > 0) $head[$h][1].= ''.$nbNote.' ';
$head[$h][2] = 'note';
$h++;
@@ -319,7 +319,7 @@ function societe_prepare_head(Societe $object)
$head[$h][0] = DOL_URL_ROOT.'/societe/document.php?socid='.$object->id;
$head[$h][1] = $langs->trans("Documents");
- if (($nbFiles+$nbLinks) > 0) $head[$h][1].= ' '.($nbFiles+$nbLinks).' ';
+ if (($nbFiles+$nbLinks) > 0) $head[$h][1].= ''.($nbFiles+$nbLinks).' ';
$head[$h][2] = 'document';
$h++;
}
diff --git a/htdocs/core/lib/contact.lib.php b/htdocs/core/lib/contact.lib.php
index 7e5096bb8c5..0082947d0c1 100644
--- a/htdocs/core/lib/contact.lib.php
+++ b/htdocs/core/lib/contact.lib.php
@@ -78,7 +78,7 @@ function contact_prepare_head(Contact $object)
$nbNote = (empty($object->note_private)?0:1)+(empty($object->note_public)?0:1);
$head[$tab][0] = DOL_URL_ROOT.'/contact/note.php?id='.$object->id;
$head[$tab][1] = $langs->trans("Note");
- if($nbNote > 0) $head[$tab][1].= ' '.$nbNote.' ';
+ if($nbNote > 0) $head[$tab][1].= ''.$nbNote.' ';
$head[$tab][2] = 'note';
$tab++;
}
@@ -90,7 +90,7 @@ function contact_prepare_head(Contact $object)
$nbLinks=Link::count($db, $object->element, $object->id);
$head[$tab][0] = DOL_URL_ROOT.'/contact/document.php?id='.$object->id;
$head[$tab][1] = $langs->trans("Documents");
- if (($nbFiles+$nbLinks) > 0) $head[$tab][1].= ' '.($nbFiles+$nbLinks).' ';
+ if (($nbFiles+$nbLinks) > 0) $head[$tab][1].= ''.($nbFiles+$nbLinks).' ';
$head[$tab][2] = 'documents';
$tab++;
diff --git a/htdocs/core/lib/contract.lib.php b/htdocs/core/lib/contract.lib.php
index 73cd8e1748e..ec91a2dcc70 100644
--- a/htdocs/core/lib/contract.lib.php
+++ b/htdocs/core/lib/contract.lib.php
@@ -45,7 +45,7 @@ function contract_prepare_head(Contrat $object)
$nbContact = count($object->liste_contact(-1, 'internal')) + count($object->liste_contact(-1, 'external'));
$head[$h][0] = DOL_URL_ROOT.'/contrat/contact.php?id='.$object->id;
$head[$h][1] = $langs->trans("ContactsAddresses");
- if ($nbContact > 0) $head[$h][1].= ' '.$nbContact.' ';
+ if ($nbContact > 0) $head[$h][1].= ''.$nbContact.' ';
$head[$h][2] = 'contact';
$h++;
}
@@ -63,7 +63,7 @@ function contract_prepare_head(Contrat $object)
if(!empty($object->note_public)) $nbNote++;
$head[$h][0] = DOL_URL_ROOT.'/contrat/note.php?id='.$object->id;
$head[$h][1] = $langs->trans("Notes");
- if ($nbNote > 0) $head[$h][1].= ' '.$nbNote.' ';
+ if ($nbNote > 0) $head[$h][1].= ''.$nbNote.' ';
$head[$h][2] = 'note';
$h++;
}
@@ -75,7 +75,7 @@ function contract_prepare_head(Contrat $object)
$nbLinks=Link::count($db, $object->element, $object->id);
$head[$h][0] = DOL_URL_ROOT.'/contrat/document.php?id='.$object->id;
$head[$h][1] = $langs->trans("Documents");
- if (($nbFiles+$nbLinks) > 0) $head[$h][1].= ' '.($nbFiles+$nbLinks).' ';
+ if (($nbFiles+$nbLinks) > 0) $head[$h][1].= ''.($nbFiles+$nbLinks).' ';
$head[$h][2] = 'documents';
$h++;
diff --git a/htdocs/core/lib/donation.lib.php b/htdocs/core/lib/donation.lib.php
index d430c9ebd46..16d7d3d8a97 100644
--- a/htdocs/core/lib/donation.lib.php
+++ b/htdocs/core/lib/donation.lib.php
@@ -85,7 +85,7 @@ function donation_prepare_head($object)
$nbLinks=Link::count($db, $object->element, $object->id);
$head[$h][0] = DOL_URL_ROOT.'/don/document.php?id='.$object->id;
$head[$h][1] = $langs->trans('Documents');
- if (($nbFiles+$nbLinks) > 0) $head[$h][1].= ' '.($nbFiles+$nbLinks).' ';
+ if (($nbFiles+$nbLinks) > 0) $head[$h][1].= ''.($nbFiles+$nbLinks).' ';
$head[$h][2] = 'documents';
$h++;
@@ -94,7 +94,7 @@ function donation_prepare_head($object)
if(!empty($object->note_public)) $nbNote++;
$head[$h][0] = DOL_URL_ROOT.'/don/note.php?id='.$object->id;
$head[$h][1] = $langs->trans("Notes");
- if ($nbNote > 0) $head[$h][1].= ' '.$nbNote.' ';
+ if ($nbNote > 0) $head[$h][1].= ''.$nbNote.' ';
$head[$h][2] = 'note';
$h++;
diff --git a/htdocs/core/lib/emailing.lib.php b/htdocs/core/lib/emailing.lib.php
index 82c4d5c1ae4..59bb080d93e 100644
--- a/htdocs/core/lib/emailing.lib.php
+++ b/htdocs/core/lib/emailing.lib.php
@@ -43,7 +43,7 @@ function emailing_prepare_head(Mailing $object)
{
$head[$h][0] = DOL_URL_ROOT."/comm/mailing/cibles.php?id=".$object->id;
$head[$h][1] = $langs->trans("MailRecipients");
- if ($object->nbemail > 0) $head[$h][1].= ' '.$object->nbemail.' ';
+ if ($object->nbemail > 0) $head[$h][1].= ''.$object->nbemail.' ';
$head[$h][2] = 'targets';
$h++;
}
diff --git a/htdocs/core/lib/expensereport.lib.php b/htdocs/core/lib/expensereport.lib.php
index 02b736dd0cb..caef261b277 100644
--- a/htdocs/core/lib/expensereport.lib.php
+++ b/htdocs/core/lib/expensereport.lib.php
@@ -52,7 +52,7 @@ function expensereport_prepare_head($object)
$nbLinks=Link::count($db, $object->element, $object->id);
$head[$h][0] = DOL_URL_ROOT.'/expensereport/document.php?id='.$object->id;
$head[$h][1] = $langs->trans('Documents');
- if (($nbFiles+$nbLinks) > 0) $head[$h][1].= ' '.($nbFiles+$nbLinks).' ';
+ if (($nbFiles+$nbLinks) > 0) $head[$h][1].= ''.($nbFiles+$nbLinks).' ';
$head[$h][2] = 'documents';
$h++;
@@ -63,7 +63,7 @@ function expensereport_prepare_head($object)
if(!empty($object->note_public)) $nbNote++;
$head[$h][0] = DOL_URL_ROOT.'/expensereport/note.php?id='.$object->id;
$head[$h][1] = $langs->trans('Notes');
- if ($nbNote > 0) $head[$h][1].= ' '.$nbNote.' ';
+ if ($nbNote > 0) $head[$h][1].= ''.$nbNote.' ';
$head[$h][2] = 'note';
$h++;
}
diff --git a/htdocs/core/lib/fichinter.lib.php b/htdocs/core/lib/fichinter.lib.php
index 6997cd5c028..d707063bbe8 100644
--- a/htdocs/core/lib/fichinter.lib.php
+++ b/htdocs/core/lib/fichinter.lib.php
@@ -51,7 +51,7 @@ function fichinter_prepare_head($object)
$nbContact = count($object->liste_contact(-1, 'internal')) + count($object->liste_contact(-1, 'external'));
$head[$h][0] = DOL_URL_ROOT.'/fichinter/contact.php?id='.$object->id;
$head[$h][1] = $langs->trans('InterventionContact');
- if ($nbContact > 0) $head[$h][1].= ' '.$nbContact.' ';
+ if ($nbContact > 0) $head[$h][1].= ''.$nbContact.' ';
$head[$h][2] = 'contact';
$h++;
}
@@ -83,7 +83,7 @@ function fichinter_prepare_head($object)
$head[$h][0] = DOL_URL_ROOT.'/resource/element_resource.php?element=fichinter&element_id='.$object->id;
$head[$h][1] = $langs->trans("Resources");
- if ($nbResource > 0) $head[$h][1].= ' '.$nbResource.' ';
+ if ($nbResource > 0) $head[$h][1].= ''.$nbResource.' ';
$head[$h][2] = 'resource';
$h++;
}
@@ -95,7 +95,7 @@ function fichinter_prepare_head($object)
if(!empty($object->note_public)) $nbNote++;
$head[$h][0] = DOL_URL_ROOT.'/fichinter/note.php?id='.$object->id;
$head[$h][1] = $langs->trans('Notes');
- if ($nbNote > 0) $head[$h][1].= ' '.$nbNote.' ';
+ if ($nbNote > 0) $head[$h][1].= ''.$nbNote.' ';
$head[$h][2] = 'note';
$h++;
}
@@ -107,7 +107,7 @@ function fichinter_prepare_head($object)
$nbLinks=Link::count($db, $object->element, $object->id);
$head[$h][0] = DOL_URL_ROOT.'/fichinter/document.php?id='.$object->id;
$head[$h][1] = $langs->trans("Documents");
- if (($nbFiles+$nbLinks) > 0) $head[$h][1].= ' '.($nbFiles+$nbLinks).' ';
+ if (($nbFiles+$nbLinks) > 0) $head[$h][1].= ''.($nbFiles+$nbLinks).' ';
$head[$h][2] = 'documents';
$h++;
diff --git a/htdocs/core/lib/files.lib.php b/htdocs/core/lib/files.lib.php
index 711e65edaaa..90c673e9e25 100644
--- a/htdocs/core/lib/files.lib.php
+++ b/htdocs/core/lib/files.lib.php
@@ -3072,13 +3072,14 @@ function getFilesUpdated(&$file_list, SimpleXMLElement $dir, $path = '', $pathre
{
$filename = $path.$file['name'];
$file_list['insignature'][] = $filename;
+ $expectedsize = (empty($file['size']) ? '' : $file['size']);
$expectedmd5 = (string) $file;
//if (preg_match('#'.$exclude.'#', $filename)) continue;
if (!file_exists($pathref.'/'.$filename))
{
- $file_list['missing'][] = array('filename'=>$filename, 'expectedmd5'=>$expectedmd5);
+ $file_list['missing'][] = array('filename'=>$filename, 'expectedmd5'=>$expectedmd5, 'expectedsize'=>$expectedsize);
}
else
{
@@ -3090,7 +3091,7 @@ function getFilesUpdated(&$file_list, SimpleXMLElement $dir, $path = '', $pathre
}
else
{
- if ($md5_local != $expectedmd5) $file_list['updated'][] = array('filename'=>$filename, 'expectedmd5'=>$expectedmd5, 'md5'=>(string) $md5_local);
+ if ($md5_local != $expectedmd5) $file_list['updated'][] = array('filename'=>$filename, 'expectedmd5'=>$expectedmd5, 'expectedsize'=>$expectedsize, 'md5'=>(string) $md5_local);
$checksumconcat[] = $md5_local;
}
}
diff --git a/htdocs/core/lib/fourn.lib.php b/htdocs/core/lib/fourn.lib.php
index f11fb417769..9336d9b221f 100644
--- a/htdocs/core/lib/fourn.lib.php
+++ b/htdocs/core/lib/fourn.lib.php
@@ -48,7 +48,7 @@ function facturefourn_prepare_head($object)
$nbContact = count($object->liste_contact(-1, 'internal')) + count($object->liste_contact(-1, 'external'));
$head[$h][0] = DOL_URL_ROOT.'/fourn/facture/contact.php?facid='.$object->id;
$head[$h][1] = $langs->trans('ContactsAddresses');
- if ($nbContact > 0) $head[$h][1].= ' '.$nbContact.' ';
+ if ($nbContact > 0) $head[$h][1].= ''.$nbContact.' ';
$head[$h][2] = 'contact';
$h++;
}
@@ -66,7 +66,7 @@ function facturefourn_prepare_head($object)
if(!empty($object->note_public)) $nbNote++;
$head[$h][0] = DOL_URL_ROOT.'/fourn/facture/note.php?facid='.$object->id;
$head[$h][1] = $langs->trans('Notes');
- if ($nbNote > 0) $head[$h][1].= ' '.$nbNote.' ';
+ if ($nbNote > 0) $head[$h][1].= ''.$nbNote.' ';
$head[$h][2] = 'note';
$h++;
}
@@ -78,7 +78,7 @@ function facturefourn_prepare_head($object)
$nbLinks=Link::count($db, $object->element, $object->id);
$head[$h][0] = DOL_URL_ROOT.'/fourn/facture/document.php?facid='.$object->id;
$head[$h][1] = $langs->trans('Documents');
- if (($nbFiles+$nbLinks) > 0) $head[$h][1].= ' '.($nbFiles+$nbLinks).' ';
+ if (($nbFiles+$nbLinks) > 0) $head[$h][1].= ''.($nbFiles+$nbLinks).' ';
$head[$h][2] = 'documents';
$h++;
@@ -116,7 +116,7 @@ function ordersupplier_prepare_head($object)
$nbContact = count($object->liste_contact(-1, 'internal')) + count($object->liste_contact(-1, 'external'));
$head[$h][0] = DOL_URL_ROOT.'/fourn/commande/contact.php?id='.$object->id;
$head[$h][1] = $langs->trans('ContactsAddresses');
- if ($nbContact > 0) $head[$h][1].= ' '.$nbContact.' ';
+ if ($nbContact > 0) $head[$h][1].= ''.$nbContact.' ';
$head[$h][2] = 'contact';
$h++;
}
@@ -143,7 +143,7 @@ function ordersupplier_prepare_head($object)
if(!empty($object->note_public)) $nbNote++;
$head[$h][0] = DOL_URL_ROOT.'/fourn/commande/note.php?id='.$object->id;
$head[$h][1] = $langs->trans("Notes");
- if ($nbNote > 0) $head[$h][1].= ' '.$nbNote.' ';
+ if ($nbNote > 0) $head[$h][1].= ''.$nbNote.' ';
$head[$h][2] = 'note';
$h++;
}
@@ -155,7 +155,7 @@ function ordersupplier_prepare_head($object)
$nbLinks=Link::count($db, $object->element, $object->id);
$head[$h][0] = DOL_URL_ROOT.'/fourn/commande/document.php?id='.$object->id;
$head[$h][1] = $langs->trans('Documents');
- if (($nbFiles+$nbLinks) > 0) $head[$h][1].= ' '.($nbFiles+$nbLinks).' ';
+ if (($nbFiles+$nbLinks) > 0) $head[$h][1].= ''.($nbFiles+$nbLinks).' ';
$head[$h][2] = 'documents';
$h++;
diff --git a/htdocs/core/lib/holiday.lib.php b/htdocs/core/lib/holiday.lib.php
index cb4e1331837..f1b18df11b2 100644
--- a/htdocs/core/lib/holiday.lib.php
+++ b/htdocs/core/lib/holiday.lib.php
@@ -47,7 +47,7 @@ function holiday_prepare_head($object)
$nbLinks=Link::count($db, $object->element, $object->id);
$head[$h][0] = DOL_URL_ROOT.'/holiday/document.php?id='.$object->id;
$head[$h][1] = $langs->trans('Documents');
- if (($nbFiles+$nbLinks) > 0) $head[$h][1].= ' '.($nbFiles+$nbLinks).' ';
+ if (($nbFiles+$nbLinks) > 0) $head[$h][1].= ''.($nbFiles+$nbLinks).' ';
$head[$h][2] = 'documents';
$h++;
diff --git a/htdocs/core/lib/invoice.lib.php b/htdocs/core/lib/invoice.lib.php
index 004f355a27a..f2818f72872 100644
--- a/htdocs/core/lib/invoice.lib.php
+++ b/htdocs/core/lib/invoice.lib.php
@@ -50,7 +50,7 @@ function facture_prepare_head($object)
$nbContact = count($object->liste_contact(-1, 'internal')) + count($object->liste_contact(-1, 'external'));
$head[$h][0] = DOL_URL_ROOT.'/compta/facture/contact.php?facid='.$object->id;
$head[$h][1] = $langs->trans('ContactsAddresses');
- if ($nbContact > 0) $head[$h][1].= ' '.$nbContact.' ';
+ if ($nbContact > 0) $head[$h][1].= ''.$nbContact.' ';
$head[$h][2] = 'contact';
$h++;
}
@@ -71,7 +71,7 @@ function facture_prepare_head($object)
else dol_print_error($db);
$head[$h][0] = DOL_URL_ROOT.'/compta/facture/prelevement.php?facid='.$object->id;
$head[$h][1] = $langs->trans('StandingOrders');
- if ($nbStandingOrders > 0) $head[$h][1].= ' '.$nbStandingOrders.' ';
+ if ($nbStandingOrders > 0) $head[$h][1].= ''.$nbStandingOrders.' ';
$head[$h][2] = 'standingorders';
$h++;
}
@@ -89,7 +89,7 @@ function facture_prepare_head($object)
if(!empty($object->note_public)) $nbNote++;
$head[$h][0] = DOL_URL_ROOT.'/compta/facture/note.php?facid='.$object->id;
$head[$h][1] = $langs->trans('Notes');
- if ($nbNote > 0) $head[$h][1].= ' '.$nbNote.' ';
+ if ($nbNote > 0) $head[$h][1].= ''.$nbNote.' ';
$head[$h][2] = 'note';
$h++;
}
@@ -101,7 +101,7 @@ function facture_prepare_head($object)
$nbLinks=Link::count($db, $object->element, $object->id);
$head[$h][0] = DOL_URL_ROOT.'/compta/facture/document.php?facid='.$object->id;
$head[$h][1] = $langs->trans('Documents');
- if (($nbFiles+$nbLinks) > 0) $head[$h][1].= ' '.($nbFiles+$nbLinks).' ';
+ if (($nbFiles+$nbLinks) > 0) $head[$h][1].= ''.($nbFiles+$nbLinks).' ';
$head[$h][2] = 'documents';
$h++;
@@ -189,7 +189,7 @@ function invoice_rec_prepare_head($object)
$h = 0;
$head = array();
- $head[$h][0] = DOL_URL_ROOT.'/compta/facture/fiche-rec.php?id='.$object->id;
+ $head[$h][0] = DOL_URL_ROOT.'/compta/facture/card-rec.php?id='.$object->id;
$head[$h][1] = $langs->trans("CardBill");
$head[$h][2] = 'card';
$h++;
diff --git a/htdocs/core/lib/loan.lib.php b/htdocs/core/lib/loan.lib.php
index 4d47c79e6da..e751dfd68c8 100644
--- a/htdocs/core/lib/loan.lib.php
+++ b/htdocs/core/lib/loan.lib.php
@@ -59,7 +59,7 @@ function loan_prepare_head($object)
$nbLinks=Link::count($db, $object->element, $object->id);
$head[$tab][0] = DOL_URL_ROOT.'/loan/document.php?id='.$object->id;
$head[$tab][1] = $langs->trans("Documents");
- if (($nbFiles+$nbLinks) > 0) $head[$tab][1].= ' '.($nbFiles+$nbLinks).' ';
+ if (($nbFiles+$nbLinks) > 0) $head[$tab][1].= ''.($nbFiles+$nbLinks).' ';
$head[$tab][2] = 'documents';
$tab++;
@@ -68,7 +68,7 @@ function loan_prepare_head($object)
$nbNote = (empty($object->note_private)?0:1)+(empty($object->note_public)?0:1);
$head[$tab][0] = DOL_URL_ROOT."/loan/note.php?id=".$object->id;
$head[$tab][1] = $langs->trans("Notes");
- if($nbNote > 0) $head[$tab][1].= ' '.$nbNote.' ';
+ if($nbNote > 0) $head[$tab][1].= ''.$nbNote.' ';
$head[$tab][2] = 'note';
$tab++;
}
diff --git a/htdocs/core/lib/member.lib.php b/htdocs/core/lib/member.lib.php
index 6068246341e..1f643dd8a48 100644
--- a/htdocs/core/lib/member.lib.php
+++ b/htdocs/core/lib/member.lib.php
@@ -59,7 +59,7 @@ function member_prepare_head(Adherent $object)
$head[$h][0] = DOL_URL_ROOT.'/adherents/subscription.php?rowid='.$object->id;
$head[$h][1] = $langs->trans("Subscriptions");
$head[$h][2] = 'subscription';
- if ($nbSubscription > 0) $head[$h][1].= ' '.$nbSubscription.' ';
+ if ($nbSubscription > 0) $head[$h][1].= ''.$nbSubscription.' ';
$h++;
}
@@ -76,7 +76,7 @@ function member_prepare_head(Adherent $object)
$head[$h][0] = DOL_URL_ROOT.'/adherents/note.php?id='.$object->id;
$head[$h][1] = $langs->trans("Note");
$head[$h][2] = 'note';
- if ($nbNote > 0) $head[$h][1].= ' '.$nbNote.' ';
+ if ($nbNote > 0) $head[$h][1].= ''.$nbNote.' ';
$h++;
// Attachments
@@ -87,7 +87,7 @@ function member_prepare_head(Adherent $object)
$nbLinks=Link::count($db, $object->element, $object->id);
$head[$h][0] = DOL_URL_ROOT.'/adherents/document.php?id='.$object->id;
$head[$h][1] = $langs->trans('Documents');
- if (($nbFiles+$nbLinks) > 0) $head[$h][1].= ' '.($nbFiles+$nbLinks).' ';
+ if (($nbFiles+$nbLinks) > 0) $head[$h][1].= ''.($nbFiles+$nbLinks).' ';
$head[$h][2] = 'document';
$h++;
diff --git a/htdocs/core/lib/order.lib.php b/htdocs/core/lib/order.lib.php
index 558a3d0d035..97ab411bdfc 100644
--- a/htdocs/core/lib/order.lib.php
+++ b/htdocs/core/lib/order.lib.php
@@ -53,7 +53,7 @@ function commande_prepare_head(Commande $object)
$nbContact = count($object->liste_contact(-1, 'internal')) + count($object->liste_contact(-1, 'external'));
$head[$h][0] = DOL_URL_ROOT.'/commande/contact.php?id='.$object->id;
$head[$h][1] = $langs->trans('ContactsAddresses');
- if ($nbContact > 0) $head[$h][1].= ' '.$nbContact.' ';
+ if ($nbContact > 0) $head[$h][1].= ''.$nbContact.' ';
$head[$h][2] = 'contact';
$h++;
}
@@ -67,7 +67,7 @@ function commande_prepare_head(Commande $object)
if ($conf->expedition_bon->enabled) $text.=$langs->trans("Shipments");
if ($conf->expedition_bon->enabled && $conf->livraison_bon->enabled) $text.='/';
if ($conf->livraison_bon->enabled) $text.=$langs->trans("Receivings");
- if ($nbShipments > 0 || $nbReceiption > 0) $text.= ' '.($nbShipments?$nbShipments:0);
+ if ($nbShipments > 0 || $nbReceiption > 0) $text.= ''.($nbShipments?$nbShipments:0);
if ($conf->expedition_bon->enabled && $conf->livraison_bon->enabled && ($nbShipments > 0 || $nbReceiption > 0)) $text.='/';
if ($conf->expedition_bon->enabled && $conf->livraison_bon->enabled && ($nbShipments > 0 || $nbReceiption > 0)) $text.= ($nbReceiption?$nbReceiption:0);
if ($nbShipments > 0 || $nbReceiption > 0) $text.= ' ';
@@ -89,7 +89,7 @@ function commande_prepare_head(Commande $object)
if(!empty($object->note_public)) $nbNote++;
$head[$h][0] = DOL_URL_ROOT.'/commande/note.php?id='.$object->id;
$head[$h][1] = $langs->trans('Notes');
- if ($nbNote > 0) $head[$h][1].= ' '.$nbNote.' ';
+ if ($nbNote > 0) $head[$h][1].= ''.$nbNote.' ';
$head[$h][2] = 'note';
$h++;
}
@@ -101,7 +101,7 @@ function commande_prepare_head(Commande $object)
$nbLinks=Link::count($db, $object->element, $object->id);
$head[$h][0] = DOL_URL_ROOT.'/commande/document.php?id='.$object->id;
$head[$h][1] = $langs->trans('Documents');
- if (($nbFiles+$nbLinks) > 0) $head[$h][1].= ' '.($nbFiles+$nbLinks).' ';
+ if (($nbFiles+$nbLinks) > 0) $head[$h][1].= ''.($nbFiles+$nbLinks).' ';
$head[$h][2] = 'documents';
$h++;
diff --git a/htdocs/core/lib/product.lib.php b/htdocs/core/lib/product.lib.php
index 11c5d50592a..bdeb9181d3b 100644
--- a/htdocs/core/lib/product.lib.php
+++ b/htdocs/core/lib/product.lib.php
@@ -82,7 +82,7 @@ function product_prepare_head($object)
$head[$h][1] = $langs->trans('AssociatedProducts');
$nbFatherAndChild = $object->hasFatherOrChild();
- if ($nbFatherAndChild > 0) $head[$h][1].= ' '.$nbFatherAndChild.' ';
+ if ($nbFatherAndChild > 0) $head[$h][1].= ''.$nbFatherAndChild.' ';
$head[$h][2] = 'subproduct';
$h++;
}
@@ -110,7 +110,7 @@ function product_prepare_head($object)
$head[$h][1] = $langs->trans('ProductCombinations');
$head[$h][2] = 'combinations';
$nbVariant = $prodcomb->countNbOfCombinationForFkProductParent($object->id);
- if ($nbVariant > 0) $head[$h][1].= ' '.$nbVariant.' ';
+ if ($nbVariant > 0) $head[$h][1].= ''.$nbVariant.' ';
}
$h++;
@@ -160,7 +160,7 @@ function product_prepare_head($object)
if(!empty($object->note_public)) $nbNote++;
$head[$h][0] = DOL_URL_ROOT.'/product/note.php?id='.$object->id;
$head[$h][1] = $langs->trans('Notes');
- if ($nbNote > 0) $head[$h][1].= ' '.$nbNote.' ';
+ if ($nbNote > 0) $head[$h][1].= ''.$nbNote.' ';
$head[$h][2] = 'note';
$h++;
}
@@ -179,7 +179,7 @@ function product_prepare_head($object)
$nbLinks=Link::count($db, $object->element, $object->id);
$head[$h][0] = DOL_URL_ROOT.'/product/document.php?id='.$object->id;
$head[$h][1] = $langs->trans('Documents');
- if (($nbFiles+$nbLinks) > 0) $head[$h][1].= ' '.($nbFiles+$nbLinks).' ';
+ if (($nbFiles+$nbLinks) > 0) $head[$h][1].= ''.($nbFiles+$nbLinks).' ';
$head[$h][2] = 'documents';
$h++;
@@ -228,7 +228,7 @@ function productlot_prepare_head($object)
$nbLinks=Link::count($db, $object->element, $object->id);
$head[$h][0] = DOL_URL_ROOT."/product/stock/productlot_document.php?id=".$object->id;
$head[$h][1] = $langs->trans("Documents");
- if (($nbFiles+$nbLinks) > 0) $head[$h][1].= ' '.($nbFiles+$nbLinks).' ';
+ if (($nbFiles+$nbLinks) > 0) $head[$h][1].= ''.($nbFiles+$nbLinks).' ';
$head[$h][2] = 'documents';
$h++;
diff --git a/htdocs/core/lib/project.lib.php b/htdocs/core/lib/project.lib.php
index 825142d1385..8ceca03b0b2 100644
--- a/htdocs/core/lib/project.lib.php
+++ b/htdocs/core/lib/project.lib.php
@@ -48,7 +48,7 @@ function project_prepare_head($object)
$nbContact = count($object->liste_contact(-1, 'internal')) + count($object->liste_contact(-1, 'external'));
$head[$h][0] = DOL_URL_ROOT.'/projet/contact.php?id='.$object->id;
$head[$h][1] = $langs->trans("ProjectContact");
- if ($nbContact > 0) $head[$h][1].= ' '.$nbContact.' ';
+ if ($nbContact > 0) $head[$h][1].= ''.$nbContact.' ';
$head[$h][2] = 'contact';
$h++;
@@ -61,7 +61,7 @@ function project_prepare_head($object)
require_once DOL_DOCUMENT_ROOT.'/projet/class/task.class.php';
$taskstatic=new Task($db);
$nbTasks=count($taskstatic->getTasksArray(0, 0, $object->id, 0, 0));
- if ($nbTasks > 0) $head[$h][1].= ' '.($nbTasks).' ';
+ if ($nbTasks > 0) $head[$h][1].= ''.($nbTasks).' ';
$head[$h][2] = 'tasks';
$h++;
@@ -82,7 +82,7 @@ function project_prepare_head($object)
$head[$h][0] = DOL_URL_ROOT.'/projet/tasks/time.php?withproject=1&projectid='.$object->id;
$head[$h][1] = $langs->trans("TimeSpent");
- if ($nbTimeSpent > 0) $head[$h][1].= ' ... ';
+ if ($nbTimeSpent > 0) $head[$h][1].= '... ';
$head[$h][2] = 'timespent';
$h++;
}
@@ -123,7 +123,7 @@ function project_prepare_head($object)
$nbLinks=Link::count($db, $object->element, $object->id);
$head[$h][0] = DOL_URL_ROOT.'/projet/document.php?id='.$object->id;
$head[$h][1] = $langs->trans('Documents');
- if (($nbFiles+$nbLinks) > 0) $head[$h][1].= ' '.($nbFiles+$nbLinks).' ';
+ if (($nbFiles+$nbLinks) > 0) $head[$h][1].= ''.($nbFiles+$nbLinks).' ';
$head[$h][2] = 'document';
$h++;
@@ -133,7 +133,7 @@ function project_prepare_head($object)
$nbComments = $object->getNbComments();
$head[$h][0] = DOL_URL_ROOT.'/projet/comment.php?id='.$object->id;
$head[$h][1] = $langs->trans("CommentLink");
- if ($nbComments > 0) $head[$h][1].= ' '.$nbComments.' ';
+ if ($nbComments > 0) $head[$h][1].= ''.$nbComments.' ';
$head[$h][2] = 'project_comment';
$h++;
}
@@ -174,7 +174,7 @@ function task_prepare_head($object)
$nbContact = count($object->liste_contact(-1, 'internal')) + count($object->liste_contact(-1, 'external'));
$head[$h][0] = DOL_URL_ROOT.'/projet/tasks/contact.php?id='.$object->id.(GETPOST('withproject')?'&withproject=1':'');
$head[$h][1] = $langs->trans("TaskRessourceLinks");
- if ($nbContact > 0) $head[$h][1].= ' '.$nbContact.' ';
+ if ($nbContact > 0) $head[$h][1].= ''.$nbContact.' ';
$head[$h][2] = 'task_contact';
$h++;
@@ -195,7 +195,7 @@ function task_prepare_head($object)
$head[$h][0] = DOL_URL_ROOT.'/projet/tasks/time.php?id='.$object->id.(GETPOST('withproject')?'&withproject=1':'');
$head[$h][1] = $langs->trans("TimeSpent");
- if ($nbTimeSpent > 0) $head[$h][1].= ' ... ';
+ if ($nbTimeSpent > 0) $head[$h][1].= '... ';
$head[$h][2] = 'task_time';
$h++;
@@ -212,7 +212,7 @@ function task_prepare_head($object)
if(!empty($object->note_public)) $nbNote++;
$head[$h][0] = DOL_URL_ROOT.'/projet/tasks/note.php?id='.$object->id.(GETPOST('withproject')?'&withproject=1':'');
$head[$h][1] = $langs->trans('Notes');
- if ($nbNote > 0) $head[$h][1].= ' '.$nbNote.' ';
+ if ($nbNote > 0) $head[$h][1].= ''.$nbNote.' ';
$head[$h][2] = 'task_notes';
$h++;
}
@@ -224,7 +224,7 @@ function task_prepare_head($object)
$nbFiles = count(dol_dir_list($filesdir, 'files', 0, '', '(\.meta|_preview.*\.png)$'));
$nbLinks=Link::count($db, $object->element, $object->id);
$head[$h][1] = $langs->trans('Documents');
- if (($nbFiles+$nbLinks) > 0) $head[$h][1].= ' '.($nbFiles+$nbLinks).' ';
+ if (($nbFiles+$nbLinks) > 0) $head[$h][1].= ''.($nbFiles+$nbLinks).' ';
$head[$h][2] = 'task_document';
$h++;
@@ -234,7 +234,7 @@ function task_prepare_head($object)
$nbComments = $object->getNbComments();
$head[$h][0] = DOL_URL_ROOT.'/projet/tasks/comment.php?id='.$object->id.(GETPOST('withproject')?'&withproject=1':'');
$head[$h][1] = $langs->trans("CommentLink");
- if ($nbComments > 0) $head[$h][1].= ' '.$nbComments.' ';
+ if ($nbComments > 0) $head[$h][1].= ''.$nbComments.' ';
$head[$h][2] = 'task_comment';
$h++;
}
@@ -1857,7 +1857,7 @@ function print_projecttasks_array($db, $form, $socid, $projectsListId, $mytasks
$i = 0;
print '';
- print_liste_field_titre($title.' '.$num.' ', $_SERVER["PHP_SELF"], "", "", "", "", $sortfield, $sortorder);
+ print_liste_field_titre($title.''.$num.' ', $_SERVER["PHP_SELF"], "", "", "", "", $sortfield, $sortorder);
print_liste_field_titre("ThirdParty", $_SERVER["PHP_SELF"], "", "", "", "", $sortfield, $sortorder);
if (! empty($conf->global->PROJECT_USE_OPPORTUNITIES))
{
diff --git a/htdocs/core/lib/propal.lib.php b/htdocs/core/lib/propal.lib.php
index 2b894b49790..9e12e9d4229 100644
--- a/htdocs/core/lib/propal.lib.php
+++ b/htdocs/core/lib/propal.lib.php
@@ -60,7 +60,7 @@ function propal_prepare_head($object)
$nbContact = count($object->liste_contact(-1, 'internal')) + count($object->liste_contact(-1, 'external'));
$head[$h][0] = DOL_URL_ROOT.'/comm/propal/contact.php?id='.$object->id;
$head[$h][1] = $langs->trans('ContactsAddresses');
- if ($nbContact > 0) $head[$h][1].= ' '.$nbContact.' ';
+ if ($nbContact > 0) $head[$h][1].= ''.$nbContact.' ';
$head[$h][2] = 'contact';
$h++;
}
@@ -78,7 +78,7 @@ function propal_prepare_head($object)
if(!empty($object->note_public)) $nbNote++;
$head[$h][0] = DOL_URL_ROOT.'/comm/propal/note.php?id='.$object->id;
$head[$h][1] = $langs->trans('Notes');
- if ($nbNote > 0) $head[$h][1].= ' '.$nbNote.' ';
+ if ($nbNote > 0) $head[$h][1].= ''.$nbNote.' ';
$head[$h][2] = 'note';
$h++;
}
@@ -90,7 +90,7 @@ function propal_prepare_head($object)
$nbLinks=Link::count($db, $object->element, $object->id);
$head[$h][0] = DOL_URL_ROOT.'/comm/propal/document.php?id='.$object->id;
$head[$h][1] = $langs->trans('Documents');
- if (($nbFiles+$nbLinks) > 0) $head[$h][1].= ' '.($nbFiles+$nbLinks).' ';
+ if (($nbFiles+$nbLinks) > 0) $head[$h][1].= ''.($nbFiles+$nbLinks).' ';
$head[$h][2] = 'document';
$h++;
diff --git a/htdocs/core/lib/reception.lib.php b/htdocs/core/lib/reception.lib.php
index 15ca4de37e0..33591b3beea 100644
--- a/htdocs/core/lib/reception.lib.php
+++ b/htdocs/core/lib/reception.lib.php
@@ -60,7 +60,7 @@ function reception_prepare_head(Reception $object)
$nbContact = count($objectsrc->liste_contact(-1, 'internal')) + count($objectsrc->liste_contact(-1, 'external'));
$head[$h][0] = DOL_URL_ROOT."/reception/contact.php?id=".$object->id;
$head[$h][1] = $langs->trans("ContactsAddresses");
- if ($nbContact > 0) $head[$h][1].= ' '.$nbContact.' ';
+ if ($nbContact > 0) $head[$h][1].= ''.$nbContact.' ';
$head[$h][2] = 'contact';
$h++;
}
@@ -70,7 +70,7 @@ function reception_prepare_head(Reception $object)
if (!empty($object->note_public)) $nbNote++;
$head[$h][0] = DOL_URL_ROOT."/reception/note.php?id=".$object->id;
$head[$h][1] = $langs->trans("Notes");
- if ($nbNote > 0) $head[$h][1].= ' '.$nbNote.' ';
+ if ($nbNote > 0) $head[$h][1].= ''.$nbNote.' ';
$head[$h][2] = 'note';
$h++;
diff --git a/htdocs/core/lib/resource.lib.php b/htdocs/core/lib/resource.lib.php
index 0ee012e49cc..7bd2454dbe6 100644
--- a/htdocs/core/lib/resource.lib.php
+++ b/htdocs/core/lib/resource.lib.php
@@ -45,7 +45,7 @@ function resource_prepare_head($object)
$nbContact = count($object->liste_contact(-1, 'internal')) + count($object->liste_contact(-1, 'external'));
$head[$h][0] = DOL_URL_ROOT.'/resource/contact.php?id='.$object->id;
$head[$h][1] = $langs->trans('ContactsAddresses');
- if ($nbContact > 0) $head[$h][1].= ' '.$nbContact.' ';
+ if ($nbContact > 0) $head[$h][1].= ''.$nbContact.' ';
$head[$h][2] = 'contact';
$h++;
}
@@ -63,7 +63,7 @@ function resource_prepare_head($object)
if(!empty($object->note_public)) $nbNote++;
$head[$h][0] = DOL_URL_ROOT.'/resource/note.php?id='.$object->id;
$head[$h][1] = $langs->trans('Notes');
- if ($nbNote > 0) $head[$h][1].= ' '.$nbNote.' ';
+ if ($nbNote > 0) $head[$h][1].= ''.$nbNote.' ';
$head[$h][2] = 'note';
$h++;
}
@@ -73,7 +73,7 @@ function resource_prepare_head($object)
$nbFiles = count(dol_dir_list($upload_dir, 'files', 0, '', '(\.meta|_preview.*\.png)$'));
$head[$h][0] = DOL_URL_ROOT.'/resource/document.php?id='.$object->id;
$head[$h][1] = $langs->trans("Documents");
- if($nbFiles > 0) $head[$h][1].= ' '.$nbFiles.' ';
+ if($nbFiles > 0) $head[$h][1].= ''.$nbFiles.' ';
$head[$h][2] = 'documents';
$h++;
diff --git a/htdocs/core/lib/salaries.lib.php b/htdocs/core/lib/salaries.lib.php
index 6c468a74af9..01b3cafd60d 100644
--- a/htdocs/core/lib/salaries.lib.php
+++ b/htdocs/core/lib/salaries.lib.php
@@ -51,7 +51,7 @@ function salaries_prepare_head($object)
$nbLinks=Link::count($db, $object->element, $object->id);
$head[$h][0] = DOL_URL_ROOT.'/salaries/document.php?id='.$object->id;
$head[$h][1] = $langs->trans('Documents');
- if (($nbFiles+$nbLinks) > 0) $head[$h][1].= ' '.($nbFiles+$nbLinks).' ';
+ if (($nbFiles+$nbLinks) > 0) $head[$h][1].= ''.($nbFiles+$nbLinks).' ';
$head[$h][2] = 'documents';
$h++;
diff --git a/htdocs/core/lib/sendings.lib.php b/htdocs/core/lib/sendings.lib.php
index e1732e1b4fd..2c0501500f9 100644
--- a/htdocs/core/lib/sendings.lib.php
+++ b/htdocs/core/lib/sendings.lib.php
@@ -74,7 +74,7 @@ function shipping_prepare_head($object)
$nbContact = count($objectsrc->liste_contact(-1, 'internal')) + count($objectsrc->liste_contact(-1, 'external'));
$head[$h][0] = DOL_URL_ROOT."/expedition/contact.php?id=".$object->id;
$head[$h][1] = $langs->trans("ContactsAddresses");
- if ($nbContact > 0) $head[$h][1].= ' '.$nbContact.' ';
+ if ($nbContact > 0) $head[$h][1].= ''.$nbContact.' ';
$head[$h][2] = 'contact';
$h++;
}
@@ -86,7 +86,7 @@ function shipping_prepare_head($object)
$nbLinks=Link::count($db, $object->element, $object->id);
$head[$h][0] = DOL_URL_ROOT.'/expedition/document.php?id='.$object->id;
$head[$h][1] = $langs->trans('Documents');
- if (($nbFiles+$nbLinks) > 0) $head[$h][1].= ' '.($nbFiles+$nbLinks).' ';
+ if (($nbFiles+$nbLinks) > 0) $head[$h][1].= ''.($nbFiles+$nbLinks).' ';
$head[$h][2] = 'documents';
$h++;
@@ -95,7 +95,7 @@ function shipping_prepare_head($object)
if (!empty($object->note_public)) $nbNote++;
$head[$h][0] = DOL_URL_ROOT."/expedition/note.php?id=".$object->id;
$head[$h][1] = $langs->trans("Notes");
- if ($nbNote > 0) $head[$h][1].= ' '.$nbNote.' ';
+ if ($nbNote > 0) $head[$h][1].= ''.$nbNote.' ';
$head[$h][2] = 'note';
$h++;
diff --git a/htdocs/core/lib/supplier_proposal.lib.php b/htdocs/core/lib/supplier_proposal.lib.php
index e5eff78b1ac..6549b362c11 100644
--- a/htdocs/core/lib/supplier_proposal.lib.php
+++ b/htdocs/core/lib/supplier_proposal.lib.php
@@ -49,7 +49,7 @@ function supplier_proposal_prepare_head($object)
$nbContact = count($object->liste_contact(-1, 'internal')) + count($object->liste_contact(-1, 'external'));
$head[$h][0] = DOL_URL_ROOT.'/supplier_proposal/contact.php?id='.$object->id;
$head[$h][1] = $langs->trans('ContactsAddresses');
- if ($nbContact > 0) $head[$h][1].= ' '.$nbContact.' ';
+ if ($nbContact > 0) $head[$h][1].= ''.$nbContact.' ';
$head[$h][2] = 'contact';
$h++;
}
@@ -67,7 +67,7 @@ function supplier_proposal_prepare_head($object)
if(!empty($object->note_public)) $nbNote++;
$head[$h][0] = DOL_URL_ROOT.'/supplier_proposal/note.php?id='.$object->id;
$head[$h][1] = $langs->trans('Notes');
- if ($nbNote > 0) $head[$h][1].= ' '.$nbNote.' ';
+ if ($nbNote > 0) $head[$h][1].= ''.$nbNote.' ';
$head[$h][2] = 'note';
$h++;
}
@@ -79,7 +79,7 @@ function supplier_proposal_prepare_head($object)
$nbLinks=Link::count($db, $object->element, $object->id);
$head[$h][0] = DOL_URL_ROOT.'/supplier_proposal/document.php?id='.$object->id;
$head[$h][1] = $langs->trans('Documents');
- if (($nbFiles+$nbLinks) > 0) $head[$h][1].= ' '.($nbFiles+$nbLinks).' ';
+ if (($nbFiles+$nbLinks) > 0) $head[$h][1].= ''.($nbFiles+$nbLinks).' ';
$head[$h][2] = 'document';
$h++;
diff --git a/htdocs/core/lib/tax.lib.php b/htdocs/core/lib/tax.lib.php
index 15476fc3420..ade6a7f49cf 100644
--- a/htdocs/core/lib/tax.lib.php
+++ b/htdocs/core/lib/tax.lib.php
@@ -59,7 +59,7 @@ function tax_prepare_head(ChargeSociales $object)
$nbLinks=Link::count($db, $object->element, $object->id);
$head[$h][0] = DOL_URL_ROOT.'/compta/sociales/document.php?id='.$object->id;
$head[$h][1] = $langs->trans("Documents");
- if (($nbFiles+$nbLinks) > 0) $head[$h][1].= ' '.($nbFiles+$nbLinks).' ';
+ if (($nbFiles+$nbLinks) > 0) $head[$h][1].= ''.($nbFiles+$nbLinks).' ';
$head[$h][2] = 'documents';
$h++;
diff --git a/htdocs/core/lib/ticket.lib.php b/htdocs/core/lib/ticket.lib.php
index 1aa4de3192c..fdd10118f0a 100644
--- a/htdocs/core/lib/ticket.lib.php
+++ b/htdocs/core/lib/ticket.lib.php
@@ -86,7 +86,7 @@ function ticket_prepare_head($object)
$nbContact = count($object->liste_contact(-1, 'internal')) + count($object->liste_contact(-1, 'external'));
$head[$h][0] = DOL_URL_ROOT.'/ticket/contact.php?track_id='.$object->track_id;
$head[$h][1] = $langs->trans('ContactsAddresses');
- if ($nbContact > 0) $head[$h][1].= ' '.$nbContact.' ';
+ if ($nbContact > 0) $head[$h][1].= ''.$nbContact.' ';
$head[$h][2] = 'contact';
$h++;
}
@@ -100,7 +100,7 @@ function ticket_prepare_head($object)
$head[$h][0] = dol_buildpath('/ticket/document.php', 1) . '?id=' . $object->id;
$head[$h][1] = $langs->trans("Documents");
if ($nbFiles > 0) {
- $head[$h][1] .= ' ' . $nbFiles . ' ';
+ $head[$h][1] .= '' . $nbFiles . ' ';
}
$head[$h][2] = 'tabTicketDocument';
diff --git a/htdocs/core/lib/usergroups.lib.php b/htdocs/core/lib/usergroups.lib.php
index a65d51d5f04..a9dca00d645 100644
--- a/htdocs/core/lib/usergroups.lib.php
+++ b/htdocs/core/lib/usergroups.lib.php
@@ -64,7 +64,7 @@ function user_prepare_head($object)
if ($canreadperms)
{
$head[$h][0] = DOL_URL_ROOT.'/user/perms.php?id='.$object->id;
- $head[$h][1] = $langs->trans("Rights"). ' '.($object->nb_rights).' ';
+ $head[$h][1] = $langs->trans("Rights"). ''.($object->nb_rights).' ';
$head[$h][2] = 'rights';
$h++;
}
@@ -94,7 +94,7 @@ function user_prepare_head($object)
}
$head[$h][0] = DOL_URL_ROOT.'/user/agenda_extsites.php?id='.$object->id;
- $head[$h][1] = $langs->trans("ExtSites").($nbagenda ? ' '.$nbagenda.' ' : '');
+ $head[$h][1] = $langs->trans("ExtSites").($nbagenda ? ''.$nbagenda.' ' : '');
$head[$h][2] = 'extsites';
$h++;
}
@@ -132,7 +132,7 @@ function user_prepare_head($object)
$head[$h][0] = DOL_URL_ROOT.'/user/notify/card.php?id='.$object->id;
$head[$h][1] = $langs->trans("Notifications");
- if ($nbNote > 0) $head[$h][1].= ' '.$nbNote.' ';
+ if ($nbNote > 0) $head[$h][1].= ''.$nbNote.' ';
$head[$h][2] = 'notify';
$h++;
}
@@ -164,7 +164,7 @@ function user_prepare_head($object)
if(!empty($object->note)) $nbNote++;
$head[$h][0] = DOL_URL_ROOT.'/user/note.php?id='.$object->id;
$head[$h][1] = $langs->trans("Note");
- if ($nbNote > 0) $head[$h][1].= ' '.$nbNote.' ';
+ if ($nbNote > 0) $head[$h][1].= ''.$nbNote.' ';
$head[$h][2] = 'note';
$h++;
@@ -176,7 +176,7 @@ function user_prepare_head($object)
$nbLinks=Link::count($db, $object->element, $object->id);
$head[$h][0] = DOL_URL_ROOT.'/user/document.php?userid='.$object->id;
$head[$h][1] = $langs->trans("Documents");
- if (($nbFiles+$nbLinks) > 0) $head[$h][1].= ' '.($nbFiles+$nbLinks).' ';
+ if (($nbFiles+$nbLinks) > 0) $head[$h][1].= ''.($nbFiles+$nbLinks).' ';
$head[$h][2] = 'document';
$h++;
@@ -228,7 +228,7 @@ function group_prepare_head($object)
if ($canreadperms)
{
$head[$h][0] = DOL_URL_ROOT.'/user/group/perms.php?id='.$object->id;
- $head[$h][1] = $langs->trans("GroupRights"). ' '.($object->nb_rights).' ';
+ $head[$h][1] = $langs->trans("GroupRights"). ''.($object->nb_rights).' ';
$head[$h][2] = 'rights';
$h++;
}
diff --git a/htdocs/core/lib/vat.lib.php b/htdocs/core/lib/vat.lib.php
index 57798381274..f8c7b579c18 100644
--- a/htdocs/core/lib/vat.lib.php
+++ b/htdocs/core/lib/vat.lib.php
@@ -54,7 +54,7 @@ function vat_prepare_head($object)
$nbLinks=Link::count($db, $object->element, $object->id);
$head[$tab][0] = DOL_URL_ROOT.'/compta/tva/document.php?id='.$object->id;
$head[$tab][1] = $langs->trans("Documents");
- if (($nbFiles+$nbLinks) > 0) $head[$tab][1].= ' '.($nbFiles+$nbLinks).' ';
+ if (($nbFiles+$nbLinks) > 0) $head[$tab][1].= ''.($nbFiles+$nbLinks).' ';
$head[$tab][2] = 'documents';
$tab++;
diff --git a/htdocs/core/modules/bom/doc/doc_generic_bom_odt.modules.php b/htdocs/core/modules/bom/doc/doc_generic_bom_odt.modules.php
index 38358222282..63c4e9ea836 100644
--- a/htdocs/core/modules/bom/doc/doc_generic_bom_odt.modules.php
+++ b/htdocs/core/modules/bom/doc/doc_generic_bom_odt.modules.php
@@ -38,7 +38,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/doc.lib.php';
/**
* Class to build documents using ODF templates generator
*/
-class doc_generic_bom_odt extends ModelePDFBoms
+class doc_generic_bom_odt extends ModelePDFBom
{
/**
* Issuer
diff --git a/htdocs/core/modules/bom/modules_bom.php b/htdocs/core/modules/bom/modules_bom.php
index f8f29fec2e6..45bca8a38b3 100644
--- a/htdocs/core/modules/bom/modules_bom.php
+++ b/htdocs/core/modules/bom/modules_bom.php
@@ -36,7 +36,7 @@ require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; // requir
/**
* Parent class for boms models
*/
-abstract class ModelePDFBoms extends CommonDocGenerator
+abstract class ModelePDFBom extends CommonDocGenerator
{
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
diff --git a/htdocs/core/modules/modMrp.class.php b/htdocs/core/modules/modMrp.class.php
index bc85111ebd2..43908b85164 100644
--- a/htdocs/core/modules/modMrp.class.php
+++ b/htdocs/core/modules/modMrp.class.php
@@ -62,7 +62,7 @@ class modMrp extends DolibarrModules
// Used only if file README.md and README-LL.md not found.
$this->descriptionlong = "Module to Manage Manufacturing Orders (MO)";
// Possible values for version are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'
- $this->version = 'dolibarr';
+ $this->version = 'experimental';
// Url to the file with your last numberversion of this module
//$this->url_last_version = 'http://www.example.com/versionmodule.txt';
diff --git a/htdocs/core/modules/mrp/doc/doc_generic_mo_odt.modules.php b/htdocs/core/modules/mrp/doc/doc_generic_mo_odt.modules.php
index 0447694465f..854c7c350b3 100644
--- a/htdocs/core/modules/mrp/doc/doc_generic_mo_odt.modules.php
+++ b/htdocs/core/modules/mrp/doc/doc_generic_mo_odt.modules.php
@@ -38,7 +38,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/doc.lib.php';
/**
* Class to build documents using ODF templates generator
*/
-class doc_generic_mo_odt extends ModelePDFMos
+class doc_generic_mo_odt extends ModelePDFMo
{
/**
* Issuer
diff --git a/htdocs/core/modules/mrp/modules_mrp.php b/htdocs/core/modules/mrp/modules_mo.php
similarity index 93%
rename from htdocs/core/modules/mrp/modules_mrp.php
rename to htdocs/core/modules/mrp/modules_mo.php
index bd83fab70b7..76d204a9826 100644
--- a/htdocs/core/modules/mrp/modules_mrp.php
+++ b/htdocs/core/modules/mrp/modules_mo.php
@@ -23,10 +23,10 @@
*/
/**
- * \file htdocs/core/modules/mrp/modules_mrp.php
- * \ingroup bom
- * \brief File that contains parent class for mos models
- * and parent class for mos numbering models
+ * \file htdocs/core/modules/mrp/modules_mo.php
+ * \ingroup mrp
+ * \brief File that contains parent class for MOs models
+ * and parent class for MOs numbering models
*/
require_once DOL_DOCUMENT_ROOT.'/core/class/commondocgenerator.class.php';
@@ -36,7 +36,7 @@ require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; // requir
/**
* Parent class for mos models
*/
-abstract class ModelePDFMos extends CommonDocGenerator
+abstract class ModelePDFMo extends CommonDocGenerator
{
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
diff --git a/htdocs/cron/list.php b/htdocs/cron/list.php
index d83e6f4e258..f395475faf7 100644
--- a/htdocs/cron/list.php
+++ b/htdocs/cron/list.php
@@ -178,12 +178,12 @@ if (empty($reshook))
// Mass actions
$objectclass='CronJob';
$objectlabel='CronJob';
- $permtoread = $user->rights->cron->read;
- $permtocreate = $user->rights->cron->create?$user->rights->cron->create:$user->rights->cron->write;
- $permtodelete = $user->rights->cron->delete;
+ $permissiontoread = $user->rights->cron->read;
+ $permissiontoadd = $user->rights->cron->create?$user->rights->cron->create:$user->rights->cron->write;
+ $permissiontodelete = $user->rights->cron->delete;
$uploaddir = $conf->cron->dir_output;
include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php';
- if ($permtocreate)
+ if ($permissiontoadd)
{
$tmpcron = new Cronjob($db);
foreach($toselect as $id)
diff --git a/htdocs/emailcollector/lib/emailcollector.lib.php b/htdocs/emailcollector/lib/emailcollector.lib.php
index c15c217ea5c..089545e8d7e 100644
--- a/htdocs/emailcollector/lib/emailcollector.lib.php
+++ b/htdocs/emailcollector/lib/emailcollector.lib.php
@@ -49,7 +49,7 @@ function emailcollectorPrepareHead($object)
if (!empty($object->note_public)) $nbNote++;
$head[$h][0] = dol_buildpath('/emailcollector/emailcollector_note.php', 1).'?id='.$object->id;
$head[$h][1] = $langs->trans('Notes');
- if ($nbNote > 0) $head[$h][1].= ' '.$nbNote.' ';
+ if ($nbNote > 0) $head[$h][1].= ''.$nbNote.' ';
$head[$h][2] = 'note';
$h++;
}*/
@@ -61,7 +61,7 @@ function emailcollectorPrepareHead($object)
$nbLinks=Link::count($db, $object->element, $object->id);
$head[$h][0] = dol_buildpath("/emailcollector/emailcollector_document.php", 1).'?id='.$object->id;
$head[$h][1] = $langs->trans('Documents');
- if (($nbFiles+$nbLinks) > 0) $head[$h][1].= ' '.($nbFiles+$nbLinks).' ';
+ if (($nbFiles+$nbLinks) > 0) $head[$h][1].= ''.($nbFiles+$nbLinks).' ';
$head[$h][2] = 'document';
$h++;
diff --git a/htdocs/expedition/class/expedition.class.php b/htdocs/expedition/class/expedition.class.php
index 2e61ad47733..8ec0cd64ec6 100644
--- a/htdocs/expedition/class/expedition.class.php
+++ b/htdocs/expedition/class/expedition.class.php
@@ -197,13 +197,6 @@ class Expedition extends CommonObject
$this->statutshorts[0] = 'StatusSendingDraftShort';
$this->statutshorts[1] = 'StatusSendingValidatedShort';
$this->statutshorts[2] = 'StatusSendingProcessedShort';
-
- /* Status "billed" or not is managed by another field than status
- if (! empty($conf->global->WORKFLOW_BILL_ON_SHIPMENT))
- {
- $this->statuts[2] = 'StatusSendingBilled';
- $this->statutshorts[2] = 'StatusSendingBilledShort';
- }*/
}
/**
@@ -1673,45 +1666,23 @@ class Expedition extends CommonObject
/**
* Return label of a status
*
- * @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
- * @return string Label of status
+ * @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)
{
// phpcs:enable
- global $langs;
+ global $langs;
- if ($mode==0)
- {
- if ($status==0) return $langs->trans($this->statuts[$status]);
- elseif ($status==1) return $langs->trans($this->statuts[$status]);
- elseif ($status==2) return $langs->trans($this->statuts[$status]);
- }
- elseif ($mode==1)
- {
- if ($status==0) return $langs->trans($this->statutshorts[$status]);
- elseif ($status==1) return $langs->trans($this->statutshorts[$status]);
- elseif ($status==2) return $langs->trans($this->statutshorts[$status]);
- }
- elseif ($mode == 3)
- {
- if ($status==0) return img_picto($langs->trans($this->statuts[$status]), 'statut0');
- elseif ($status==1) return img_picto($langs->trans($this->statuts[$status]), 'statut4');
- elseif ($status==2) return img_picto($langs->trans($this->statuts[$status]), 'statut6');
- }
- elseif ($mode == 4)
- {
- if ($status==0) return img_picto($langs->trans($this->statuts[$status]), 'statut0').' '.$langs->trans($this->statuts[$status]);
- elseif ($status==1) return img_picto($langs->trans($this->statuts[$status]), 'statut4').' '.$langs->trans($this->statuts[$status]);
- elseif ($status==2) return img_picto($langs->trans($this->statuts[$status]), 'statut6').' '.$langs->trans($this->statuts[$status]);
- }
- elseif ($mode == 5)
- {
- if ($status==0) return $langs->trans($this->statutshorts[$status]).' '.img_picto($langs->trans($this->statuts[$status]), 'statut0');
- elseif ($status==1) return $langs->trans($this->statutshorts[$status]).' '.img_picto($langs->trans($this->statuts[$status]), 'statut4');
- elseif ($status==2) return $langs->trans($this->statutshorts[$status]).' '.img_picto($langs->trans($this->statuts[$status]), 'statut6');
- }
+ $labelStatus = $langs->trans($this->statuts[$status]);
+ $labelStatusShort = $langs->trans($this->statutshorts[$status]);
+
+ $statusType = 'status'.$status;
+ if ($status == self::STATUS_VALIDATED) $statusType = 'status4';
+ if ($status == self::STATUS_CLOSED) $statusType = 'status6';
+
+ return dolGetStatus($labelStatus, $labelStatusShort, '', $statusType, $mode);
}
/**
diff --git a/htdocs/expedition/list.php b/htdocs/expedition/list.php
index 888f7037efb..eeb05e8926c 100644
--- a/htdocs/expedition/list.php
+++ b/htdocs/expedition/list.php
@@ -165,9 +165,9 @@ if (empty($reshook))
{
$objectclass = 'Expedition';
$objectlabel = 'Sendings';
- $permtoread = $user->rights->expedition->lire;
- $permtocreate = $user->rights->expedition->creer;
- $permtodelete = $user->rights->expedition->supprimer;
+ $permissiontoread = $user->rights->expedition->lire;
+ $permissiontoadd = $user->rights->expedition->creer;
+ $permissiontodelete = $user->rights->expedition->supprimer;
$uploaddir = $conf->expedition->dir_output . '/sending';
include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php';
}
diff --git a/htdocs/expensereport/list.php b/htdocs/expensereport/list.php
index 6f837fb866c..73331228f2f 100644
--- a/htdocs/expensereport/list.php
+++ b/htdocs/expensereport/list.php
@@ -195,8 +195,8 @@ if (empty($reshook))
// Mass actions
$objectclass='ExpenseReport';
$objectlabel='ExpenseReport';
- $permtoread = $user->rights->expensereport->lire;
- $permtodelete = $user->rights->expensereport->supprimer;
+ $permissiontoread = $user->rights->expensereport->lire;
+ $permissiontodelete = $user->rights->expensereport->supprimer;
$uploaddir = $conf->expensereport->dir_output;
include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php';
diff --git a/htdocs/fichinter/list.php b/htdocs/fichinter/list.php
index 9cee1ec691c..028fd3f717b 100644
--- a/htdocs/fichinter/list.php
+++ b/htdocs/fichinter/list.php
@@ -160,8 +160,8 @@ if (empty($reshook))
// Mass actions
$objectclass='Fichinter';
$objectlabel='Interventions';
- $permtoread = $user->rights->ficheinter->lire;
- $permtodelete = $user->rights->ficheinter->supprimer;
+ $permissiontoread = $user->rights->ficheinter->lire;
+ $permissiontodelete = $user->rights->ficheinter->supprimer;
$uploaddir = $conf->ficheinter->dir_output;
include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php';
}
diff --git a/htdocs/fourn/commande/list.php b/htdocs/fourn/commande/list.php
index f8325ce8b0f..f14a8d92c66 100644
--- a/htdocs/fourn/commande/list.php
+++ b/htdocs/fourn/commande/list.php
@@ -223,8 +223,8 @@ if (empty($reshook))
// Mass actions
$objectclass='CommandeFournisseur';
$objectlabel='SupplierOrders';
- $permtoread = $user->rights->fournisseur->commande->lire;
- $permtodelete = $user->rights->fournisseur->commande->supprimer;
+ $permissiontoread = $user->rights->fournisseur->commande->lire;
+ $permissiontodelete = $user->rights->fournisseur->commande->supprimer;
$uploaddir = $conf->fournisseur->commande->dir_output;
include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php';
diff --git a/htdocs/fourn/facture/list.php b/htdocs/fourn/facture/list.php
index b13e283ea65..c06c070d45e 100644
--- a/htdocs/fourn/facture/list.php
+++ b/htdocs/fourn/facture/list.php
@@ -241,9 +241,9 @@ if (empty($reshook))
// Mass actions
$objectclass='FactureFournisseur';
$objectlabel='SupplierInvoices';
- $permtoread = $user->rights->fournisseur->facture->lire;
- $permtocreate = $user->rights->fournisseur->facture->creer;
- $permtodelete = $user->rights->fournisseur->facture->supprimer;
+ $permissiontoread = $user->rights->fournisseur->facture->lire;
+ $permissiontoadd = $user->rights->fournisseur->facture->creer;
+ $permissiontodelete = $user->rights->fournisseur->facture->supprimer;
$uploaddir = $conf->fournisseur->facture->dir_output;
include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php';
}
diff --git a/htdocs/fourn/index.php b/htdocs/fourn/index.php
index 3615051fa2f..b10ee9ff909 100644
--- a/htdocs/fourn/index.php
+++ b/htdocs/fourn/index.php
@@ -121,7 +121,7 @@ if (! empty($conf->fournisseur->enabled))
{
print '';
print '';
- print ''.$langs->trans("DraftOrders").' '.$num.' ';
+ print ''.$langs->trans("DraftOrders").''.$num.' ';
$i = 0;
while ($i < $num)
@@ -176,7 +176,7 @@ if (! empty($conf->fournisseur->enabled) && $user->rights->fournisseur->facture-
{
print '';
print '';
- print ''.$langs->trans("DraftBills").' '.$num.' ';
+ print ''.$langs->trans("DraftBills").''.$num.' ';
$i = 0;
$tot_ttc = 0;
diff --git a/htdocs/holiday/define_holiday.php b/htdocs/holiday/define_holiday.php
index 3419d663e30..586617a79d6 100644
--- a/htdocs/holiday/define_holiday.php
+++ b/htdocs/holiday/define_holiday.php
@@ -95,8 +95,8 @@ if (empty($reshook))
/*
$objectclass='Skeleton';
$objectlabel='Skeleton';
- $permtoread = $user->rights->skeleton->read;
- $permtodelete = $user->rights->skeleton->delete;
+ $permissiontoread = $user->rights->skeleton->read;
+ $permissiontodelete = $user->rights->skeleton->delete;
$uploaddir = $conf->skeleton->dir_output;
include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php';
*/
diff --git a/htdocs/holiday/list.php b/htdocs/holiday/list.php
index 8b30c03a1a9..273c3cf9133 100644
--- a/htdocs/holiday/list.php
+++ b/htdocs/holiday/list.php
@@ -196,8 +196,8 @@ if (empty($reshook))
// Mass actions
$objectclass='Holiday';
$objectlabel='Holiday';
- $permtoread = $user->rights->holiday->read;
- $permtodelete = $user->rights->holiday->delete;
+ $permissiontoread = $user->rights->holiday->read;
+ $permissiontodelete = $user->rights->holiday->delete;
$uploaddir = $conf->holiday->dir_output;
include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php';
}
diff --git a/htdocs/holiday/view_log.php b/htdocs/holiday/view_log.php
index 9e5f0ad0cba..813fe245cc1 100644
--- a/htdocs/holiday/view_log.php
+++ b/htdocs/holiday/view_log.php
@@ -110,8 +110,8 @@ if (empty($reshook))
// Mass actions
/*$objectclass='MyObject';
$objectlabel='MyObject';
- $permtoread = $user->rights->mymodule->read;
- $permtodelete = $user->rights->mymodule->delete;
+ $permissiontoread = $user->rights->mymodule->read;
+ $permissiontodelete = $user->rights->mymodule->delete;
$uploaddir = $conf->mymodule->dir_output;
include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php';
*/
diff --git a/htdocs/imports/index.php b/htdocs/imports/index.php
index 2ce0139f517..7f9c113b10f 100644
--- a/htdocs/imports/index.php
+++ b/htdocs/imports/index.php
@@ -54,6 +54,7 @@ print ' ';
// List of import set
/*
+print '';
print '
';
print '';
print ''.$langs->trans("Module").' ';
@@ -84,6 +85,7 @@ else
print ' '.$langs->trans("NoImportableData").' ';
}
print '
';
+print '
';
print ' ';
*/
@@ -107,6 +109,7 @@ print ' ';
// List of available import format
+print '';
print '
';
print '';
print ''.$langs->trans("AvailableFormats").' ';
@@ -130,6 +133,7 @@ foreach($liste as $key)
}
print '
';
+print '
';
//print '';
diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang
index 8f052636ac9..2b172f2ea18 100644
--- a/htdocs/langs/en_US/admin.lang
+++ b/htdocs/langs/en_US/admin.lang
@@ -277,7 +277,7 @@ MAIN_MAIL_ERRORS_TO=Email used for error returns emails (fields 'Errors-To' in e
MAIN_MAIL_AUTOCOPY_TO= Copy (Bcc) all sent emails to
MAIN_DISABLE_ALL_MAILS=Disable all email sending (for test purposes or demos)
MAIN_MAIL_FORCE_SENDTO=Send all emails to (instead of real recipients, for test purposes)
-MAIN_MAIL_ENABLED_USER_DEST_SELECT=Add employee users with email into allowed recipient list
+MAIN_MAIL_ENABLED_USER_DEST_SELECT=Suggest emails of employees (if defined) into the list of predefined recipient when writing a new email
MAIN_MAIL_SENDMODE=Email sending method
MAIN_MAIL_SMTPS_ID=SMTP ID (if sending server requires authentication)
MAIN_MAIL_SMTPS_PW=SMTP Password (if sending server requires authentication)
@@ -1796,6 +1796,8 @@ FixTZ=TimeZone fix
FillFixTZOnlyIfRequired=Example: +2 (fill only if problem experienced)
ExpectedChecksum=Expected Checksum
CurrentChecksum=Current Checksum
+ExpectedSize=Expected size
+CurrentSize=Current size
ForcedConstants=Required constant values
MailToSendProposal=Customer proposals
MailToSendOrder=Sales orders
diff --git a/htdocs/langs/en_US/mrp.lang b/htdocs/langs/en_US/mrp.lang
index bc71a65f72a..fd89d8c8e38 100644
--- a/htdocs/langs/en_US/mrp.lang
+++ b/htdocs/langs/en_US/mrp.lang
@@ -12,7 +12,7 @@ BOMsSetup=Setup of module BOM
ListOfBOMs=List of bills of material - BOM
ListOfManufacturingOrders=List of Manufacturing Orders
NewBOM=New bill of material
-ProductBOMHelp=Product to create with this BOM
+ProductBOMHelp=Product to create with this BOM. Note: Products with the property 'Nature of product' = 'Raw material' are not visible into this list.
BOMsNumberingModules=BOM numbering templates
BOMsModelModule=BOM document templates
MOsNumberingModules=MO numbering templates
diff --git a/htdocs/margin/checkMargins.php b/htdocs/margin/checkMargins.php
index a1bf67cb8c5..776bec4171c 100644
--- a/htdocs/margin/checkMargins.php
+++ b/htdocs/margin/checkMargins.php
@@ -120,8 +120,8 @@ if (empty($reshook))
if ((string) $type == '1') { $objectlabel='Services'; }
if ((string) $type == '0') { $objectlabel='Products'; }
- $permtoread = $user->rights->produit->lire;
- $permtodelete = $user->rights->produit->supprimer;
+ $permissiontoread = $user->rights->produit->lire;
+ $permissiontodelete = $user->rights->produit->supprimer;
$uploaddir = $conf->product->dir_output;
include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php';
*/
diff --git a/htdocs/modulebuilder/template/lib/mymodule_myobject.lib.php b/htdocs/modulebuilder/template/lib/mymodule_myobject.lib.php
index 8579fa864d3..d27781c92a9 100644
--- a/htdocs/modulebuilder/template/lib/mymodule_myobject.lib.php
+++ b/htdocs/modulebuilder/template/lib/mymodule_myobject.lib.php
@@ -48,7 +48,7 @@ function myobjectPrepareHead($object)
if (!empty($object->note_public)) $nbNote++;
$head[$h][0] = dol_buildpath('/mymodule/myobject_note.php', 1).'?id='.$object->id;
$head[$h][1] = $langs->trans('Notes');
- if ($nbNote > 0) $head[$h][1].= ' '.$nbNote.' ';
+ if ($nbNote > 0) $head[$h][1].= ''.$nbNote.' ';
$head[$h][2] = 'note';
$h++;
}
@@ -60,7 +60,7 @@ function myobjectPrepareHead($object)
$nbLinks=Link::count($db, $object->element, $object->id);
$head[$h][0] = dol_buildpath("/mymodule/myobject_document.php", 1).'?id='.$object->id;
$head[$h][1] = $langs->trans('Documents');
- if (($nbFiles+$nbLinks) > 0) $head[$h][1].= ' '.($nbFiles+$nbLinks).' ';
+ if (($nbFiles+$nbLinks) > 0) $head[$h][1].= ''.($nbFiles+$nbLinks).' ';
$head[$h][2] = 'document';
$h++;
diff --git a/htdocs/modulebuilder/template/mymoduleindex.php b/htdocs/modulebuilder/template/mymoduleindex.php
index d97af3cc99e..af7272d5954 100644
--- a/htdocs/modulebuilder/template/mymoduleindex.php
+++ b/htdocs/modulebuilder/template/mymoduleindex.php
@@ -106,7 +106,7 @@ if (! empty($conf->mymodule->enabled) && $user->rights->mymodule->read)
print '';
print '';
- print ''.$langs->trans("DraftOrders").($num?' '.$num.' ':'').' ';
+ print ''.$langs->trans("DraftOrders").($num?''.$num.' ':'').' ';
$var = true;
if ($num > 0)
diff --git a/htdocs/modulebuilder/template/myobject_agenda.php b/htdocs/modulebuilder/template/myobject_agenda.php
index c452d908538..f75e7d352f1 100644
--- a/htdocs/modulebuilder/template/myobject_agenda.php
+++ b/htdocs/modulebuilder/template/myobject_agenda.php
@@ -93,6 +93,8 @@ if ($id > 0 || ! empty($ref)) $upload_dir = $conf->mymodule->multidir_output[$ob
//if ($user->socid > 0) $socid = $user->socid;
//$result = restrictedArea($user, 'mymodule', $object->id);
+$permissiontoadd = $user->rights->mymodule->myobject->write; // Used by the include of actions_addupdatedelete.inc.php
+
/*
* Actions
@@ -156,7 +158,7 @@ if ($object->id > 0)
{
$langs->load("projects");
$morehtmlref.=' '.$langs->trans('Project') . ' ';
- if ($user->rights->mymodule->creer)
+ if ($permissiontoadd)
{
if ($action != 'classify')
//$morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : ';
diff --git a/htdocs/modulebuilder/template/myobject_card.php b/htdocs/modulebuilder/template/myobject_card.php
index ec70df73583..5179dbcf37c 100644
--- a/htdocs/modulebuilder/template/myobject_card.php
+++ b/htdocs/modulebuilder/template/myobject_card.php
@@ -102,14 +102,14 @@ include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be inclu
// Security check - Protection if external user
//if ($user->socid > 0) access_forbidden();
//if ($user->socid > 0) $socid = $user->socid;
-//$isdraft = (($object->statut == MyObject::STATUS_DRAFT) ? 1 : 0);
+//$isdraft = (($object->statut == $object::STATUS_DRAFT) ? 1 : 0);
//$result = restrictedArea($user, 'mymodule', $object->id, '', '', 'fk_soc', 'rowid', $isdraft);
-$permissionnote = $user->rights->mymodule->write; // Used by the include of actions_setnotes.inc.php
-$permissiondellink = $user->rights->mymodule->write; // Used by the include of actions_dellink.inc.php
-$permissionedit = $user->rights->mymodule->write; // Used by the include of actions_lineupdown.inc.php
-$permissiontoadd = $user->rights->mymodule->write; // Used by the include of actions_addupdatedelete.inc.php
-$permissiontodelete = $user->rights->mymodule->delete || ($permissiontoadd && $object->status == 0);
+$permissionnote = $user->rights->mymodule->myobject->write; // Used by the include of actions_setnotes.inc.php
+$permissiondellink = $user->rights->mymodule->myobject->write; // Used by the include of actions_dellink.inc.php
+$permissionedit = $user->rights->mymodule->myobject->write; // Used by the include of actions_lineupdown.inc.php
+$permissiontoadd = $user->rights->mymodule->myobject->write; // Used by the include of actions_addupdatedelete.inc.php
+$permissiontodelete = $user->rights->mymodule->myobject->delete || ($permissiontoadd && isset($object->status) && $object->status == $object::STATUS_DRAFT);
@@ -319,8 +319,8 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
$morehtmlref='';
/*
// Ref bis
- $morehtmlref.=$form->editfieldkey("RefBis", 'ref_client', $object->ref_client, $object, $user->rights->mymodule->creer, 'string', '', 0, 1);
- $morehtmlref.=$form->editfieldval("RefBis", 'ref_client', $object->ref_client, $object, $user->rights->mymodule->creer, 'string', '', null, null, '', 1);
+ $morehtmlref.=$form->editfieldkey("RefBis", 'ref_client', $object->ref_client, $object, $user->rights->mymodule->myobject->creer, 'string', '', 0, 1);
+ $morehtmlref.=$form->editfieldval("RefBis", 'ref_client', $object->ref_client, $object, $user->rights->mymodule->myobject->creer, 'string', '', null, null, '', 1);
// Thirdparty
$morehtmlref.='
'.$langs->trans('ThirdParty') . ' : ' . (is_object($object->thirdparty) ? $object->thirdparty->getNomUrl(1) : '');
// Project
@@ -328,7 +328,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
{
$langs->load("projects");
$morehtmlref.='
'.$langs->trans('Project') . ' ';
- if ($user->rights->mymodule->write)
+ if ($permissiontoadd)
{
if ($action != 'classify')
$morehtmlref.='
' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : ';
@@ -404,7 +404,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
}
print '
';
- if (! empty($object->lines) && $object->status == 0 && $permissiontoadd && $action != 'selectlines' && $action != 'editline')
+ if (! empty($object->lines) || ($object->status == $object::STATUS_DRAFT && $permissiontoadd && $action != 'selectlines' && $action != 'editline'))
{
print '
';
}
@@ -427,7 +427,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
}
}
- if (! empty($object->lines) && $object->status == 0 && $permissiontoadd && $action != 'selectlines' && $action != 'editline')
+ if (! empty($object->lines) || ($object->status == $object::STATUS_DRAFT && $permissiontoadd && $action != 'selectlines' && $action != 'editline'))
{
print '
';
}
@@ -451,15 +451,15 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
print '
id . '&action=presend&mode=init#formmailbeforetitle">' . $langs->trans('SendMail') . ' '."\n";
// Back to draft
- if (! empty($user->rights->mymodule->write) && $object->status == BOM::STATUS_VALIDATED)
+ if (! empty($user->rights->mymodule->myobject->write) && $object->status == BOM::STATUS_VALIDATED)
{
print '
' . $langs->trans("SetToDraft") . ' ';
}
// Modify
- if (! empty($user->rights->mymodule->write))
+ if ($permissiontoadd)
{
- print '
id.'&action=edit">'.$langs->trans("Modify").' '."\n";
+ print '
id.'&action=edit">'.$langs->trans("Modify").' '."\n";
}
else
{
@@ -467,13 +467,13 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
}
// Clone
- if (! empty($user->rights->mymodule->write))
+ if ($permissiontoadd)
{
- print '
' . $langs->trans("ToClone") . ' '."\n";
+ print '
' . $langs->trans("ToClone") . ' '."\n";
}
/*
- if ($user->rights->mymodule->write)
+ if ($permissiontoadd)
{
if ($object->status == 1)
{
@@ -487,7 +487,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
*/
// Delete (need delete permission, or if draft, just need create/modify permission)
- if (! empty($user->rights->mymodule->delete) || (! empty($object->fields['status']) && $object->status == $object::STATUS_DRAFT && ! empty($user->rights->mymodule->write)))
+ if ($permissiontodelete)
{
print '
id.'&action=delete">'.$langs->trans('Delete').' '."\n";
}
@@ -515,8 +515,8 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
$relativepath = $objref . '/' . $objref . '.pdf';
$filedir = $conf->mymodule->dir_output . '/' . $objref;
$urlsource = $_SERVER["PHP_SELF"] . "?id=" . $object->id;
- $genallowed = $user->rights->mymodule->read; // If you can read, you can build the PDF to read content
- $delallowed = $user->rights->mymodule->create; // If you can create/edit, you can remove a file on card
+ $genallowed = $user->rights->mymodule->myobject->read; // If you can read, you can build the PDF to read content
+ $delallowed = $user->rights->mymodule->myobject->create; // If you can create/edit, you can remove a file on card
print $formfile->showdocuments('mymodule', $objref, $filedir, $urlsource, $genallowed, $delallowed, $object->modelpdf, 1, 0, 0, 28, 0, '', '', '', $soc->default_lang);
*/
diff --git a/htdocs/modulebuilder/template/myobject_document.php b/htdocs/modulebuilder/template/myobject_document.php
index f4b918692ca..9d0954d277e 100644
--- a/htdocs/modulebuilder/template/myobject_document.php
+++ b/htdocs/modulebuilder/template/myobject_document.php
@@ -84,6 +84,8 @@ if ($id > 0 || ! empty($ref)) $upload_dir = $conf->mymodule->multidir_output[$ob
//if ($user->socid > 0) $socid = $user->socid;
//$result = restrictedArea($user, 'mymodule', $object->id);
+$permissiontoadd = $user->rights->mymodule->myobject->write; // Used by the include of actions_addupdatedelete.inc.php
+
/*
@@ -146,9 +148,9 @@ if ($object->id)
dol_fiche_end();
$modulepart = 'mymodule';
- //$permission = $user->rights->mymodule->create;
+ //$permission = $user->rights->mymodule->myobject->write;
$permission = 1;
- //$permtoedit = $user->rights->mymodule->create;
+ //$permtoedit = $user->rights->mymodule->myobject->write;
$permtoedit = 1;
$param = '&id=' . $object->id;
diff --git a/htdocs/modulebuilder/template/myobject_list.php b/htdocs/modulebuilder/template/myobject_list.php
index 08fbcbaa98e..0224b7f12d2 100644
--- a/htdocs/modulebuilder/template/myobject_list.php
+++ b/htdocs/modulebuilder/template/myobject_list.php
@@ -153,9 +153,9 @@ if (is_array($extrafields->attributes[$object->table_element]['label']) && count
$object->fields = dol_sort_array($object->fields, 'position');
$arrayfields = dol_sort_array($arrayfields, 'position');
-$permtoread = $user->rights->mymodule->myobject->read;
-$permtowrite = $user->rights->mymodule->myobject->write;
-$permtodelete = $user->rights->mymodule->myobject->delete;
+$permissiontoread = $user->rights->mymodule->myobject->read;
+$permissiontoadd = $user->rights->mymodule->myobject->write;
+$permissiontodelete = $user->rights->mymodule->myobject->delete;
/*
@@ -347,7 +347,7 @@ $arrayofmassactions = array(
//'builddoc'=>$langs->trans("PDFMerge"),
//'presend'=>$langs->trans("SendByMail"),
);
-if ($permtodelete) $arrayofmassactions['predelete']='
'.$langs->trans("Delete");
+if ($permissiontodelete) $arrayofmassactions['predelete']='
'.$langs->trans("Delete");
if (GETPOST('nomassaction', 'int') || in_array($massaction, array('presend','predelete'))) $arrayofmassactions=array();
$massactionbutton=$form->selectMassAction('', $arrayofmassactions);
@@ -361,7 +361,7 @@ print '
';
print '
';
print '
';
-$newcardbutton = dolGetButtonTitle($langs->trans('New'), '', 'fa fa-plus-circle', dol_buildpath('/mymodule/myobject_card.php', 1).'?action=create&backtopage='.urlencode($_SERVER['PHP_SELF']), '', $permtowrite);
+$newcardbutton = dolGetButtonTitle($langs->trans('New'), '', 'fa fa-plus-circle', dol_buildpath('/mymodule/myobject_card.php', 1).'?action=create&backtopage='.urlencode($_SERVER['PHP_SELF']), '', $permissiontoadd);
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'title_companies', 0, $newcardbutton, '', $limit);
@@ -594,8 +594,8 @@ if (in_array('builddoc', $arrayofmassactions) && ($nbtotalofrecords === '' || $n
$urlsource.=str_replace('&', '&', $param);
$filedir=$diroutputmassaction;
- $genallowed=$permtoread;
- $delallowed=$permtowrite;
+ $genallowed=$permissiontoread;
+ $delallowed=$permissiontoadd;
print $formfile->showdocuments('massfilesarea_mymodule', '', $filedir, $urlsource, 0, $delallowed, '', 1, 1, 0, 48, 1, $param, $title, '', '', '', null, $hidegeneratedfilelistifempty);
}
diff --git a/htdocs/modulebuilder/template/myobject_note.php b/htdocs/modulebuilder/template/myobject_note.php
index 7cf5f418ff1..89a8ed5513b 100644
--- a/htdocs/modulebuilder/template/myobject_note.php
+++ b/htdocs/modulebuilder/template/myobject_note.php
@@ -67,8 +67,8 @@ $extrafields->fetch_name_optionals_label($object->table_element);
include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once // Must be include, not include_once. Include fetch and fetch_thirdparty but not fetch_optionals
if ($id > 0 || ! empty($ref)) $upload_dir = $conf->mymodule->multidir_output[$object->entity] . "/" . $object->id;
-$permissionnote=1;
-//$permissionnote=$user->rights->mymodule->creer; // Used by the include of actions_setnotes.inc.php
+$permissionnote=$user->rights->mymodule->myobject->write; // Used by the include of actions_setnotes.inc.php
+$permissiontoadd = $user->rights->mymodule->myobject->write; // Used by the include of actions_addupdatedelete.inc.php
@@ -113,7 +113,7 @@ if ($id > 0 || ! empty($ref))
{
$langs->load("projects");
$morehtmlref.='
'.$langs->trans('Project') . ' ';
- if ($user->rights->mymodule->creer)
+ if ($permissiontoadd)
{
if ($action != 'classify')
//$morehtmlref.='
' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : ';
diff --git a/htdocs/mrp/lib/mrp_mo.lib.php b/htdocs/mrp/lib/mrp_mo.lib.php
index fe29c774f44..2e47c7bf621 100644
--- a/htdocs/mrp/lib/mrp_mo.lib.php
+++ b/htdocs/mrp/lib/mrp_mo.lib.php
@@ -53,7 +53,7 @@ function moPrepareHead($object)
if (!empty($object->note_public)) $nbNote++;
$head[$h][0] = dol_buildpath('/mrp/mo_note.php', 1).'?id='.$object->id;
$head[$h][1] = $langs->trans('Notes');
- if ($nbNote > 0) $head[$h][1].= '
'.$nbNote.' ';
+ if ($nbNote > 0) $head[$h][1].= '
'.$nbNote.' ';
$head[$h][2] = 'note';
$h++;
}
@@ -65,7 +65,7 @@ function moPrepareHead($object)
$nbLinks=Link::count($db, $object->element, $object->id);
$head[$h][0] = dol_buildpath("/mrp/mo_document.php", 1).'?id='.$object->id;
$head[$h][1] = $langs->trans('Documents');
- if (($nbFiles+$nbLinks) > 0) $head[$h][1].= '
'.($nbFiles+$nbLinks).' ';
+ if (($nbFiles+$nbLinks) > 0) $head[$h][1].= '
'.($nbFiles+$nbLinks).' ';
$head[$h][2] = 'document';
$h++;
diff --git a/htdocs/mrp/mo_card.php b/htdocs/mrp/mo_card.php
index 07b6be426f3..43759bf0d70 100644
--- a/htdocs/mrp/mo_card.php
+++ b/htdocs/mrp/mo_card.php
@@ -90,14 +90,14 @@ include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be inclu
// Security check - Protection if external user
//if ($user->socid > 0) access_forbidden();
//if ($user->socid > 0) $socid = $user->socid;
-//$isdraft = (($object->statut == Mo::STATUS_DRAFT) ? 1 : 0);
+//$isdraft = (($object->statut == $object::STATUS_DRAFT) ? 1 : 0);
//$result = restrictedArea($user, 'mrp', $object->id, '', '', 'fk_soc', 'rowid', $isdraft);
$permissionnote=$user->rights->mrp->write; // Used by the include of actions_setnotes.inc.php
$permissiondellink=$user->rights->mrp->write; // Used by the include of actions_dellink.inc.php
$permissionedit=$user->rights->mrp->write; // Used by the include of actions_lineupdown.inc.php
$permissiontoadd=$user->rights->mrp->write; // Used by the include of actions_addupdatedelete.inc.php
-$permissiontodelete = $user->rights->mrp->delete || ($permissiontoadd && $object->status == 0);
+$permissiontodelete = $user->rights->mrp->delete || ($permissiontoadd && isset($object->status) && $object->status == $object::STATUS_DRAFT);
/*
@@ -132,6 +132,12 @@ if (empty($reshook))
// Actions when printing a doc from card
include DOL_DOCUMENT_ROOT.'/core/actions_printing.inc.php';
+ // Actions to send emails
+ $trigger_name='MO_SENTBYMAIL';
+ $autocopy='MAIN_MAIL_AUTOCOPY_MO_TO';
+ $trackid='mo'.$object->id;
+ include DOL_DOCUMENT_ROOT.'/core/actions_sendmails.inc.php';
+
// Action to move up and down lines of object
//include DOL_DOCUMENT_ROOT.'/core/actions_lineupdown.inc.php'; // Must be include, not include_once
@@ -143,12 +149,6 @@ if (empty($reshook))
{
$object->setProject(GETPOST('projectid', 'int'));
}
-
- // Actions to send emails
- $trigger_name='MO_SENTBYMAIL';
- $autocopy='MAIN_MAIL_AUTOCOPY_MO_TO';
- $trackid='mo'.$object->id;
- include DOL_DOCUMENT_ROOT.'/core/actions_sendmails.inc.php';
}
@@ -159,6 +159,7 @@ if (empty($reshook))
*/
$form=new Form($db);
+$formfile=new FormFile($db);
$formproject=new FormProjets($db);
llxHeader('', $langs->trans('Mo'), '');
@@ -299,6 +300,46 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
{
$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&lineid='.$lineid, $langs->trans('DeleteLine'), $langs->trans('ConfirmDeleteLine'), 'confirm_deleteline', '', 0, 1);
}
+
+ // Confirmation of validation
+ if ($action == 'validate')
+ {
+ // We check that object has a temporary ref
+ $ref = substr($object->ref, 1, 4);
+ if ($ref == 'PROV') {
+ $object->fetch_product();
+ $numref = $object->getNextNumRef($object->thirdparty);
+ } else {
+ $numref = $object->ref;
+ }
+
+ $text = $langs->trans('ConfirmValidateMo', $numref);
+ /*if (! empty($conf->notification->enabled))
+ {
+ require_once DOL_DOCUMENT_ROOT . '/core/class/notify.class.php';
+ $notify = new Notify($db);
+ $text .= '
';
+ $text .= $notify->confirmMessage('BOM_VALIDATE', $object->socid, $object);
+ }*/
+
+ $formquestion=array();
+ if (! empty($conf->bom->enabled))
+ {
+ $langs->load("mrp");
+ require_once DOL_DOCUMENT_ROOT . '/product/class/html.formproduct.class.php';
+ $formproduct = new FormProduct($db);
+ $forcecombo=0;
+ if ($conf->browser->name == 'ie') $forcecombo = 1; // There is a bug in IE10 that make combo inside popup crazy
+ $formquestion = array(
+ // 'text' => $langs->trans("ConfirmClone"),
+ // array('type' => 'checkbox', 'name' => 'clone_content', 'label' => $langs->trans("CloneMainAttributes"), 'value' => 1),
+ // array('type' => 'checkbox', 'name' => 'update_prices', 'label' => $langs->trans("PuttingPricesUpToDate"), 'value' => 1),
+ );
+ }
+
+ $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('Validate'), $text, 'confirm_validate', $formquestion, 0, 1, 220);
+ }
+
// Clone confirmation
if ($action == 'clone') {
// Create an array for form
@@ -332,7 +373,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
{
$langs->load("projects");
$morehtmlref.='
'.$langs->trans('Project') . ' ';
- if ($user->rights->mrp->write)
+ if ($permissiontoadd)
{
if ($action != 'classify')
$morehtmlref.='
' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : ';
@@ -366,7 +407,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
print '
';
print '
';
print '
';
- print '
'."\n";
+ print ''."\n";
// Common attributes
$keyforbreak='fk_warehouse';
@@ -407,14 +448,14 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
}
print '';
- if (! empty($object->lines) && $object->status == 0 && $permissiontoadd && $action != 'selectlines' && $action != 'editline')
+ if (! empty($object->lines) || ($object->status == $object::STATUS_DRAFT && $permissiontoadd && $action != 'selectlines' && $action != 'editline'))
{
print '
';
}
if (! empty($object->lines))
{
- $object->printObjectLines($action, $mysoc, null, GETPOST('lineid', 'int'), 1);
+ $object->printObjectLines($action, $mysoc, null, GETPOST('lineid', 'int'), 1, '/mrp/tpl');
}
// Form to add new line
@@ -423,14 +464,14 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
if ($action != 'editline')
{
// Add products/services form
- $object->formAddObjectLine(1, $mysoc, $soc);
+ $object->formAddObjectLine(1, $mysoc, $soc, '/mrp/tpl');
$parameters = array();
$reshook = $hookmanager->executeHooks('formAddObjectLine', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
}
}
- if (! empty($object->lines) && $object->status == 0 && $permissiontoadd && $action != 'selectlines' && $action != 'editline')
+ if (! empty($object->lines) || ($object->status == $object::STATUS_DRAFT && $permissiontoadd && $action != 'selectlines' && $action != 'editline'))
{
print '
';
}
@@ -451,10 +492,15 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
if (empty($reshook))
{
// Send
- print '
id . '&action=presend&mode=init#formmailbeforetitle">' . $langs->trans('SendMail') . ' '."\n";
+ //print '
id . '&action=presend&mode=init#formmailbeforetitle">' . $langs->trans('SendMail') . ' '."\n";
+
+ if ($user->rights->bom->write && $object->status == MO::STATUS_VALIDATED)
+ {
+ print '
' . $langs->trans("SetToDraft") . ' ';
+ }
// Modify
- if (! empty($user->rights->mrp->write))
+ if ($permissiontoadd)
{
print '
id.'&action=edit">'.$langs->trans("Modify").' '."\n";
}
@@ -477,13 +523,13 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
}
// Clone
- if (! empty($user->rights->mrp->write))
+ if ($permissiontoadd)
{
- print '
';
+ print '
' . $langs->trans("ToClone") . ' ';
}
// Delete (need delete permission, or if draft, just need create/modify permission)
- if (! empty($user->rights->mrp->delete) || (! empty($object->fields['status']) && $object->status == $object::STATUS_DRAFT && ! empty($user->rights->mrp->write)))
+ if ($permissiontodelete)
{
print '
id.'&action=delete">'.$langs->trans('Delete').' '."\n";
}
@@ -507,14 +553,13 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
print '
'; // ancre
// Documents
- /*$objref = dol_sanitizeFileName($object->ref);
- $relativepath = $comref . '/' . $comref . '.pdf';
+ $objref = dol_sanitizeFileName($object->ref);
+ $relativepath = $objref . '/' . $objref . '.pdf';
$filedir = $conf->mrp->dir_output . '/' . $objref;
$urlsource = $_SERVER["PHP_SELF"] . "?id=" . $object->id;
$genallowed = $user->rights->mrp->read; // If you can read, you can build the PDF to read content
$delallowed = $user->rights->mrp->create; // If you can create/edit, you can remove a file on card
- print $formfile->showdocuments('mrp', $objref, $filedir, $urlsource, $genallowed, $delallowed, $object->modelpdf, 1, 0, 0, 28, 0, '', '', '', $soc->default_lang);
- */
+ print $formfile->showdocuments('mrp:mo', $objref, $filedir, $urlsource, $genallowed, $delallowed, $object->modelpdf, 1, 0, 0, 28, 0, '', '', '', $mysoc->default_lang);
// Show links to link elements
$linktoelem = $form->showLinkToObjectBlock($object, null, array('mo'));
diff --git a/htdocs/mrp/mo_list.php b/htdocs/mrp/mo_list.php
index b91affe403f..7612700e4e5 100644
--- a/htdocs/mrp/mo_list.php
+++ b/htdocs/mrp/mo_list.php
@@ -177,8 +177,8 @@ if (empty($reshook))
// Mass actions
$objectclass='Mo';
$objectlabel='Mo';
- $permtoread = $user->rights->mrp->read;
- $permtodelete = $user->rights->mrp->delete;
+ $permissiontoread = $user->rights->mrp->read;
+ $permissiontodelete = $user->rights->mrp->delete;
$uploaddir = $conf->mrp->dir_output;
include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php';
}
diff --git a/htdocs/opensurvey/list.php b/htdocs/opensurvey/list.php
index 30bdae7787c..c99525f5740 100644
--- a/htdocs/opensurvey/list.php
+++ b/htdocs/opensurvey/list.php
@@ -133,8 +133,8 @@ if (empty($reshook))
// Mass actions
$objectclass='Opensurveysondage';
$objectlabel='Opensurveysondage';
- $permtoread = $user->rights->opensurvey->read;
- $permtodelete = $user->rights->opensurvey->write;
+ $permissiontoread = $user->rights->opensurvey->read;
+ $permissiontodelete = $user->rights->opensurvey->write;
$uploaddir = $conf->opensurvey->dir_output;
include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php';
}
diff --git a/htdocs/product/inventory/list.php b/htdocs/product/inventory/list.php
index 9a20f00341b..de1fa138f81 100644
--- a/htdocs/product/inventory/list.php
+++ b/htdocs/product/inventory/list.php
@@ -153,8 +153,8 @@ if (empty($reshook))
// Mass actions
$objectclass='Inventory';
$objectlabel='Inventory';
- $permtoread = $user->rights->stock->lire;
- $permtodelete = $user->rights->stock->supprimer;
+ $permissiontoread = $user->rights->stock->lire;
+ $permissiontodelete = $user->rights->stock->supprimer;
$uploaddir = $conf->stock->dir_output;
include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php';
}
diff --git a/htdocs/product/list.php b/htdocs/product/list.php
index 2f13c4921a9..d9369fcb148 100644
--- a/htdocs/product/list.php
+++ b/htdocs/product/list.php
@@ -253,8 +253,8 @@ if (empty($reshook))
if ((string) $search_type == '1') { $objectlabel='Services'; }
if ((string) $search_type == '0') { $objectlabel='Products'; }
- $permtoread = $user->rights->produit->lire;
- $permtodelete = $user->rights->produit->supprimer;
+ $permissiontoread = $user->rights->produit->lire;
+ $permissiontodelete = $user->rights->produit->supprimer;
$uploaddir = $conf->product->dir_output;
include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php';
}
diff --git a/htdocs/product/stock/list.php b/htdocs/product/stock/list.php
index b38888be9bb..a87f1a28621 100644
--- a/htdocs/product/stock/list.php
+++ b/htdocs/product/stock/list.php
@@ -144,8 +144,8 @@ if (empty($reshook))
// Mass actions
$objectclass='Entrepot';
$objectlabel='Warehouse';
- $permtoread = $user->rights->stock->lire;
- $permtodelete = $user->rights->stock->supprimer;
+ $permissiontoread = $user->rights->stock->lire;
+ $permissiontodelete = $user->rights->stock->supprimer;
$uploaddir = $conf->stock->dir_output;
include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php';
}
diff --git a/htdocs/product/stock/movement_card.php b/htdocs/product/stock/movement_card.php
index 5f4e1b97aa6..ecffe32483e 100644
--- a/htdocs/product/stock/movement_card.php
+++ b/htdocs/product/stock/movement_card.php
@@ -421,8 +421,8 @@ if (empty($reshook) && $action != 'remove_file')
{
$objectclass='MouvementStock';
$objectlabel='Movements';
- $permtoread = $user->rights->stock->lire;
- $permtodelete = $user->rights->stock->supprimer;
+ $permissiontoread = $user->rights->stock->lire;
+ $permissiontodelete = $user->rights->stock->supprimer;
$uploaddir = $conf->stock->dir_output . "/movement/";
include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php';
}
diff --git a/htdocs/product/stock/productlot_list.php b/htdocs/product/stock/productlot_list.php
index 3be66f6acfe..8dc8f34b7e0 100644
--- a/htdocs/product/stock/productlot_list.php
+++ b/htdocs/product/stock/productlot_list.php
@@ -158,8 +158,8 @@ if (empty($reshook))
{
$objectclass='ProductLot';
$objectlabel='LotSerial';
- $permtoread = $user->rights->stock->read;
- $permtodelete = $user->rights->stock->delete;
+ $permissiontoread = $user->rights->stock->read;
+ $permissiontodelete = $user->rights->stock->delete;
$uploaddir = $conf->stock->dir_output;
include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php';
}
@@ -217,7 +217,7 @@ $sql.= " p.label as product_label,";
$sql.= " p.tobatch";
// Add fields for extrafields
if (! empty($extrafields->attributes[$object->table_element]['label'])) {
- foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) $sql.=($extrafields->attributes[$object->table_element]['type'][$key] != 'separate' ? "ef.".$key.' as options_'.$key.', ' : '');
+ foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) $sql.=($extrafields->attributes[$object->table_element]['type'][$key] != 'separate' ? ", ef.".$key.' as options_'.$key : '');
}
// Add fields from hooks
$parameters=array();
diff --git a/htdocs/projet/list.php b/htdocs/projet/list.php
index 6cbe9d68127..b4e17377add 100644
--- a/htdocs/projet/list.php
+++ b/htdocs/projet/list.php
@@ -202,8 +202,8 @@ if (empty($reshook))
// Mass actions
$objectclass='Project';
$objectlabel='Project';
- $permtoread = $user->rights->projet->lire;
- $permtodelete = $user->rights->projet->supprimer;
+ $permissiontoread = $user->rights->projet->lire;
+ $permissiontodelete = $user->rights->projet->supprimer;
$uploaddir = $conf->projet->dir_output;
include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php';
diff --git a/htdocs/projet/tasks.php b/htdocs/projet/tasks.php
index 0bffd50ce62..f16a9070325 100644
--- a/htdocs/projet/tasks.php
+++ b/htdocs/projet/tasks.php
@@ -163,8 +163,8 @@ if (empty($reshook))
// Mass actions
$objectclass='Task';
$objectlabel='Tasks';
- $permtoread = $user->rights->projet->lire;
- $permtodelete = $user->rights->projet->supprimer;
+ $permissiontoread = $user->rights->projet->lire;
+ $permissiontodelete = $user->rights->projet->supprimer;
$uploaddir = $conf->projet->dir_output.'/tasks';
include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php';
}
diff --git a/htdocs/projet/tasks/list.php b/htdocs/projet/tasks/list.php
index 8718806004b..326782f5a55 100644
--- a/htdocs/projet/tasks/list.php
+++ b/htdocs/projet/tasks/list.php
@@ -184,8 +184,8 @@ if (empty($reshook))
// Mass actions
$objectclass='Task';
$objectlabel='Tasks';
- $permtoread = $user->rights->projet->lire;
- $permtodelete = $user->rights->projet->supprimer;
+ $permissiontoread = $user->rights->projet->lire;
+ $permissiontodelete = $user->rights->projet->supprimer;
$uploaddir = $conf->projet->dir_output.'/tasks';
include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php';
}
diff --git a/htdocs/reception/class/reception.class.php b/htdocs/reception/class/reception.class.php
index 48a35412987..8dd58798c8f 100644
--- a/htdocs/reception/class/reception.class.php
+++ b/htdocs/reception/class/reception.class.php
@@ -120,6 +120,13 @@ class Reception extends CommonObject
$this->statuts[0] = 'StatusReceptionDraft';
$this->statuts[1] = 'StatusReceptionValidated';
$this->statuts[2] = 'StatusReceptionProcessed';
+
+ // List of short language codes for status
+ $this->statutshorts = array();
+ $this->statutshorts[-1] = 'StatusReceptionCanceledShort';
+ $this->statutshorts[0] = 'StatusReceptionDraftShort';
+ $this->statutshorts[1] = 'StatusReceptionValidatedShort';
+ $this->statutshorts[2] = 'StatusReceptionProcessedShort';
}
/**
@@ -1152,6 +1159,18 @@ class Reception extends CommonObject
*/
public function LibStatut($status, $mode)
{
+ // phpcs:enable
+ global $langs;
+
+ $labelStatus = $langs->trans($this->statuts[$status]);
+ $labelStatusShort = $langs->trans($this->statutshorts[$status]);
+
+ $statusType = 'status'.$status;
+ if ($status == self::STATUS_VALIDATED) $statusType = 'status4';
+ if ($status == self::STATUS_CLOSED) $statusType = 'status6';
+
+ return dolGetStatus($labelStatus, $labelStatusShort, '', $statusType, $mode);
+
// phpcs:enable
global $langs;
diff --git a/htdocs/societe/list.php b/htdocs/societe/list.php
index 8f0d1895c1b..260c165064e 100644
--- a/htdocs/societe/list.php
+++ b/htdocs/societe/list.php
@@ -304,8 +304,8 @@ if (empty($reshook))
// Mass actions
$objectclass='Societe';
$objectlabel='ThirdParty';
- $permtoread = $user->rights->societe->lire;
- $permtodelete = $user->rights->societe->supprimer;
+ $permissiontoread = $user->rights->societe->lire;
+ $permissiontodelete = $user->rights->societe->supprimer;
$uploaddir = $conf->societe->dir_output;
include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php';
diff --git a/htdocs/societe/website.php b/htdocs/societe/website.php
index 5e199722961..81698820eb8 100644
--- a/htdocs/societe/website.php
+++ b/htdocs/societe/website.php
@@ -156,8 +156,8 @@ if (empty($reshook))
// Mass actions
$objectclass='WebsiteAccount';
$objectlabel='WebsiteAccount';
- $permtoread = $user->rights->societe->lire;
- $permtodelete = $user->rights->societe->supprimer;
+ $permissiontoread = $user->rights->societe->lire;
+ $permissiontodelete = $user->rights->societe->supprimer;
$uploaddir = $conf->societe->dir_output;
include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php';
}
diff --git a/htdocs/supplier_proposal/list.php b/htdocs/supplier_proposal/list.php
index c48f3756611..e8cad1541ed 100644
--- a/htdocs/supplier_proposal/list.php
+++ b/htdocs/supplier_proposal/list.php
@@ -214,8 +214,8 @@ if (empty($reshook))
{
$objectclass='SupplierProposal';
$objectlabel='SupplierProposals';
- $permtoread = $user->rights->supplier_proposal->lire;
- $permtodelete = $user->rights->supplier_proposal->supprimer;
+ $permissiontoread = $user->rights->supplier_proposal->lire;
+ $permissiontodelete = $user->rights->supplier_proposal->supprimer;
$uploaddir = $conf->supplier_proposal->dir_output;
include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php';
}
diff --git a/htdocs/theme/eldy/badges.inc.php b/htdocs/theme/eldy/badges.inc.php
index 27fc142d991..75dcde0c2e4 100644
--- a/htdocs/theme/eldy/badges.inc.php
+++ b/htdocs/theme/eldy/badges.inc.php
@@ -44,7 +44,7 @@ a.badge:focus, a.badge:hover {
text-decoration: none;
}
-.liste_titre .badge {
+.liste_titre .badge:not(.nochangebackground) {
background-color: ;
color: #fff;
}
diff --git a/htdocs/theme/eldy/global.inc.php b/htdocs/theme/eldy/global.inc.php
index 6db99927fb1..37fbcbad115 100644
--- a/htdocs/theme/eldy/global.inc.php
+++ b/htdocs/theme/eldy/global.inc.php
@@ -681,6 +681,12 @@ select.flat.selectlimit {
-webkit-line-clamp: 2;
overflow: hidden;
}
+.twolinesmax {
+ display: -webkit-box;
+ -webkit-box-orient: vertical;
+ -webkit-line-clamp: 2;
+ overflow: hidden;
+}
.tablelistofcalendars {
margin-top: 25px !important;
@@ -2068,7 +2074,7 @@ div.login_block_other { padding-top: 0; text-align: right; margin-right: 8px; }
float: right;
vertical-align: top;
padding: 0px 3px 0px 4px !important;
- line-height: px;
+ line-height: px;
height: px;
}
.atoplogin, .atoplogin:hover {
diff --git a/htdocs/theme/md/badges.inc.php b/htdocs/theme/md/badges.inc.php
index 11536240ee0..9f53a631ee4 100644
--- a/htdocs/theme/md/badges.inc.php
+++ b/htdocs/theme/md/badges.inc.php
@@ -44,7 +44,7 @@ a.badge:focus, a.badge:hover {
text-decoration: none;
}
-.liste_titre .badge {
+.liste_titre .badge:not(.nochangebackground) {
background-color: ;
color: #fff;
}
diff --git a/htdocs/ticket/class/ticket.class.php b/htdocs/ticket/class/ticket.class.php
index 494d6b351b8..589067934d5 100644
--- a/htdocs/ticket/class/ticket.class.php
+++ b/htdocs/ticket/class/ticket.class.php
@@ -181,13 +181,13 @@ class Ticket extends CommonObject
'entity' => array('type'=>'integer', 'label'=>'Entity', 'visible'=>0, 'enabled'=>1, 'position'=>5, 'notnull'=>1, 'index'=>1),
'ref' => array('type'=>'varchar(128)', 'label'=>'Ref', 'visible'=>1, 'enabled'=>1, 'position'=>10, 'notnull'=>1, 'index'=>1, 'searchall'=>1, 'comment'=>"Reference of object", 'css'=>''),
'track_id' => array('type'=>'varchar(255)', 'label'=>'TicketTrackId', 'visible'=>-2, 'enabled'=>1, 'position'=>11, 'notnull'=>-1, 'searchall'=>1, 'help'=>"Help text"),
- 'fk_user_create' => array('type'=>'integer:User:user/class/user.class.php', 'label'=>'Author', 'visible'=>1, 'enabled'=>1, 'position'=>15, 'notnull'=>1, 'css'=>'nowraponall'),
+ 'fk_user_create' => array('type'=>'integer:User:user/class/user.class.php', 'label'=>'Author', 'visible'=>1, 'enabled'=>1, 'position'=>15, 'notnull'=>1, 'css'=>'tdoverflowmax150 maxwidth150onsmartphone'),
'origin_email' => array('type'=>'mail', 'label'=>'OriginEmail', 'visible'=>-2, 'enabled'=>1, 'position'=>16, 'notnull'=>1, 'index'=>1, 'searchall'=>1, 'comment'=>"Reference of object"),
'subject' => array('type'=>'varchar(255)', 'label'=>'Subject', 'visible'=>1, 'enabled'=>1, 'position'=>18, 'notnull'=>-1, 'searchall'=>1, 'help'=>"", 'css'=>'maxwidth75'),
'type_code' => array('type'=>'varchar(32)', 'label'=>'Type', 'visible'=>1, 'enabled'=>1, 'position'=>20, 'notnull'=>-1, 'searchall'=>1, 'help'=>"", 'css'=>'maxwidth100'),
'category_code' => array('type'=>'varchar(32)', 'label'=>'TicketGroup', 'visible'=>-1, 'enabled'=>1, 'position'=>21, 'notnull'=>-1, 'help'=>"", 'css'=>'maxwidth100'),
'severity_code' => array('type'=>'varchar(32)', 'label'=>'Severity', 'visible'=>1, 'enabled'=>1, 'position'=>22, 'notnull'=>-1, 'help'=>"", 'css'=>'maxwidth100'),
- 'fk_soc' => array('type'=>'integer:Societe:societe/class/societe.class.php', 'label'=>'ThirdParty', 'visible'=>1, 'enabled'=>1, 'position'=>50, 'notnull'=>-1, 'index'=>1, 'searchall'=>1, 'help'=>"LinkToThirparty"),
+ 'fk_soc' => array('type'=>'integer:Societe:societe/class/societe.class.php', 'label'=>'ThirdParty', 'visible'=>1, 'enabled'=>1, 'position'=>50, 'notnull'=>-1, 'index'=>1, 'searchall'=>1, 'help'=>"LinkToThirparty", 'css'=>'tdoverflowmax150 maxwidth150onsmartphone'),
'notify_tiers_at_create' => array('type'=>'integer', 'label'=>'NotifyThirdparty', 'visible'=>-1, 'enabled'=>0, 'position'=>51, 'notnull'=>1, 'index'=>1),
'fk_project' => array('type'=>'integer:Project:projet/class/project.class.php', 'label'=>'Project', 'visible'=>-1, 'enabled'=>1, 'position'=>52, 'notnull'=>-1, 'index'=>1, 'help'=>"LinkToProject"),
'timing' => array('type'=>'varchar(20)', 'label'=>'Timing', 'visible'=>-1, 'enabled'=>1, 'position'=>42, 'notnull'=>-1, 'help'=>""),
diff --git a/htdocs/ticket/list.php b/htdocs/ticket/list.php
index 7c6f525a0c4..4ca9140145b 100644
--- a/htdocs/ticket/list.php
+++ b/htdocs/ticket/list.php
@@ -3,6 +3,7 @@
* Copyright (C) 2016 Christophe Battarel
* Copyright (C) 2018 Regis Houssin
* Copyright (C) 2019 Juanjo Menent
+ * Copyright (C) 2019 Laurent Destailleur
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -175,8 +176,8 @@ if (empty($reshook))
// Mass actions
$objectclass='Ticket';
$objectlabel='Ticket';
- $permtoread = $user->rights->ticket->read;
- $permtodelete = $user->rights->ticket->delete;
+ $permissiontoread = $user->rights->ticket->read;
+ $permissiontodelete = $user->rights->ticket->delete;
$uploaddir = $conf->ticket->dir_output;
include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php';
}
diff --git a/htdocs/user/bank.php b/htdocs/user/bank.php
index 284c88a867b..b24b6db9381 100644
--- a/htdocs/user/bank.php
+++ b/htdocs/user/bank.php
@@ -308,7 +308,7 @@ if ($action != 'edit' && $action != 'create') // If not bank account yet, $acco
print '';
print '';
- print ''.$langs->trans("LastSalaries", ($num<=$MAXLIST?"":$MAXLIST)).' '.$langs->trans("AllSalaries").' '.$num.' ';
+ print ' ';
print ' ';
@@ -362,7 +362,7 @@ if ($action != 'edit' && $action != 'create') // If not bank account yet, $acco
print '';
print '';
- print ''.$langs->trans("LastHolidays", ($num<=$MAXLIST?"":$MAXLIST)).' '.$langs->trans("AllHolidays").' '.$num.' ';
+ print ' ';
print ' ';
@@ -418,7 +418,7 @@ if ($action != 'edit' && $action != 'create') // If not bank account yet, $acco
print '';
print '';
- print ''.$langs->trans("LastExpenseReports", ($num<=$MAXLIST?"":$MAXLIST)).' '.$langs->trans("AllExpenseReports").' '.$num.' ';
+ print ' ';
print ' ';
diff --git a/htdocs/variants/list.php b/htdocs/variants/list.php
index da19bd88205..c4fd52f250c 100644
--- a/htdocs/variants/list.php
+++ b/htdocs/variants/list.php
@@ -110,7 +110,7 @@ $forcereloadpage=empty($conf->global->MAIN_FORCE_RELOAD_PAGE)?0:1;
});
-
+
trans('Ref') ?>
trans('Label') ?>
diff --git a/htdocs/website/lib/websiteaccount.lib.php b/htdocs/website/lib/websiteaccount.lib.php
index 3190c081a43..4c2048798a5 100644
--- a/htdocs/website/lib/websiteaccount.lib.php
+++ b/htdocs/website/lib/websiteaccount.lib.php
@@ -46,7 +46,7 @@ function websiteaccountPrepareHead($object)
if(!empty($object->fields['note_public'])) $nbNote++;
$head[$h][0] = dol_buildpath('/monmodule/websiteaccount_note.php', 1).'?id='.$object->id;
$head[$h][1] = $langs->trans('Notes');
- if ($nbNote > 0) $head[$h][1].= ' '.$nbNote.' ';
+ if ($nbNote > 0) $head[$h][1].= ''.$nbNote.' ';
$head[$h][2] = 'note';
$h++;
}*/
@@ -59,7 +59,7 @@ function websiteaccountPrepareHead($object)
$nbLinks=Link::count($db, $object->element, $object->id);
$head[$h][0] = dol_buildpath("/monmodule/websiteaccount_document.php", 1).'?id='.$object->id;
$head[$h][1] = $langs->trans('Documents');
- if (($nbFiles+$nbLinks) > 0) $head[$h][1].= ' '.($nbFiles+$nbLinks).' ';
+ if (($nbFiles+$nbLinks) > 0) $head[$h][1].= ''.($nbFiles+$nbLinks).' ';
$head[$h][2] = 'document';
$h++;
diff --git a/htdocs/zapier/hook_list.php b/htdocs/zapier/hook_list.php
index e622ce8bcff..2132cd5da25 100644
--- a/htdocs/zapier/hook_list.php
+++ b/htdocs/zapier/hook_list.php
@@ -191,8 +191,8 @@ if (empty($reshook)) {
// Mass actions
$objectclass='Hook';
$objectlabel='Hook';
- $permtoread = $user->rights->mymodule->read;
- $permtodelete = $user->rights->mymodule->delete;
+ $permissiontoread = $user->rights->mymodule->read;
+ $permissiontodelete = $user->rights->mymodule->delete;
$uploaddir = $conf->mymodule->dir_output;
include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php';
}
diff --git a/htdocs/zapier/lib/zapier_hook.lib.php b/htdocs/zapier/lib/zapier_hook.lib.php
index e1af0259062..98c10786c32 100644
--- a/htdocs/zapier/lib/zapier_hook.lib.php
+++ b/htdocs/zapier/lib/zapier_hook.lib.php
@@ -48,7 +48,7 @@ function myobjectPrepareHead($object)
if (!empty($object->note_public)) $nbNote++;
$head[$h][0] = dol_buildpath('/mymodule/myobject_note.php', 1).'?id='.$object->id;
$head[$h][1] = $langs->trans('Notes');
- if ($nbNote > 0) $head[$h][1].= ' '.$nbNote.' ';
+ if ($nbNote > 0) $head[$h][1].= ''.$nbNote.' ';
$head[$h][2] = 'note';
$h++;
}
@@ -60,7 +60,7 @@ function myobjectPrepareHead($object)
$nbLinks=Link::count($db, $object->element, $object->id);
$head[$h][0] = dol_buildpath("/mymodule/myobject_document.php", 1).'?id='.$object->id;
$head[$h][1] = $langs->trans('Documents');
- if (($nbFiles+$nbLinks) > 0) $head[$h][1].= ' '.($nbFiles+$nbLinks).' ';
+ if (($nbFiles+$nbLinks) > 0) $head[$h][1].= ''.($nbFiles+$nbLinks).' ';
$head[$h][2] = 'document';
$h++;
diff --git a/htdocs/zapier/zapierindex.php b/htdocs/zapier/zapierindex.php
index 9bec765c35e..f70f9e8c95d 100644
--- a/htdocs/zapier/zapierindex.php
+++ b/htdocs/zapier/zapierindex.php
@@ -106,7 +106,7 @@ if (! empty($conf->zapierfordolibarr->enabled) && $user->rights->zapierfordoliba
print '';
print '';
- print ''.$langs->trans("DraftOrders").($num?' '.$num.' ':'').' ';
+ print ''.$langs->trans("DraftOrders").($num?''.$num.' ':'').' ';
$var = true;
if ($num > 0)