';
if ($action != "infos_success") {
- $formticket->withfromsocid = isset($socid) ? $socid : $user->societe_id;
+ $formticket->withfromsocid = isset($socid) ? $socid : $user->socid;
$formticket->withtitletopic = 1;
$formticket->withcompany = 0;
$formticket->withusercreate = 1;
diff --git a/htdocs/reception/card.php b/htdocs/reception/card.php
index 832fd4fc70d..2e9dbe5f57b 100644
--- a/htdocs/reception/card.php
+++ b/htdocs/reception/card.php
@@ -72,7 +72,7 @@ $line_id = GETPOST('lineid', 'int')?GETPOST('lineid', 'int'):'';
// Security check
$socid='';
-if ($user->societe_id) $socid=$user->societe_id;
+if ($user->socid) $socid=$user->socid;
if ($origin == 'reception') $result=restrictedArea($user, $origin, $id);
else {
@@ -820,7 +820,7 @@ if ($action == 'create')
print "";
// Note Private
- if ($object->note_private && ! $user->societe_id)
+ if ($object->note_private && ! $user->socid)
{
print '
| '.$langs->trans("NotePrivate").' | ';
print '';
@@ -2019,7 +2019,7 @@ elseif ($id || $ref)
* Boutons actions
*/
- if (($user->societe_id == 0) && ($action!='presend'))
+ if (($user->socid == 0) && ($action!='presend'))
{
print '';
diff --git a/htdocs/reception/contact.php b/htdocs/reception/contact.php
index c49eec5c82d..da074c420b5 100644
--- a/htdocs/reception/contact.php
+++ b/htdocs/reception/contact.php
@@ -44,7 +44,7 @@ $ref=GETPOST('ref', 'alpha');
$action=GETPOST('action', 'alpha');
// Security check
-if ($user->societe_id) $socid=$user->societe_id;
+if ($user->socid) $socid=$user->socid;
$result = restrictedArea($user, 'reception', $id, '');
$object = new Reception($db);
diff --git a/htdocs/reception/index.php b/htdocs/reception/index.php
index 17b5cd03c06..5844365b56f 100644
--- a/htdocs/reception/index.php
+++ b/htdocs/reception/index.php
@@ -58,11 +58,12 @@ if (! empty($conf->global->MAIN_SEARCH_FORM_ON_HOME_AREAS)) // This is usele
{
print ' \n";
}
/*
@@ -93,6 +94,7 @@ if ($resql)
$num = $db->num_rows($resql);
if ($num)
{
+ print ' ';
print ' ';
print '';
print '| '.$langs->trans("ReceptionsToValidate").' | ';
@@ -116,7 +118,7 @@ if ($resql)
print '';
$i++;
}
- print " ";
+ print " ";
}
}
@@ -143,6 +145,7 @@ if ($resql)
$langs->load("orders");
$i = 0;
+ print ' ';
print ' ';
print '';
print '| '.$langs->trans("SuppliersOrdersToProcess").' | ';
@@ -172,7 +175,7 @@ if ($resql)
print '';
$i++;
}
- print " ";
+ print " ";
}
}
@@ -203,6 +206,7 @@ if ( $resql )
if ($num)
{
$i = 0;
+ print ' ';
print ' ';
print '';
print '| '.$langs->trans("SuppliersOrdersInProcess").' | ';
@@ -231,7 +235,7 @@ if ( $resql )
print '';
$i++;
}
- print " ";
+ print " ";
}
}
else dol_print_error($db);
@@ -263,6 +267,7 @@ if ($resql)
if ($num)
{
$i = 0;
+ print ' ';
print ' ';
print '';
print '| '.$langs->trans("LastReceptions", $num).' | ';
@@ -289,7 +294,7 @@ if ($resql)
print '';
$i++;
}
- print " ";
+ print " ";
}
$db->free($resql);
}
diff --git a/htdocs/reception/list.php b/htdocs/reception/list.php
index 1a201a4bfd0..a7d7c51b7b1 100644
--- a/htdocs/reception/list.php
+++ b/htdocs/reception/list.php
@@ -42,7 +42,7 @@ $toselect = GETPOST('toselect', 'array');
// Security check
$receptionid = GETPOST('id', 'int');
-if ($user->societe_id) $socid=$user->societe_id;
+if ($user->socid) $socid=$user->socid;
$result = restrictedArea($user, 'reception', $receptionid, '');
$diroutputmassaction=$conf->reception->dir_output . '/temp/massgeneration/'.$user->id;
diff --git a/htdocs/reception/note.php b/htdocs/reception/note.php
index cbc1185aaab..5a2e8745cb7 100644
--- a/htdocs/reception/note.php
+++ b/htdocs/reception/note.php
@@ -48,7 +48,7 @@ $action=GETPOST('action', 'alpha');
// Security check
$socid='';
-if ($user->societe_id) $socid=$user->societe_id;
+if ($user->socid) $socid=$user->socid;
$result=restrictedArea($user, $origin, $origin_id);
$object = new Reception($db);
diff --git a/htdocs/reception/stats/index.php b/htdocs/reception/stats/index.php
index 76315ccce03..06304a2afb8 100644
--- a/htdocs/reception/stats/index.php
+++ b/htdocs/reception/stats/index.php
@@ -35,10 +35,10 @@ $HEIGHT=DolGraph::getDefaultGraphSizeForStats('height');
$userid=GETPOST('userid', 'int');
$socid=GETPOST('socid', 'int');
// Security check
-if ($user->societe_id > 0)
+if ($user->socid > 0)
{
$action = '';
- $socid = $user->societe_id;
+ $socid = $user->socid;
}
$nowyear=strftime("%Y", dol_now());
@@ -74,7 +74,7 @@ $data = $stats->getNbByMonthWithPrevYear($endyear, $startyear);
// $data = array(array('Lib',val1,val2,val3),...)
-if (!$user->rights->societe->client->voir || $user->societe_id)
+if (!$user->rights->societe->client->voir || $user->socid)
{
$filenamenb = $dir.'/receptionsnbinyear-'.$user->id.'-'.$year.'.png';
}
@@ -114,7 +114,7 @@ $data = $stats->getAmountByMonthWithPrevYear($endyear,$startyear);
//var_dump($data);
// $data = array(array('Lib',val1,val2,val3),...)
-if (!$user->rights->societe->client->voir || $user->societe_id)
+if (!$user->rights->societe->client->voir || $user->socid)
{
$filenameamount = $dir.'/receptionsamountinyear-'.$user->id.'-'.$year.'.png';
}
@@ -152,7 +152,7 @@ if (! $mesg)
/*
$data = $stats->getAverageByMonthWithPrevYear($endyear, $startyear);
-if (!$user->rights->societe->client->voir || $user->societe_id)
+if (!$user->rights->societe->client->voir || $user->socid)
{
$filename_avg = $dir.'/receptionsaverage-'.$user->id.'-'.$year.'.png';
}
diff --git a/htdocs/resource/agenda.php b/htdocs/resource/agenda.php
index 303db5ec7b3..803190ec699 100644
--- a/htdocs/resource/agenda.php
+++ b/htdocs/resource/agenda.php
@@ -141,7 +141,7 @@ if ($object->id > 0)
$morehtmlref.=' ';
$shownav = 1;
- if ($user->societe_id && ! in_array('resource', explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL))) $shownav=0;
+ if ($user->socid && ! in_array('resource', explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL))) $shownav=0;
dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref);
diff --git a/htdocs/resource/contact.php b/htdocs/resource/contact.php
index 872078ac51d..3e2a004e194 100644
--- a/htdocs/resource/contact.php
+++ b/htdocs/resource/contact.php
@@ -39,7 +39,7 @@ $ref = GETPOST('ref', 'alpha');
$action = GETPOST('action', 'alpha');
// Security check
-if ($user->societe_id) $socid=$user->societe_id;
+if ($user->socid) $socid=$user->socid;
$result = restrictedArea($user, 'resource', $id, 'resource');
$object = new DolResource($db);
diff --git a/htdocs/resource/document.php b/htdocs/resource/document.php
index 9f1b5af4322..e023134b9f5 100644
--- a/htdocs/resource/document.php
+++ b/htdocs/resource/document.php
@@ -44,7 +44,7 @@ $action = GETPOST('action', 'alpha');
$confirm = GETPOST('confirm', 'alpha');
// Security check
-if ($user->societe_id) $socid=$user->societe_id;
+if ($user->socid) $socid=$user->socid;
$result = restrictedArea($user, 'resource', $id, 'resource');
diff --git a/htdocs/resource/element_resource.php b/htdocs/resource/element_resource.php
index a0c1a724ed8..2ab64799f1d 100644
--- a/htdocs/resource/element_resource.php
+++ b/htdocs/resource/element_resource.php
@@ -357,7 +357,7 @@ else
}
$morehtmlref.='';
- dol_banner_tab($act, 'element_id', $linkback, ($user->societe_id?0:1), 'id', 'ref', $morehtmlref, '&element='.$element, 0, '', '');
+ dol_banner_tab($act, 'element_id', $linkback, ($user->socid?0:1), 'id', 'ref', $morehtmlref, '&element='.$element, 0, '', '');
print '';
@@ -453,7 +453,7 @@ else
dol_fiche_head($head, 'resources', $langs->trans("ThirdParty"), -1, 'company');
- dol_banner_tab($socstatic, 'socid', '', ($user->societe_id ? 0 : 1), 'rowid', 'nom', '', '&element='.$element);
+ dol_banner_tab($socstatic, 'socid', '', ($user->socid ? 0 : 1), 'rowid', 'nom', '', '&element='.$element);
print ' ';
@@ -557,7 +557,7 @@ else
dol_fiche_head($head, 'resources', $titre, -1, $picto);
$shownav = 1;
- if ($user->societe_id && ! in_array('product', explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL))) $shownav=0;
+ if ($user->socid && ! in_array('product', explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL))) $shownav=0;
dol_banner_tab($product, 'ref', '', $shownav, 'ref', 'ref', '', '&element='.$element);
dol_fiche_end();
diff --git a/htdocs/resource/note.php b/htdocs/resource/note.php
index 8c7f106285f..322088ef317 100644
--- a/htdocs/resource/note.php
+++ b/htdocs/resource/note.php
@@ -37,7 +37,7 @@ $ref = GETPOST('ref', 'alpha');
$action=GETPOST('action', 'alpha');
// Security check
-if ($user->societe_id) $socid=$user->societe_id;
+if ($user->socid) $socid=$user->socid;
$result = restrictedArea($user, 'resource', $id, 'resource');
$object = new DolResource($db);
diff --git a/htdocs/salaries/card.php b/htdocs/salaries/card.php
index 32edd342cb8..4e9b9dac118 100644
--- a/htdocs/salaries/card.php
+++ b/htdocs/salaries/card.php
@@ -48,7 +48,7 @@ $projectid = (GETPOST('projectid', 'int') ? GETPOST('projectid', 'int') : GETPOS
// Security check
$socid = GETPOST("socid", "int");
-if ($user->societe_id) $socid=$user->societe_id;
+if ($user->socid) $socid=$user->socid;
$result = restrictedArea($user, 'salaries', '', '', '');
$object = new PaymentSalary($db);
diff --git a/htdocs/salaries/document.php b/htdocs/salaries/document.php
index a7b92d63efb..7bd9a14a718 100644
--- a/htdocs/salaries/document.php
+++ b/htdocs/salaries/document.php
@@ -45,7 +45,7 @@ $confirm = GETPOST('confirm', 'alpha');
// Security check
$socid = GETPOST("socid", "int");
-if ($user->societe_id) $socid=$user->societe_id;
+if ($user->socid) $socid=$user->socid;
$result = restrictedArea($user, 'salaries', '', '', '');
diff --git a/htdocs/salaries/info.php b/htdocs/salaries/info.php
index 5ba53c45665..a96db0cbd5f 100644
--- a/htdocs/salaries/info.php
+++ b/htdocs/salaries/info.php
@@ -36,7 +36,7 @@ $action=GETPOST('action', 'aZ09');
// Security check
$socid = GETPOST('socid', 'int');
-if ($user->societe_id) $socid=$user->societe_id;
+if ($user->socid) $socid=$user->socid;
$result = restrictedArea($user, 'salaries', '', '', '');
diff --git a/htdocs/salaries/list.php b/htdocs/salaries/list.php
index 816b734ea23..02a729cb16c 100644
--- a/htdocs/salaries/list.php
+++ b/htdocs/salaries/list.php
@@ -33,7 +33,7 @@ $langs->loadLangs(array("compta","salaries","bills","hrm"));
// Security check
$socid = GETPOST("socid", "int");
-if ($user->societe_id) $socid=$user->societe_id;
+if ($user->socid) $socid=$user->socid;
$result = restrictedArea($user, 'salaries', '', '', '');
$limit = GETPOST('limit', 'int')?GETPOST('limit', 'int'):$conf->liste_limit;
diff --git a/htdocs/salaries/stats/index.php b/htdocs/salaries/stats/index.php
index a301dc927a1..38a568d5fc0 100644
--- a/htdocs/salaries/stats/index.php
+++ b/htdocs/salaries/stats/index.php
@@ -38,7 +38,7 @@ $id = GETPOST('id', 'int');
// Security check
$socid = GETPOST("socid", "int");
-if ($user->societe_id) $socid=$user->societe_id;
+if ($user->socid) $socid=$user->socid;
$result = restrictedArea($user, 'salaries', '', '', '');
$nowyear=strftime("%Y", dol_now());
diff --git a/htdocs/societe/agenda.php b/htdocs/societe/agenda.php
index 231174a0afa..ae2622d7f93 100644
--- a/htdocs/societe/agenda.php
+++ b/htdocs/societe/agenda.php
@@ -47,7 +47,7 @@ $search_agenda_label=GETPOST('search_agenda_label');
// Security check
$socid = GETPOST('socid', 'int');
-if ($user->societe_id) $socid=$user->societe_id;
+if ($user->socid) $socid=$user->socid;
$result = restrictedArea($user, 'societe', $socid, '&societe');
$limit = GETPOST('limit', 'int')?GETPOST('limit', 'int'):$conf->liste_limit;
@@ -117,7 +117,7 @@ if ($socid > 0)
$linkback = ' '.$langs->trans("BackToList").'';
- dol_banner_tab($object, 'socid', $linkback, ($user->societe_id?0:1), 'rowid', 'nom');
+ dol_banner_tab($object, 'socid', $linkback, ($user->socid?0:1), 'rowid', 'nom');
print ' ';
diff --git a/htdocs/societe/canvas/actions_card_common.class.php b/htdocs/societe/canvas/actions_card_common.class.php
index 28f2ec7306b..aafcd8ffc69 100644
--- a/htdocs/societe/canvas/actions_card_common.class.php
+++ b/htdocs/societe/canvas/actions_card_common.class.php
@@ -266,7 +266,7 @@ abstract class ActionsCardCommon
$this->tpl['showhead']=dol_get_fiche_head($head, 'card', '', 0, 'company');
$this->tpl['showend']=dol_get_fiche_end();
- $this->tpl['showrefnav'] = $form->showrefnav($this->object, 'socid', '', ($user->societe_id?0:1), 'rowid', 'nom');
+ $this->tpl['showrefnav'] = $form->showrefnav($this->object, 'socid', '', ($user->socid?0:1), 'rowid', 'nom');
$this->tpl['checkcustomercode'] = $this->object->check_codeclient();
$this->tpl['checksuppliercode'] = $this->object->check_codefournisseur();
diff --git a/htdocs/societe/card.php b/htdocs/societe/card.php
index 8cf9dbd1752..edfb3767f11 100644
--- a/htdocs/societe/card.php
+++ b/htdocs/societe/card.php
@@ -61,7 +61,7 @@ $backtopage = GETPOST('backtopage', 'alpha');
$confirm = GETPOST('confirm', 'alpha');
$socid = GETPOST('socid', 'int')?GETPOST('socid', 'int'):GETPOST('id', 'int');
-if ($user->societe_id) $socid=$user->societe_id;
+if ($user->socid) $socid=$user->socid;
if (empty($socid) && $action == 'view') $action='create';
$object = new Societe($db);
@@ -2241,7 +2241,7 @@ else
$linkback = ' '.$langs->trans("BackToList").'';
- dol_banner_tab($object, 'socid', $linkback, ($user->societe_id?0:1), 'rowid', 'nom');
+ dol_banner_tab($object, 'socid', $linkback, ($user->socid?0:1), 'rowid', 'nom');
print ' ';
diff --git a/htdocs/societe/class/client.class.php b/htdocs/societe/class/client.class.php
index 9c6c15e2f66..c345d195935 100644
--- a/htdocs/societe/class/client.class.php
+++ b/htdocs/societe/class/client.class.php
@@ -63,7 +63,7 @@ class Client extends Societe
$sql = "SELECT count(s.rowid) as nb, s.client";
$sql.= " FROM ".MAIN_DB_PREFIX."societe as s";
- if (!$user->rights->societe->client->voir && !$user->societe_id)
+ if (!$user->rights->societe->client->voir && !$user->socid)
{
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON s.rowid = sc.fk_soc";
$sql.= " WHERE sc.fk_user = " .$user->id;
diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php
index 48c37f044a5..4615290a03d 100644
--- a/htdocs/societe/class/societe.class.php
+++ b/htdocs/societe/class/societe.class.php
@@ -2238,7 +2238,7 @@ class Societe extends CommonObject
$linkend='';
global $user;
- if (! $user->rights->societe->client->voir && $user->societe_id > 0 && $this->id != $user->societe_id)
+ if (! $user->rights->societe->client->voir && $user->socid > 0 && $this->id != $user->socid)
{
$linkstart='';
$linkend='';
diff --git a/htdocs/societe/consumption.php b/htdocs/societe/consumption.php
index 85df9b4f069..0039504e950 100644
--- a/htdocs/societe/consumption.php
+++ b/htdocs/societe/consumption.php
@@ -33,7 +33,7 @@ require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.class.php';
// Security check
$socid = GETPOST('socid', 'int');
-if ($user->societe_id) $socid=$user->societe_id;
+if ($user->socid) $socid=$user->socid;
$result = restrictedArea($user, 'societe', $socid, '&societe');
$object = new Societe($db);
if ($socid > 0) $object->fetch($socid);
@@ -109,7 +109,7 @@ dol_fiche_head($head, 'consumption', $langs->trans("ThirdParty"), -1, 'company')
$linkback = ' '.$langs->trans("BackToList").'';
-dol_banner_tab($object, 'socid', $linkback, ($user->societe_id?0:1), 'rowid', 'nom');
+dol_banner_tab($object, 'socid', $linkback, ($user->socid?0:1), 'rowid', 'nom');
print ' ';
diff --git a/htdocs/societe/contact.php b/htdocs/societe/contact.php
index 1b119e9c89a..352c9c53c35 100644
--- a/htdocs/societe/contact.php
+++ b/htdocs/societe/contact.php
@@ -56,7 +56,7 @@ $cancel = GETPOST('cancel', 'alpha');
$backtopage = GETPOST('backtopage', 'alpha');
$confirm = GETPOST('confirm');
$socid = GETPOST('socid', 'int')?GETPOST('socid', 'int'):GETPOST('id', 'int');
-if ($user->societe_id) $socid=$user->societe_id;
+if ($user->socid) $socid=$user->socid;
if (empty($socid) && $action == 'view') $action='create';
$object = new Societe($db);
@@ -150,7 +150,7 @@ dol_fiche_head($head, 'contact', $langs->trans("ThirdParty"), 0, 'company');
$linkback = ' '.$langs->trans("BackToList").'';
-dol_banner_tab($object, 'socid', $linkback, ($user->societe_id?0:1), 'rowid', 'nom', '', '', 0, '', '', 'arearefnobottom');
+dol_banner_tab($object, 'socid', $linkback, ($user->socid?0:1), 'rowid', 'nom', '', '', 0, '', '', 'arearefnobottom');
dol_fiche_end();
diff --git a/htdocs/societe/document.php b/htdocs/societe/document.php
index 971944c4f30..8e0c36aa451 100644
--- a/htdocs/societe/document.php
+++ b/htdocs/societe/document.php
@@ -40,10 +40,10 @@ $id=(GETPOST('socid', 'int') ? GETPOST('socid', 'int') : GETPOST('id', 'int'));
$ref = GETPOST('ref', 'alpha');
// Security check
-if ($user->societe_id > 0)
+if ($user->socid > 0)
{
unset($action);
- $socid = $user->societe_id;
+ $socid = $user->socid;
}
$result = restrictedArea($user, 'societe', $id, '&societe');
@@ -117,7 +117,7 @@ if ($object->id)
$linkback = ' '.$langs->trans("BackToList").'';
- dol_banner_tab($object, 'socid', $linkback, ($user->societe_id?0:1), 'rowid', 'nom');
+ dol_banner_tab($object, 'socid', $linkback, ($user->socid?0:1), 'rowid', 'nom');
print ' ';
diff --git a/htdocs/societe/index.php b/htdocs/societe/index.php
index 50b866ca089..5aadc5d3606 100644
--- a/htdocs/societe/index.php
+++ b/htdocs/societe/index.php
@@ -38,7 +38,7 @@ $hookmanager->initHooks(array('thirdpartiesindex'));
$langs->load("companies");
$socid = GETPOST('socid', 'int');
-if ($user->societe_id) $socid = $user->societe_id;
+if ($user->socid) $socid=$user->socid;
// Security check
$result = restrictedArea($user, 'societe', 0, '', '', '', '');
diff --git a/htdocs/societe/list.php b/htdocs/societe/list.php
index ad793fcf63e..8f0d1895c1b 100644
--- a/htdocs/societe/list.php
+++ b/htdocs/societe/list.php
@@ -55,7 +55,7 @@ if ($contextpage == 'poslist')
// Security check
$socid = GETPOST('socid', 'int');
-if ($user->societe_id) $socid=$user->societe_id;
+if ($user->socid) $socid=$user->socid;
$result = restrictedArea($user, 'societe', $socid, '');
$search_all=trim(GETPOST('search_all', 'alphanohtml')?GETPOST('search_all', 'alphanohtml'):GETPOST('sall', 'alphanohtml'));
diff --git a/htdocs/societe/note.php b/htdocs/societe/note.php
index 4d20f050518..0f2bc4d8002 100644
--- a/htdocs/societe/note.php
+++ b/htdocs/societe/note.php
@@ -35,7 +35,7 @@ $langs->load("companies");
// Security check
$id = GETPOST('id')?GETPOST('id', 'int'):GETPOST('socid', 'int');
-if ($user->societe_id) $id=$user->societe_id;
+if ($user->socid) $id=$user->socid;
$result = restrictedArea($user, 'societe', $id, '&societe');
$object = new Societe($db);
@@ -78,7 +78,7 @@ if ($object->id > 0)
$linkback = ' '.$langs->trans("BackToList").'';
- dol_banner_tab($object, 'socid', $linkback, ($user->societe_id?0:1), 'rowid', 'nom');
+ dol_banner_tab($object, 'socid', $linkback, ($user->socid?0:1), 'rowid', 'nom');
$cssclass='titlefield';
//if ($action == 'editnote_public') $cssclass='titlefieldcreate';
diff --git a/htdocs/societe/notify/card.php b/htdocs/societe/notify/card.php
index 54536fa7502..d3f4c30f575 100644
--- a/htdocs/societe/notify/card.php
+++ b/htdocs/societe/notify/card.php
@@ -39,7 +39,7 @@ $actionid = GETPOST('actionid');
$optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print')
// Security check
-if ($user->societe_id) $socid=$user->societe_id;
+if ($user->socid) $socid=$user->socid;
$result = restrictedArea($user, 'societe', '', '');
$limit = GETPOST('limit', 'int')?GETPOST('limit', 'int'):$conf->liste_limit;
@@ -156,7 +156,7 @@ if ($result > 0)
$linkback = ' '.$langs->trans("BackToList").'';
- dol_banner_tab($object, 'socid', $linkback, ($user->societe_id?0:1), 'rowid', 'nom');
+ dol_banner_tab($object, 'socid', $linkback, ($user->socid?0:1), 'rowid', 'nom');
print ' ';
diff --git a/htdocs/societe/paymentmodes.php b/htdocs/societe/paymentmodes.php
index df803b180ab..5ed2b9a148f 100644
--- a/htdocs/societe/paymentmodes.php
+++ b/htdocs/societe/paymentmodes.php
@@ -44,7 +44,7 @@ $langs->loadLangs(array("companies","commercial","banks","bills",'paypal','strip
// Security check
$socid = GETPOST("socid", "int");
-if ($user->societe_id) $socid=$user->societe_id;
+if ($user->socid) $socid=$user->socid;
$result = restrictedArea($user, 'societe', '', '');
$id=GETPOST("id", "int");
@@ -804,7 +804,7 @@ if ($socid && $action != 'edit' && $action != 'create' && $action != 'editcard'
$linkback = ' '.$langs->trans("BackToList").'';
- dol_banner_tab($object, 'socid', $linkback, ($user->societe_id?0:1), 'rowid', 'nom');
+ dol_banner_tab($object, 'socid', $linkback, ($user->socid?0:1), 'rowid', 'nom');
if (! empty($conf->global->SOCIETE_USEPREFIX)) // Old not used prefix field
@@ -1615,7 +1615,7 @@ if ($socid && $action == 'edit' && $user->rights->societe->creer)
$linkback = ' '.$langs->trans("BackToList").'';
- dol_banner_tab($object, 'socid', $linkback, ($user->societe_id?0:1), 'rowid', 'nom');
+ dol_banner_tab($object, 'socid', $linkback, ($user->socid?0:1), 'rowid', 'nom');
print ' ';
@@ -1721,7 +1721,7 @@ if ($socid && $action == 'editcard' && $user->rights->societe->creer)
$linkback = ' '.$langs->trans("BackToList").'';
- dol_banner_tab($object, 'socid', $linkback, ($user->societe_id?0:1), 'rowid', 'nom');
+ dol_banner_tab($object, 'socid', $linkback, ($user->socid?0:1), 'rowid', 'nom');
print ' ';
@@ -1769,7 +1769,7 @@ if ($socid && $action == 'create' && $user->rights->societe->creer)
$linkback = ' '.$langs->trans("BackToList").'';
- dol_banner_tab($object, 'socid', $linkback, ($user->societe_id?0:1), 'rowid', 'nom');
+ dol_banner_tab($object, 'socid', $linkback, ($user->socid?0:1), 'rowid', 'nom');
print ' ';
@@ -1869,7 +1869,7 @@ if ($socid && $action == 'createcard' && $user->rights->societe->creer)
$linkback = ' '.$langs->trans("BackToList").'';
- dol_banner_tab($object, 'socid', $linkback, ($user->societe_id?0:1), 'rowid', 'nom');
+ dol_banner_tab($object, 'socid', $linkback, ($user->socid?0:1), 'rowid', 'nom');
print ' ';
diff --git a/htdocs/societe/price.php b/htdocs/societe/price.php
index 967f91ca39d..d3c4c75fca5 100644
--- a/htdocs/societe/price.php
+++ b/htdocs/societe/price.php
@@ -46,8 +46,8 @@ $cancel = GETPOST('cancel', 'alpha');
// Security check
$socid = GETPOST('socid', 'int')?GETPOST('socid', 'int'):GETPOST('id', 'int');
-if ($user->societe_id)
- $socid = $user->societe_id;
+if ($user->socid)
+ $socid = $user->socid;
$result = restrictedArea($user, 'societe', $socid, '&societe');
$object = new Societe($db);
@@ -187,7 +187,7 @@ dol_fiche_head($head, 'price', $langs->trans("ThirdParty"), -1, 'company');
$linkback = ' '.$langs->trans("BackToList").'';
-dol_banner_tab($object, 'socid', $linkback, ($user->societe_id?0:1), 'rowid', 'nom');
+dol_banner_tab($object, 'socid', $linkback, ($user->socid?0:1), 'rowid', 'nom');
print ' ';
diff --git a/htdocs/societe/project.php b/htdocs/societe/project.php
index 8f825bfc18c..1ff2c24956e 100644
--- a/htdocs/societe/project.php
+++ b/htdocs/societe/project.php
@@ -35,7 +35,7 @@ $langs->loadLangs(array("companies", "projects"));
// Security check
$socid = GETPOST('socid', 'int');
-if ($user->societe_id) $socid=$user->societe_id;
+if ($user->socid) $socid=$user->socid;
$result = restrictedArea($user, 'societe', $socid, '&societe');
// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
@@ -82,7 +82,7 @@ if ($socid)
$linkback = ' '.$langs->trans("BackToList").'';
- dol_banner_tab($object, 'socid', $linkback, ($user->societe_id?0:1), 'rowid', 'nom');
+ dol_banner_tab($object, 'socid', $linkback, ($user->socid?0:1), 'rowid', 'nom');
print ' ';
diff --git a/htdocs/societe/societecontact.php b/htdocs/societe/societecontact.php
index 7f531498e2f..0894935b962 100644
--- a/htdocs/societe/societecontact.php
+++ b/htdocs/societe/societecontact.php
@@ -51,7 +51,7 @@ $pageprev = $page - 1;
$pagenext = $page + 1;
// Security check
-if ($user->societe_id) $socid=$user->societe_id;
+if ($user->socid) $socid=$user->socid;
$result = restrictedArea($user, 'societe', $id, '');
$object = new Societe($db);
@@ -166,7 +166,7 @@ if ($id > 0 || ! empty($ref))
$linkback = ' '.$langs->trans("BackToList").'';
- dol_banner_tab($object, 'socid', $linkback, ($user->societe_id?0:1), 'rowid', 'nom');
+ dol_banner_tab($object, 'socid', $linkback, ($user->socid?0:1), 'rowid', 'nom');
print ' ';
diff --git a/htdocs/societe/website.php b/htdocs/societe/website.php
index 0e0c5ac2cc8..6878ea8ed44 100644
--- a/htdocs/societe/website.php
+++ b/htdocs/societe/website.php
@@ -47,7 +47,7 @@ $search_status=GETPOST('search_status');
// Security check
$id = GETPOST('id', 'int')?GETPOST('id', 'int'):GETPOST('socid', 'int');
-if ($user->societe_id) $socid=$user->societe_id;
+if ($user->socid) $socid=$user->socid;
$result = restrictedArea($user, 'societe', $socid, '&societe');
$limit = GETPOST('limit', 'int')?GETPOST('limit', 'int'):$conf->liste_limit;
@@ -195,7 +195,7 @@ dol_fiche_head($head, 'website', $langs->trans("ThirdParty"), - 1, 'company');
$linkback = ' ' . $langs->trans("BackToList") . '';
-dol_banner_tab($object, 'socid', $linkback, ($user->societe_id ? 0 : 1), 'rowid', 'nom');
+dol_banner_tab($object, 'socid', $linkback, ($user->socid ? 0 : 1), 'rowid', 'nom');
print ' ';
diff --git a/htdocs/stripe/charge.php b/htdocs/stripe/charge.php
index a9e417aa581..f398a013fb6 100644
--- a/htdocs/stripe/charge.php
+++ b/htdocs/stripe/charge.php
@@ -33,7 +33,7 @@ $langs->loadLangs(array('compta', 'salaries', 'bills', 'hrm', 'stripe'));
// Security check
$socid = GETPOST("socid", "int");
-if ($user->societe_id) $socid=$user->societe_id;
+if ($user->socid) $socid=$user->socid;
//$result = restrictedArea($user, 'salaries', '', '', '');
$limit = GETPOST('limit', 'int')?GETPOST('limit', 'int'):$conf->liste_limit;
diff --git a/htdocs/stripe/payment.php b/htdocs/stripe/payment.php
index 2614c8498f3..e0ed986bfd6 100644
--- a/htdocs/stripe/payment.php
+++ b/htdocs/stripe/payment.php
@@ -65,9 +65,9 @@ $multicurrency_amountsresttopay=array();
// Security check
$socid=0;
-if ($user->societe_id > 0)
+if ($user->socid > 0)
{
- $socid = $user->societe_id;
+ $socid = $user->socid;
}
$object=new Facture($db);
diff --git a/htdocs/stripe/payout.php b/htdocs/stripe/payout.php
index 70988b339b5..e2f19c560be 100644
--- a/htdocs/stripe/payout.php
+++ b/htdocs/stripe/payout.php
@@ -33,7 +33,7 @@ $langs->loadLangs(array('compta', 'salaries', 'bills', 'hrm', 'stripe'));
// Security check
$socid = GETPOST("socid", "int");
-if ($user->societe_id) $socid=$user->societe_id;
+if ($user->socid) $socid=$user->socid;
//$result = restrictedArea($user, 'salaries', '', '', '');
$limit = GETPOST('limit', 'int')?GETPOST('limit', 'int'):$conf->liste_limit;
diff --git a/htdocs/stripe/transaction.php b/htdocs/stripe/transaction.php
index 6dc0a1e0815..3bc1050f867 100644
--- a/htdocs/stripe/transaction.php
+++ b/htdocs/stripe/transaction.php
@@ -33,7 +33,7 @@ $langs->loadLangs(array('compta', 'salaries', 'bills', 'hrm', 'stripe'));
// Security check
$socid = GETPOST("socid", "int");
-if ($user->societe_id) $socid=$user->societe_id;
+if ($user->socid) $socid=$user->socid;
//$result = restrictedArea($user, 'salaries', '', '', '');
$limit = GETPOST('limit', 'int')?GETPOST('limit', 'int'):$conf->liste_limit;
diff --git a/htdocs/supplier_proposal/card.php b/htdocs/supplier_proposal/card.php
index b953087b885..1a8aa755e71 100644
--- a/htdocs/supplier_proposal/card.php
+++ b/htdocs/supplier_proposal/card.php
@@ -74,7 +74,7 @@ $hideref = (GETPOST('hideref', 'int') ? GETPOST('hideref', 'int') : (! empty($co
$NBLINES = 4;
// Security check
-if (! empty($user->societe_id)) $socid = $user->societe_id;
+if (! empty($user->socid)) $socid = $user->socid;
$result = restrictedArea($user, 'supplier_proposal', $id);
// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
diff --git a/htdocs/supplier_proposal/contact.php b/htdocs/supplier_proposal/contact.php
index d60fb3c04bc..84b007c53fc 100644
--- a/htdocs/supplier_proposal/contact.php
+++ b/htdocs/supplier_proposal/contact.php
@@ -39,7 +39,7 @@ $ref = GETPOST('ref', 'alpha');
$action = GETPOST('action', 'alpha');
// Security check
-if ($user->societe_id) $socid=$user->societe_id;
+if ($user->socid) $socid=$user->socid;
$result = restrictedArea($user, 'supplier_proposal', $id, 'supplier_proposal', '');
$object = new SupplierProposal($db);
diff --git a/htdocs/supplier_proposal/document.php b/htdocs/supplier_proposal/document.php
index 991059b9141..da76e9ea897 100644
--- a/htdocs/supplier_proposal/document.php
+++ b/htdocs/supplier_proposal/document.php
@@ -45,9 +45,9 @@ $ref = GETPOST('ref', 'alpha');
// Security check
$socid='';
-if (! empty($user->societe_id))
+if (! empty($user->socid))
{
- $socid = $user->societe_id;
+ $socid = $user->socid;
}
$result = restrictedArea($user, 'supplier_proposal', $id);
diff --git a/htdocs/supplier_proposal/index.php b/htdocs/supplier_proposal/index.php
index dd2acd27311..55bde878918 100644
--- a/htdocs/supplier_proposal/index.php
+++ b/htdocs/supplier_proposal/index.php
@@ -38,10 +38,10 @@ $langs->loadLangs(array('supplier_proposal', 'companies'));
// Security check
$socid=GETPOST('socid', 'int');
-if (isset($user->societe_id) && $user->societe_id > 0)
+if (isset($user->socid) && $user->socid > 0)
{
$action = '';
- $socid = $user->societe_id;
+ $socid = $user->socid;
}
$result = restrictedArea($user, 'supplier_proposal');
@@ -90,7 +90,7 @@ $sql.= ", ".MAIN_DB_PREFIX."supplier_proposal as p";
if (!$user->rights->societe->client->voir && !$socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
$sql.= " WHERE p.fk_soc = s.rowid";
$sql.= " AND p.entity IN (".getEntity('supplier_proposal').")";
-if ($user->societe_id) $sql.=' AND p.fk_soc = '.$user->societe_id;
+if ($user->socid) $sql.=' AND p.fk_soc = '.$user->socid;
if (!$user->rights->societe->client->voir && !$socid) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id;
$sql.= " AND p.fk_statut IN (0,1,2,3,4)";
$sql.= " GROUP BY p.fk_statut";
diff --git a/htdocs/supplier_proposal/info.php b/htdocs/supplier_proposal/info.php
index ec269354af6..7b259b166e4 100644
--- a/htdocs/supplier_proposal/info.php
+++ b/htdocs/supplier_proposal/info.php
@@ -39,7 +39,7 @@ $id=GETPOST('id', 'int');
$socid=GETPOST('socid', 'int');
// Security check
-if (! empty($user->societe_id)) $socid=$user->societe_id;
+if (! empty($user->socid)) $socid=$user->socid;
$result = restrictedArea($user, 'supplier_proposal', $id);
diff --git a/htdocs/supplier_proposal/list.php b/htdocs/supplier_proposal/list.php
index 687d98911f2..c48f3756611 100644
--- a/htdocs/supplier_proposal/list.php
+++ b/htdocs/supplier_proposal/list.php
@@ -103,7 +103,7 @@ $NBLINES=4;
$module='supplier_proposal';
$dbtable='';
$objectid='';
-if (! empty($user->societe_id)) $socid=$user->societe_id;
+if (! empty($user->socid)) $socid=$user->socid;
if (! empty($socid))
{
$objectid=$socid;
diff --git a/htdocs/supplier_proposal/note.php b/htdocs/supplier_proposal/note.php
index 447dc057979..0e12da2c104 100644
--- a/htdocs/supplier_proposal/note.php
+++ b/htdocs/supplier_proposal/note.php
@@ -40,7 +40,7 @@ $ref=GETPOST('ref', 'alpha');
$action=GETPOST('action', 'alpha');
// Security check
-if ($user->societe_id) $socid=$user->societe_id;
+if ($user->socid) $socid=$user->socid;
$result = restrictedArea($user, 'supplier_proposal', $id, 'supplier_proposal');
$object = new SupplierProposal($db);
diff --git a/htdocs/takepos/invoice.php b/htdocs/takepos/invoice.php
index 2fcb9e0a6d8..126fea907a9 100644
--- a/htdocs/takepos/invoice.php
+++ b/htdocs/takepos/invoice.php
@@ -260,6 +260,9 @@ if ($action == "addline")
$prod = new Product($db);
$prod->fetch($idproduct);
+ $customer = new Societe($db);
+ $customer->fetch($invoice->socid);
+
$price = $prod->price;
$tva_tx = $prod->tva_tx;
$price_ttc = $prod->price_ttc;
@@ -267,16 +270,13 @@ if ($action == "addline")
if (! empty($conf->global->PRODUIT_MULTIPRICES))
{
- $customer = new Societe($db);
- $customer->fetch($invoice->socid);
-
$price = $prod->multiprices[$customer->price_level];
$tva_tx = $prod->multiprices_tva_tx[$customer->price_level];
$price_ttc = $prod->multiprices_ttc[$customer->price_level];
$price_base_type = $prod->multiprices_base_type[$customer->price_level];
}
- $idoflineadded = $invoice->addline($prod->description, $price, 1, $tva_tx, $prod->localtax1_tx, $prod->localtax2_tx, $idproduct, $prod->remise_percent, '', 0, 0, 0, '', $price_base_type, $price_ttc, $prod->type, -1, 0, '', 0, 0, null, 0, '', 0, 100, '', null, 0);
+ $idoflineadded = $invoice->addline($prod->description, $price, 1, $tva_tx, $prod->localtax1_tx, $prod->localtax2_tx, $idproduct, $customer->remise_percent, '', 0, 0, 0, '', $price_base_type, $price_ttc, $prod->type, -1, 0, '', 0, 0, null, 0, '', 0, 100, '', null, 0);
$invoice->fetch($placeid);
}
diff --git a/htdocs/theme/eldy/btn.inc.php b/htdocs/theme/eldy/btn.inc.php
index 51fbfd6a561..59c015b6245 100644
--- a/htdocs/theme/eldy/btn.inc.php
+++ b/htdocs/theme/eldy/btn.inc.php
@@ -260,4 +260,23 @@ div.pagination li:first-child a.btnTitle{
.butActionRefused, .butActionNewRefused, .btnTitle.refused {
display: none !important;
}
-
+
+
+/*
+ * BTN LINK
+ */
+
+.btn-link{
+ margin-right: 5px;
+ border: 1px solid #ddd;
+ color: #333;
+ padding: 5px 10px;
+ border-radius:1em;
+ text-decoration: none !important;
+}
+
+.btn-link:hover{
+ background-color: #ddd;
+ border: 1px solid #ddd;
+}
diff --git a/htdocs/theme/eldy/global.inc.php b/htdocs/theme/eldy/global.inc.php
index 4a3b73b1d20..6db99927fb1 100644
--- a/htdocs/theme/eldy/global.inc.php
+++ b/htdocs/theme/eldy/global.inc.php
@@ -4415,6 +4415,14 @@ pre#editfilecontentaceeditorid {
#comment .comment-delete:hover {
background:rgba(250,20,20,0.8);
}
+#comment .comment-edit {
+ width: 100px;
+ text-align:center;
+ vertical-align:middle;
+}
+#comment .comment-edit:hover {
+ background:rgba(0,184,148,0.8);
+}
#comment textarea {
width: 100%;
}
diff --git a/htdocs/theme/eldy/timeline.inc.php b/htdocs/theme/eldy/timeline.inc.php
index 2cb3461d713..76ca244e572 100644
--- a/htdocs/theme/eldy/timeline.inc.php
+++ b/htdocs/theme/eldy/timeline.inc.php
@@ -125,7 +125,12 @@ a.timeline-btn:hover
font-weight: normal;
line-height: 1.1;
}
-.timeline > li.timeline-code-ticket_msg_private > .timeline-item > .timeline-header {
+
+.timeline > li > .timeline-item > .timeline-footer {
+ border-top: 1px solid #f4f4f4;
+}
+
+.timeline > li.timeline-code-ticket_msg_private > .timeline-item > .timeline-header, .timeline > li.timeline-code-ticket_msg_private > .timeline-item > .timeline-footer {
border-color: #ecebda;
}
@@ -195,3 +200,12 @@ a.timeline-btn:hover
background-color: #0073b7 !important;
color: #fff !important;
}
+
+.timeline-documents-container{
+
+}
+
+.timeline-documents{
+ margin-right: 5px;
+}
+
diff --git a/htdocs/ticket/agenda.php b/htdocs/ticket/agenda.php
index dee2168136c..6db51996d12 100644
--- a/htdocs/ticket/agenda.php
+++ b/htdocs/ticket/agenda.php
@@ -78,19 +78,19 @@ if (!$action) {
// Security check
$id = GETPOST("id", 'int');
$socid=0;
-//if ($user->societe_id > 0) $socid = $user->societe_id; // For external user, no check is done on company because readability is managed by public status of project and assignement.
+//if ($user->socid > 0) $socid = $user->socid; // For external user, no check is done on company because readability is managed by public status of project and assignement.
$result=restrictedArea($user, 'ticket', $id, '');
if (!$user->rights->ticket->read) {
accessforbidden();
}
// restrict access for externals users
-if ($user->societe_id > 0 && ($object->fk_soc != $user->societe_id))
+if ($user->socid > 0 && ($object->fk_soc != $user->socid))
{
accessforbidden();
}
// or for unauthorized internals users
-if (!$user->societe_id && ($conf->global->TICKET_LIMIT_VIEW_ASSIGNED_ONLY && $object->fk_user_assign != $user->id) && !$user->rights->ticket->manage) {
+if (!$user->socid && ($conf->global->TICKET_LIMIT_VIEW_ASSIGNED_ONLY && $object->fk_user_assign != $user->id) && !$user->rights->ticket->manage) {
accessforbidden();
}
@@ -138,15 +138,15 @@ if ($socid > 0) {
dol_fiche_head($head, 'ticket', $langs->trans("ThirdParty"), 0, 'company');
- dol_banner_tab($object->thirdparty, 'socid', '', ($user->societe_id ? 0 : 1), 'rowid', 'nom');
+ dol_banner_tab($object->thirdparty, 'socid', '', ($user->socid ? 0 : 1), 'rowid', 'nom');
dol_fiche_end();
}
-if (!$user->societe_id && $conf->global->TICKET_LIMIT_VIEW_ASSIGNED_ONLY) {
+if (!$user->socid && $conf->global->TICKET_LIMIT_VIEW_ASSIGNED_ONLY) {
$object->next_prev_filter = "te.fk_user_assign = '" . $user->id . "'";
-} elseif ($user->societe_id > 0) {
- $object->next_prev_filter = "te.fk_soc = '" . $user->societe_id . "'";
+} elseif ($user->socid > 0) {
+ $object->next_prev_filter = "te.fk_soc = '" . $user->socid . "'";
}
$head = ticket_prepare_head($object);
@@ -172,7 +172,7 @@ if (!empty($object->origin_email)) {
if (! empty($conf->societe->enabled))
{
$morehtmlref.=' '.$langs->trans('ThirdParty');
- /*if ($action != 'editcustomer' && $object->fk_statut < 8 && !$user->societe_id && $user->rights->ticket->write) {
+ /*if ($action != 'editcustomer' && $object->fk_statut < 8 && !$user->socid && $user->rights->ticket->write) {
$morehtmlref.=' ' . img_edit($langs->transnoentitiesnoconv('Edit'), 1) . '';
}*/
$morehtmlref.=' : ';
@@ -220,7 +220,7 @@ $morehtmlref.=' ';
$linkback = ' ' . $langs->trans("BackToList") . ' ';
-dol_banner_tab($object, 'ref', $linkback, ($user->societe_id ? 0 : 1), 'ref', 'ref', $morehtmlref, '', 0, '', '', 1);
+dol_banner_tab($object, 'ref', $linkback, ($user->socid ? 0 : 1), 'ref', 'ref', $morehtmlref, '', 0, '', '', 1);
dol_fiche_end();
diff --git a/htdocs/ticket/card.php b/htdocs/ticket/card.php
index eec2c813d26..6aa6d42e590 100644
--- a/htdocs/ticket/card.php
+++ b/htdocs/ticket/card.php
@@ -95,8 +95,8 @@ if ($id || $track_id || $ref) {
$url_page_current = DOL_URL_ROOT.'/ticket/card.php';
// Security check - Protection if external user
-//if ($user->societe_id > 0) access_forbidden();
-//if ($user->societe_id > 0) $socid = $user->societe_id;
+//if ($user->socid > 0) access_forbidden();
+//if ($user->socid > 0) $socid = $user->socid;
$result = restrictedArea($user, 'ticket', $object->id);
$triggermodname = 'TICKET_MODIFY';
@@ -622,7 +622,7 @@ if ($action == 'create' || $action == 'presend')
print load_fiche_titre($langs->trans('NewTicket'), '', 'ticket');
- $formticket->withfromsocid = $socid ? $socid : $user->societe_id;
+ $formticket->withfromsocid = $socid ? $socid : $user->socid;
$formticket->withfromcontactid = $contactid ? $contactid : '';
$formticket->withtitletopic = 1;
$formticket->withnotifytiersatcreate = ($notifyTiers?1:0);
@@ -645,7 +645,7 @@ if (empty($action) || $action == 'view' || $action == 'addlink' || $action == 'd
if ($res > 0)
{
// or for unauthorized internals users
- if (!$user->societe_id && ($conf->global->TICKET_LIMIT_VIEW_ASSIGNED_ONLY && $object->fk_user_assign != $user->id) && !$user->rights->ticket->manage) {
+ if (!$user->socid && ($conf->global->TICKET_LIMIT_VIEW_ASSIGNED_ONLY && $object->fk_user_assign != $user->id) && !$user->rights->ticket->manage) {
accessforbidden('', 0, 1);
}
@@ -741,14 +741,14 @@ if (empty($action) || $action == 'view' || $action == 'addlink' || $action == 'd
$head = societe_prepare_head($object->thirdparty);
dol_fiche_head($head, 'ticket', $langs->trans("ThirdParty"), 0, 'company');
- dol_banner_tab($object->thirdparty, 'socid', '', ($user->societe_id ? 0 : 1), 'rowid', 'nom');
+ dol_banner_tab($object->thirdparty, 'socid', '', ($user->socid ? 0 : 1), 'rowid', 'nom');
dol_fiche_end();
}
- if (!$user->societe_id && $conf->global->TICKET_LIMIT_VIEW_ASSIGNED_ONLY) {
+ if (!$user->socid && $conf->global->TICKET_LIMIT_VIEW_ASSIGNED_ONLY) {
$object->next_prev_filter = "te.fk_user_assign = '" . $user->id . "'";
- } elseif ($user->societe_id > 0) {
- $object->next_prev_filter = "te.fk_soc = '" . $user->societe_id . "'";
+ } elseif ($user->socid > 0) {
+ $object->next_prev_filter = "te.fk_soc = '" . $user->socid . "'";
}
$head = ticket_prepare_head($object);
@@ -775,7 +775,7 @@ if (empty($action) || $action == 'view' || $action == 'addlink' || $action == 'd
if (! empty($conf->societe->enabled))
{
$morehtmlref.=' '.$langs->trans('ThirdParty') . ' ';
- if ($action != 'editcustomer' && $object->fk_statut < 8 && !$user->societe_id && $user->rights->ticket->write) {
+ if ($action != 'editcustomer' && $object->fk_statut < 8 && !$user->socid && $user->rights->ticket->write) {
$morehtmlref.=' ' . img_edit($langs->transnoentitiesnoconv('Edit'), 0) . ' : ';
}
if ($action == 'editcustomer') {
@@ -821,7 +821,7 @@ if (empty($action) || $action == 'view' || $action == 'addlink' || $action == 'd
$linkback = ' ' . $langs->trans("BackToList") . ' ';
- dol_banner_tab($object, 'ref', $linkback, ($user->societe_id ? 0 : 1), 'ref', 'ref', $morehtmlref);
+ dol_banner_tab($object, 'ref', $linkback, ($user->socid ? 0 : 1), 'ref', 'ref', $morehtmlref);
print ' ';
print ' ';
@@ -845,9 +845,9 @@ if (empty($action) || $action == 'view' || $action == 'addlink' || $action == 'd
// Subject
print ' | ';
- print $form->editfieldkey("Subject", 'subject', $object->subject, $object, $user->rights->ticket->write && !$user->societe_id, 'string');
+ print $form->editfieldkey("Subject", 'subject', $object->subject, $object, $user->rights->ticket->write && !$user->socid, 'string');
print ' | ';
- print $form->editfieldval("Subject", 'subject', $object->subject, $object, $user->rights->ticket->write && !$user->societe_id, 'string');
+ print $form->editfieldval("Subject", 'subject', $object->subject, $object, $user->rights->ticket->write && !$user->socid, 'string');
print ' | ';
// Creation date
@@ -889,7 +889,7 @@ if (empty($action) || $action == 'view' || $action == 'addlink' || $action == 'd
}
// Show user list to assignate one if status is "read"
- if (GETPOST('set', 'alpha') == "assign_ticket" && $object->fk_statut < 8 && !$user->societe_id && $user->rights->ticket->write) {
+ if (GETPOST('set', 'alpha') == "assign_ticket" && $object->fk_statut < 8 && !$user->socid && $user->rights->ticket->write) {
print ' |