Skip to content

Commit d2dd107

Browse files
committed
fix: eliminazione documenti admin
1 parent c4f419f commit d2dd107

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

modules/ddt/edit.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -706,7 +706,7 @@ function caricaRighe(id_riga) {
706706
<?php
707707
// Eliminazione ddt solo se ho accesso alla sede aziendale
708708
$field_name = ($dir == 'entrata') ? 'idsede_partenza' : 'idsede_destinazione';
709-
if (in_array($record[$field_name], $user->sedi)) {
709+
if (in_array($record[$field_name], $user->sedi) || Auth::admin()) {
710710
?>
711711
<a class="btn btn-danger ask" data-backto="record-list">
712712
<i id ="elimina" class="fa fa-trash"></i> <?php echo tr('Elimina'); ?>

modules/fatture/edit.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1073,7 +1073,7 @@
10731073
<?php
10741074
// Eliminazione ddt solo se ho accesso alla sede aziendale
10751075
$field_name = ($dir == 'entrata') ? 'idsede_partenza' : 'idsede_destinazione';
1076-
if (in_array($record[$field_name], $user->sedi)) {
1076+
if (in_array($record[$field_name], $user->sedi) || Auth::admin()) {
10771077
$disabilita_eliminazione = in_array($fattura->codice_stato_fe, ['RC', 'MC', 'EC01', 'WAIT']);
10781078

10791079
echo '

0 commit comments

Comments
 (0)