1
0
mirror of https://github.com/devcode-it/openstamanager.git synced 2024-12-22 21:28:08 +01:00

Blocco pulsante Genera per FE

This commit is contained in:
Thomas Zilio 2019-07-16 12:27:36 +02:00
parent ac8d7883f5
commit 631a588fe3

View File

@ -6,6 +6,8 @@ use Modules\Anagrafiche\Anagrafica;
use Plugins\ExportFE\FatturaElettronica;
use Plugins\ExportFE\Interaction;
$abilita_genera = empty($fattura->codice_stato_fe) || in_array($fattura->codice_stato_fe, ['GEN', 'NS', 'EC02']);
if (!empty($fattura_pa)) {
$disabled = false;
$generated = $fattura_pa->isGenerated();
@ -154,7 +156,7 @@ echo '
<input type="hidden" name="backto" value="record-edit">
<input type="hidden" name="op" value="generate">
<button id="genera" type="submit" class="btn btn-primary btn-lg '.($disabled ? 'disabled' : '').'" '.($disabled ? ' disabled' : null).'>
<button id="genera" type="submit" class="btn btn-primary btn-lg '.($disabled || !$abilita_genera ? 'disabled' : '').'" '.($disabled || !$abilita_genera ? ' disabled' : null).'>
<i class="fa fa-file"></i> '.tr('Genera').'
</button>
</form>';