update code toward php8 compliance
This commit is contained in:
parent
7d018797d0
commit
7732fabd80
@ -64,7 +64,7 @@ if (!isModEnabled('accounting')) {
|
|||||||
if ($user->socid > 0) {
|
if ($user->socid > 0) {
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
}
|
}
|
||||||
if (empty($user->rights->accounting->fiscalyear->write)) {
|
if (!$user->hasRight('accounting', 'fiscalyear', 'write')) {
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -44,7 +44,7 @@ if (!isModEnabled('accounting')) {
|
|||||||
if ($user->socid > 0) {
|
if ($user->socid > 0) {
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
}
|
}
|
||||||
if (empty($user->rights->accounting->mouvements->lire)) {
|
if (!$user->hasRight('accounting', 'mouvements', 'lire')) {
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -54,7 +54,7 @@ if (empty($user->rights->accounting->mouvements->lire)) {
|
|||||||
* Actions
|
* Actions
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if ($action == 'ventil' && $user->rights->accounting->bind->write) {
|
if ($action == 'ventil' && $user->hasRight('accounting', 'bind', 'write')) {
|
||||||
if (!$cancel) {
|
if (!$cancel) {
|
||||||
if ($codeventil < 0) {
|
if ($codeventil < 0) {
|
||||||
$codeventil = 0;
|
$codeventil = 0;
|
||||||
|
|||||||
@ -47,7 +47,7 @@ if (!isModEnabled('accounting')) {
|
|||||||
if ($user->socid > 0) {
|
if ($user->socid > 0) {
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
}
|
}
|
||||||
if (empty($user->rights->accounting->bind->write)) {
|
if ($user->hasRight('accounting', 'bind', 'write')) {
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -84,7 +84,7 @@ if (!isModEnabled('accounting')) {
|
|||||||
if ($user->socid > 0) {
|
if ($user->socid > 0) {
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
}
|
}
|
||||||
if (empty($user->rights->accounting->mouvements->lire)) {
|
if (!$user->hasRight('accounting', 'mouvements', 'lire')) {
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -93,7 +93,7 @@ if (empty($user->rights->accounting->mouvements->lire)) {
|
|||||||
* Actions
|
* Actions
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (($action == 'clean' || $action == 'validatehistory') && $user->rights->accounting->bind->write) {
|
if (($action == 'clean' || $action == 'validatehistory') && $user->hasRight('accounting', 'bind', 'write')) {
|
||||||
// Clean database by removing binding done on non existing or no more existing accounts
|
// Clean database by removing binding done on non existing or no more existing accounts
|
||||||
$db->begin();
|
$db->begin();
|
||||||
$sql1 = "UPDATE ".MAIN_DB_PREFIX."facturedet as fd";
|
$sql1 = "UPDATE ".MAIN_DB_PREFIX."facturedet as fd";
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user