diff --git a/htdocs/install/mysql/data/llx_c_chargesociales.sql b/htdocs/install/mysql/data/llx_c_chargesociales.sql index 6e0102c6fbf..7719b9f9f21 100644 --- a/htdocs/install/mysql/data/llx_c_chargesociales.sql +++ b/htdocs/install/mysql/data/llx_c_chargesociales.sql @@ -80,8 +80,7 @@ insert into llx_c_chargesociales (fk_pays, id, libelle, deductible, active, code insert into llx_c_chargesociales (fk_pays, id, libelle, deductible, active, code) values ( 102, 10203, 'Ασφαλιστικές εισφορές (ΕΦΚΑ)', 1, 1, 'ΕΦΚΑ'); insert into llx_c_chargesociales (fk_pays, id, libelle, deductible, active, code) values ( 102, 10204, 'Προκαταβολή Φόρου Εισοδήματος', 0, 1, 'ΕΦΟΡΙΑ'); insert into llx_c_chargesociales (fk_pays, id, libelle, deductible, active, code) values ( 102, 10205, 'Ενιαίος Φόρος Ιδιοκτησίας Ακινήτων (ΕΝ.Φ.Ι.Α) ', 0, 1, 'ΕΝΦΙΑ'); -insert into llx_c_chargesociales (fk_pays, id, libelle, deductible, active, code) values ( 102, 10206, 'Ετήσιο τέλος διατήρησης Μερίδας στο -Γ.Ε.ΜΗ.', 1, 1, 'ΓΕΜΗ'); +insert into llx_c_chargesociales (fk_pays, id, libelle, deductible, active, code) values ( 102, 10206, 'Ετήσιο τέλος διατήρησης Μερίδας στο Γ.Ε.ΜΗ.', 1, 1, 'ΓΕΜΗ'); insert into llx_c_chargesociales (fk_pays, id, libelle, deductible, active, code) values ( 102, 10207, 'Επαγγελματικό Επιμελητήριο', 1, 1, 'ΕΕ'); insert into llx_c_chargesociales (fk_pays, id, libelle, deductible, active, code) values ( 102, 10208, 'Εμπορικό και Βιομηχανικό Επιμελητηρίο', 1, 1, 'ΕΒΕ'); insert into llx_c_chargesociales (fk_pays, id, libelle, deductible, active, code) values ( 102, 10209, 'Τέλη Κυκλοφορίας', 1, 1,'ΤΕΛΗ'); diff --git a/htdocs/website/websiteaccount_card.php b/htdocs/website/websiteaccount_card.php index f7658a28a97..9c48a3051fc 100644 --- a/htdocs/website/websiteaccount_card.php +++ b/htdocs/website/websiteaccount_card.php @@ -70,15 +70,15 @@ include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be includ //if ($user->socid > 0) accessforbidden(); //if ($user->socid > 0) $socid = $user->socid; //$result = restrictedArea($user, 'website', $id); -if (empty($user->rights->websiteaccount->read)) { +if (empty($user->hasRight('website', 'read'))) { accessforbidden('NotAllowed'); } // Permissions -$permissionnote = $user->rights->websiteaccount->write; // Used by the include of actions_setnotes.inc.php -$permissiondellink = $user->rights->websiteaccount->write; // Used by the include of actions_dellink.inc.php -$permissiontoadd = $user->rights->websiteaccount->write; // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php -$permissiontodelete = $user->rights->websiteaccount->delete; +$permissionnote = $user->hasRight('website', 'write'); // Used by the include of actions_setnotes.inc.php +$permissiondellink = $user->hasRight('website', 'write'); // Used by the include of actions_dellink.inc.php +$permissiontoadd = $user->hasRight('website', 'write'); // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php +$permissiontodelete = $user->hasRight('website', 'delete'); /* @@ -94,8 +94,8 @@ if ($reshook < 0) { if (empty($reshook)) { $error = 0; - $permissiontoadd = $user->rights->website->write; - $permissiontodelete = $user->rights->website->delete; + $permissiontoadd = $user->hasRight('website', 'write'); + $permissiontodelete = $user->hasRight('website', 'delete'); $backurlforlist = dol_buildpath('/website/websiteaccount_list.php', 1); // Actions cancel, add, update or delete @@ -221,8 +221,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->website->creer, 'string', '', 0, 1); - $morehtmlref.=$form->editfieldval("RefBis", 'ref_client', $object->ref_client, $object, $user->rights->website->creer, 'string', '', null, null, '', 1); + $morehtmlref.=$form->editfieldkey("RefBis", 'ref_client', $object->ref_client, $object, $user->hasRight('website', 'write'), 'string', '', 0, 1); + $morehtmlref.=$form->editfieldval("RefBis", 'ref_client', $object->ref_client, $object, $user->hasRight('website', 'write'), 'string', '', null, null, '', 1); // Thirdparty $morehtmlref.='
'.$langs->trans('ThirdParty') . ' : ' . $soc->getNomUrl(1); // Project @@ -230,7 +230,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea { $langs->load("projects"); $morehtmlref.='
'.$langs->trans('Project') . ' '; - if ($user->rights->website->creer) + if ($user->hasRight('website', 'write')) { if ($action != 'classify') { @@ -305,7 +305,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea print '
'.$langs->trans('SendMail').'
'."\n"; } - if ($user->rights->website->write) { + if ($user->hasRight('website', 'write')) { print '
'.$langs->trans("Modify").'
'."\n"; }