From f5eae49e0afdca70234a9da4215b8ef96cd6dd43 Mon Sep 17 00:00:00 2001 From: Thomas Zilio Date: Mon, 2 Sep 2019 09:57:58 +0200 Subject: [PATCH] Fix minori (#643) --- assets/src/css/style.css | 4 ++++ modules/fatture/actions.php | 8 ++++---- modules/iva/add.php | 4 ++-- modules/iva/edit.php | 4 ++-- plugins/exportFE/src/FatturaElettronica.php | 4 ++++ 5 files changed, 16 insertions(+), 8 deletions(-) diff --git a/assets/src/css/style.css b/assets/src/css/style.css index b52dc110c..d84979b6a 100644 --- a/assets/src/css/style.css +++ b/assets/src/css/style.css @@ -885,3 +885,7 @@ input.small-width { max-width: 100px; max-height: 100px; } + +.has-feedback .form-control{ + padding-right: 6px; +} diff --git a/modules/fatture/actions.php b/modules/fatture/actions.php index fdb7447b4..78bb1c6c7 100644 --- a/modules/fatture/actions.php +++ b/modules/fatture/actions.php @@ -123,9 +123,9 @@ switch (post('op')) { aggiungi_movimento($id_record, $dir); } - if ($stato_precedente->descrizione == 'Bozza' && $stato['descrizione'] == 'Emessa'){ + if ($stato_precedente->descrizione == 'Bozza' && $stato['descrizione'] == 'Emessa') { // Generazione numero fattura se non presente - if(empty($fattura->numero_esterno)){ + if (empty($fattura->numero_esterno)) { $fattura->numero_esterno = Fattura::getNextNumeroSecondario($fattura->data, $fattura->direzione, $fattura->id_segment); $fattura->save(); } @@ -133,7 +133,7 @@ switch (post('op')) { // Generazione automatica della Fattura Elettronica $stato_fe = empty($fattura->codice_stato_fe) || in_array($fattura->codice_stato_fe, ['GEN', 'NS', 'EC02']); $checks = FatturaElettronica::controllaFattura($fattura); - if($stato_fe && empty($checks)) { + if ($stato_fe && empty($checks)) { try { $fattura_pa = new FatturaElettronica($id_record); $file = $fattura_pa->save(DOCROOT.'/'.FatturaElettronica::getDirectory()); @@ -149,7 +149,7 @@ switch (post('op')) { } } catch (UnexpectedValueException $e) { } - } else if(!empty($checks)){ + } elseif (!empty($checks)) { $message = tr('La fattura elettronica non รจ stata generata a causa di alcune informazioni mancanti').':'; foreach ($checks as $check) { diff --git a/modules/iva/add.php b/modules/iva/add.php index 07085e052..3faeccec8 100644 --- a/modules/iva/add.php +++ b/modules/iva/add.php @@ -22,12 +22,12 @@ include_once __DIR__.'/../../core.php';
- {[ "type": "number", "label": "", "name": "percentuale", "id": "percentuale-add", "icon-after": "" ]} + {[ "type": "number", "label": "", "name": "percentuale", "id": "percentuale-add", "icon-after": "", "max-value": "100" ]}
- {[ "type": "number", "label": "", "name": "indetraibile", "icon-after": "" ]} + {[ "type": "number", "label": "", "name": "indetraibile", "icon-after": "", "max-value": "100" ]}
diff --git a/modules/iva/edit.php b/modules/iva/edit.php index d963f89dc..b12dc2599 100644 --- a/modules/iva/edit.php +++ b/modules/iva/edit.php @@ -52,11 +52,11 @@ if ($res) {
- {[ "type": "number", "label": "", "name": "percentuale", "id": "percentuale-edit", "value": "$percentuale$", "icon-after": "", "disabled": , "readonly": "", "extra": "" ]} + {[ "type": "number", "label": "", "name": "percentuale", "id": "percentuale-edit", "value": "$percentuale$", "icon-after": "", "disabled": , "readonly": "", "extra": "", "max-value": "100" ]}
- {[ "type": "number", "label": "", "name": "indetraibile", "value": "$indetraibile$", "icon-after": "", "readonly": "", "extra": "" ]} + {[ "type": "number", "label": "", "name": "indetraibile", "value": "$indetraibile$", "icon-after": "", "readonly": "", "extra": "", "max-value": "100" ]}
diff --git a/plugins/exportFE/src/FatturaElettronica.php b/plugins/exportFE/src/FatturaElettronica.php index 86dc654b3..db98ebd18 100644 --- a/plugins/exportFE/src/FatturaElettronica.php +++ b/plugins/exportFE/src/FatturaElettronica.php @@ -923,6 +923,10 @@ class FatturaElettronica $result = []; foreach ($lista as $element) { + if (empty($element['id_documento'])) { + continue; + } + $dati = []; foreach ($element['riferimento_linea'] as $linea) {