diff --git a/htdocs/accountancy/admin/account.php b/htdocs/accountancy/admin/account.php
index ed3ee851709..9bb31534dca 100644
--- a/htdocs/accountancy/admin/account.php
+++ b/htdocs/accountancy/admin/account.php
@@ -90,8 +90,8 @@ $arrayfields = array(
'aa.pcg_type'=>array('label'=>"Pcgtype", 'checked'=>1, 'help'=>'PcgtypeDesc'),
'categories'=>array('label'=>"AccountingCategories", 'checked'=>-1, 'help'=>'AccountingCategoriesDesc'),
'aa.reconcilable'=>array('label'=>"Reconcilable", 'checked'=>1),
- 'aa.active'=>array('label'=>"Activated", 'checked'=>1),
- 'aa.import_key'=>array('label'=>"ImportId", 'checked'=>-1)
+ 'aa.import_key'=>array('label'=>"ImportId", 'checked'=>-1),
+ 'aa.active'=>array('label'=>"Activated", 'checked'=>1)
);
if (getDolGlobalInt('MAIN_FEATURES_LEVEL') < 2) {
@@ -448,7 +448,7 @@ if ($resql) {
print ' ';
$varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage;
- $selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN', '')); // This also change content of $arrayfields
+ $selectedfields = ($mode != 'kanban' ? $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN', '')) : ''); // This also change content of $arrayfields
$selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : '');
$moreforfilter = '';
@@ -581,8 +581,9 @@ if ($resql) {
print_liste_field_titre($arrayfields['aa.active']['label'], $_SERVER["PHP_SELF"], 'aa.active', '', $param, '', $sortfield, $sortorder);
$totalarray['nbfield']++;
}
+ // Action column
if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
- print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', 'align="center"', $sortfield, $sortorder, 'maxwidthsearch ');
+ print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ');
$totalarray['nbfield']++;
}
print "\n";
@@ -601,15 +602,25 @@ if ($resql) {
// Action column
if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
- print '
';
$i = 0;
diff --git a/htdocs/core/lib/invoice.lib.php b/htdocs/core/lib/invoice.lib.php
index 63c2359c279..b2935e867bf 100644
--- a/htdocs/core/lib/invoice.lib.php
+++ b/htdocs/core/lib/invoice.lib.php
@@ -615,7 +615,7 @@ function getCustomerInvoiceDraftTable($maxCount = 500, $socid = 0)
$result .= ''.price($tot_ttc).' ';
$result .= '';
} else {
- $result .= ''.$langs->trans("NoInvoice").' ';
+ $result .= ''.$langs->trans("NoInvoice").' ';
}
$result .= "";
$db->free($resql);
@@ -747,7 +747,7 @@ function getDraftSupplierTable($maxCount = 500, $socid = 0)
$result .= ''.price($tot_ttc).' ';
$result .= '';
} else {
- $result .= ''.$langs->trans("NoInvoice").' ';
+ $result .= ''.$langs->trans("NoInvoice").' ';
}
$result .= "";
$db->free($resql);
diff --git a/htdocs/core/lib/security.lib.php b/htdocs/core/lib/security.lib.php
index 583f61b88f5..de6013a41f9 100644
--- a/htdocs/core/lib/security.lib.php
+++ b/htdocs/core/lib/security.lib.php
@@ -144,6 +144,10 @@ function dolEncrypt($chain, $key = '', $ciphering = 'AES-256-CTR', $forceseed =
$newchain = $chain;
if (function_exists('openssl_encrypt') && empty($dolibarr_disable_dolcrypt_for_debug)) {
+ if (empty($key)) {
+ return $chain;
+ }
+
$ivlen = 16;
if (function_exists('openssl_cipher_iv_length')) {
$ivlen = openssl_cipher_iv_length($ciphering);
diff --git a/htdocs/core/modules/modTicket.class.php b/htdocs/core/modules/modTicket.class.php
index 097c46186f0..de56f544a30 100644
--- a/htdocs/core/modules/modTicket.class.php
+++ b/htdocs/core/modules/modTicket.class.php
@@ -148,15 +148,15 @@ class modTicket extends DolibarrModules
"TicketDictResolution"
),
'tabsql' => array(
- 'SELECT f.rowid as rowid, f.code, f.pos, f.label, f.active, f.use_default FROM '.MAIN_DB_PREFIX.'c_ticket_type as f',
- 'SELECT f.rowid as rowid, f.code, f.pos, f.label, f.active, f.use_default FROM '.MAIN_DB_PREFIX.'c_ticket_severity as f',
- 'SELECT f.rowid as rowid, f.code, f.pos, f.label, f.active, f.use_default, f.public, f.fk_parent FROM '.MAIN_DB_PREFIX.'c_ticket_category as f',
- 'SELECT f.rowid as rowid, f.code, f.pos, f.label, f.active, f.use_default FROM '.MAIN_DB_PREFIX.'c_ticket_resolution as f'
+ 'SELECT f.rowid as rowid, f.code, f.pos, f.label, f.active, f.use_default, f.entity FROM '.MAIN_DB_PREFIX.'c_ticket_type as f WHERE f.entity IN ('.getEntity('c_ticket_type').')',
+ 'SELECT f.rowid as rowid, f.code, f.pos, f.label, f.active, f.use_default, f.entity FROM '.MAIN_DB_PREFIX.'c_ticket_severity as f WHERE f.entity IN ('.getEntity('c_ticket_severity').')',
+ 'SELECT f.rowid as rowid, f.code, f.pos, f.label, f.active, f.use_default, f.public, f.fk_parent, f.entity FROM '.MAIN_DB_PREFIX.'c_ticket_category as f WHERE f.entity IN ('.getEntity('c_ticket_category').')',
+ 'SELECT f.rowid as rowid, f.code, f.pos, f.label, f.active, f.use_default, f.entity FROM '.MAIN_DB_PREFIX.'c_ticket_resolution as f WHERE f.entity IN ('.getEntity('c_ticket_resolution').')'
),
'tabsqlsort' => array("pos ASC", "pos ASC", "pos ASC", "pos ASC"),
'tabfield' => array("code,label,pos,use_default", "code,label,pos,use_default", "code,label,pos,use_default,public,fk_parent", "code,label,pos,use_default"),
'tabfieldvalue' => array("code,label,pos,use_default", "code,label,pos,use_default", "code,label,pos,use_default,public,fk_parent", "code,label,pos,use_default"),
- 'tabfieldinsert' => array("code,label,pos,use_default", "code,label,pos,use_default", "code,label,pos,use_default,public,fk_parent", "code,label,pos,use_default"),
+ 'tabfieldinsert' => array("code,label,pos,use_default,entity", "code,label,pos,use_default,entity", "code,label,pos,use_default,public,fk_parent,entity", "code,label,pos,use_default,entity"),
'tabrowid' => array("rowid", "rowid", "rowid", "rowid"),
'tabcond' => array(isModEnabled("ticket"), isModEnabled("ticket"), isModEnabled("ticket"), isModEnabled("ticket") && getDolGlobalString('TICKET_ENABLE_RESOLUTION')),
'tabhelp' => array(
diff --git a/htdocs/core/triggers/interface_50_modAgenda_ActionsAuto.class.php b/htdocs/core/triggers/interface_50_modAgenda_ActionsAuto.class.php
index 38f2ae5fbcb..abd120ce573 100644
--- a/htdocs/core/triggers/interface_50_modAgenda_ActionsAuto.class.php
+++ b/htdocs/core/triggers/interface_50_modAgenda_ActionsAuto.class.php
@@ -1365,6 +1365,9 @@ class InterfaceActionsAuto extends DolibarrTriggers
$tmp = explode('_', $action);
$object->actionmsg = $langs->transnoentities($tmp[count($tmp) - 1]."InDolibarr", (empty($object->newref) ? $object->ref : $object->newref));
}
+ if (isModEnabled('multicompany') && property_exists($object, 'entity') && $object->entity > 1) {
+ $object->actionmsg .= ' ('.$langs->trans("Entity").' '.$object->entity.')';
+ }
}
if (!isset($object->sendtoid) || !is_array($object->sendtoid)) {
diff --git a/htdocs/holiday/card.php b/htdocs/holiday/card.php
index 93e1ad0c4d4..eb2cbb36367 100644
--- a/htdocs/holiday/card.php
+++ b/htdocs/holiday/card.php
@@ -279,6 +279,7 @@ if (empty($reshook)) {
$object->date_debut = $date_debut;
$object->date_fin = $date_fin;
$object->halfday = $halfday;
+ $object->entity = $conf->entity;
$result = $object->create($user);
if ($result <= 0) {
diff --git a/htdocs/hrm/index.php b/htdocs/hrm/index.php
index a661758dfad..c4bc55bd067 100644
--- a/htdocs/hrm/index.php
+++ b/htdocs/hrm/index.php
@@ -260,7 +260,7 @@ if (isModEnabled('holiday') && $user->hasRight('holiday', 'read')) {
$i++;
}
} else {
- print ''.$langs->trans("None").' ';
+ print ''.$langs->trans("None").' ';
}
print '';
print '';
@@ -332,7 +332,7 @@ if (isModEnabled('expensereport') && $user->hasRight('expensereport', 'read')) {
$i++;
}
} else {
- print ''.$langs->trans("None").' ';
+ print ''.$langs->trans("None").' ';
}
print '';
print '';
diff --git a/htdocs/product/card.php b/htdocs/product/card.php
index 093814c3e08..dd8d06de73b 100644
--- a/htdocs/product/card.php
+++ b/htdocs/product/card.php
@@ -493,7 +493,7 @@ if (empty($reshook)) {
}
if (empty($ref)) {
if (empty($conf->global->PRODUCT_GENERATE_REF_AFTER_FORM)) {
- setEventMessages($langs->trans('ErrorFieldRequired', $langs->transnoentities('Ref')), null, 'errors');
+ setEventMessages($langs->trans('ErrorFieldRequired', $langs->transnoentities('ProductRef')), null, 'errors');
$action = "create";
$error++;
}
@@ -1369,7 +1369,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
if (!empty($modCodeProduct->code_auto)) {
$tmpcode = $modCodeProduct->getNextValue($object, $type);
}
- print ''.$langs->trans("Ref").' ';
+ print ''.$langs->trans("ProductRef").' ';
if ($refalreadyexists) {
print $langs->trans("RefAlreadyExists");
}
diff --git a/htdocs/product/list.php b/htdocs/product/list.php
index 0f99d58720e..b804f786c6a 100644
--- a/htdocs/product/list.php
+++ b/htdocs/product/list.php
@@ -220,7 +220,7 @@ $alias_product_perentity = empty($conf->global->MAIN_PRODUCT_PERENTITY_SHARED) ?
// Definition of array of fields for columns
$arrayfields = array(
'p.rowid'=>array('type'=>'integer', 'label'=>'TechnicalID', 'enabled'=>1, 'visible'=>-2, 'noteditable'=>1, 'notnull'=> 1, 'index'=>1, 'position'=>1, 'comment'=>'Id', 'css'=>'left'),
- 'p.ref'=>array('label'=>"Ref", 'checked'=>1, 'position'=>10),
+ 'p.ref'=>array('label'=>'ProductRef', 'checked'=>1, 'position'=>10),
//'pfp.ref_fourn'=>array('label'=>$langs->trans("RefSupplier"), 'checked'=>1, 'enabled'=>(isModEnabled('barcode'))),
'thumbnail'=>array('label'=>'Photo', 'checked'=>0, 'position'=>10),
'p.label'=>array('label'=>"Label", 'checked'=>1, 'position'=>10),
@@ -852,16 +852,15 @@ if ($type === "") {
if ($type === "") {
$params['forcenohideoftext'] = 1;
}
-if ($type === "") {
- $newcardbutton .= dolGetButtonTitle($langs->trans('NewProduct'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/product/card.php?action=create&type=0', '', $perm, $params);
- $type = Product::TYPE_SERVICE;
-}
- $label = 'NewProduct';
-if ($type == Product::TYPE_SERVICE) {
- $label = 'NewService';
-}
- $newcardbutton .= dolGetButtonTitle($langs->trans($label), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/product/card.php?action=create&type='.$type, '', $perm, $params);
+if ($type === "" || $type == Product::TYPE_PRODUCT) {
+ $label = 'NewProduct';
+ $newcardbutton .= dolGetButtonTitle($langs->trans($label), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/product/card.php?action=create&type=0', '', $perm, $params);
+}
+if ($type === "" || $type == Product::TYPE_SERVICE) {
+ $label = 'NewService';
+ $newcardbutton .= dolGetButtonTitle($langs->trans($label), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/product/card.php?action=create&type=1', '', $perm, $params);
+}
print '