1
0
mirror of https://github.com/devcode-it/openstamanager.git synced 2025-06-05 22:09:38 +02: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\FatturaElettronica;
use Plugins\ExportFE\Interaction; use Plugins\ExportFE\Interaction;
$abilita_genera = empty($fattura->codice_stato_fe) || in_array($fattura->codice_stato_fe, ['GEN', 'NS', 'EC02']);
if (!empty($fattura_pa)) { if (!empty($fattura_pa)) {
$disabled = false; $disabled = false;
$generated = $fattura_pa->isGenerated(); $generated = $fattura_pa->isGenerated();
@@ -154,7 +156,7 @@ echo '
<input type="hidden" name="backto" value="record-edit"> <input type="hidden" name="backto" value="record-edit">
<input type="hidden" name="op" value="generate"> <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').' <i class="fa fa-file"></i> '.tr('Genera').'
</button> </button>
</form>'; </form>';