Bloccata rimozione allegati FE se fattura non è generabile

This commit is contained in:
MatteoPistorello 2022-01-13 11:56:12 +01:00
parent f61ace0c7f
commit 1d7a2b73e8
2 changed files with 5 additions and 3 deletions

View File

@ -798,7 +798,7 @@ if ($dir == 'uscita' && $fattura->isFE()) {
}
?>
{( "name": "filelist_and_upload", "id_module": "$id_module$", "id_record": "$id_record$" )}
{( "name": "filelist_and_upload", "id_module": "$id_module$", "id_record": "$id_record$", "abilita_genera": "<?php echo $abilita_genera; ?>" )}
<?php
if ($dir == 'entrata') {

View File

@ -168,12 +168,14 @@ class FileManager implements ManagerInterface
$result .= '
<button type="button" class="btn btn-xs btn-warning" onclick="modificaAllegato(this)">
<i class="fa fa-edit"></i>
</button>
</button>';
if (!$file->isFatturaElettronica() || $options['abilita_genera']) {
$result .= '
<button type="button" class="btn btn-xs btn-danger" onclick="rimuoviAllegato(this)">
<i class="fa fa-trash"></i>
</button>';
}
}
$result .= '
</td>