From c18339d54998099b8b1cfd68b8858a37f0e9060a Mon Sep 17 00:00:00 2001 From: Luca Date: Fri, 24 May 2019 16:31:00 +0200 Subject: [PATCH] Eccezzione elaborazione della ricevuta nel caso il nuovo codice della ricevuta sia NE --- modules/dashboard/edit.php | 8 ++++---- plugins/receiptFE/src/Ricevuta.php | 9 +++++---- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/modules/dashboard/edit.php b/modules/dashboard/edit.php index 905585471..086b49d5c 100644 --- a/modules/dashboard/edit.php +++ b/modules/dashboard/edit.php @@ -457,7 +457,7 @@ if ($vista == 'mese') { $(this).parent().parent().find('li input[type=checkbox]').each(function(i) { // loop through each checkbox this.checked = true; - $.when (session_set_array( 'dashboard,idzone', this.value, 0 )).promise().then(function() { + $.when (session_set_array( 'dashboard,idzone', this.value, 0 )).promise().then(function() { $('#calendar').fullCalendar('refetchEvents'); }); @@ -473,7 +473,7 @@ if ($vista == 'mese') { $(this).parent().parent().find('li input[type=checkbox]').each(function() { // loop through each checkbox this.checked = false; - $.when (session_set_array( 'dashboard,idstatiintervento', this.value, 1 )).promise().then(function() { + $.when (session_set_array( 'dashboard,idstatiintervento', this.value, 1 )).promise().then(function() { $('#calendar').fullCalendar('refetchEvents'); }); @@ -487,7 +487,7 @@ if ($vista == 'mese') { $(this).parent().parent().find('li input[type=checkbox]').each(function() { // loop through each checkbox this.checked = false; - $.when (session_set_array( 'dashboard,idtipiintervento', this.value, 1 )).promise().then(function() { + $.when (session_set_array( 'dashboard,idtipiintervento', this.value, 1 )).promise().then(function() { $('#calendar').fullCalendar('refetchEvents'); }); @@ -502,7 +502,7 @@ if ($vista == 'mese') { $(this).parent().parent().find('li input[type=checkbox]').each(function() { // loop through each checkbox this.checked = false; - $.when (session_set_array( 'dashboard,idtecnici', this.value, 1 )).promise().then(function() { + $.when (session_set_array( 'dashboard,idtecnici', this.value, 1 )).promise().then(function() { $('#calendar').fullCalendar('refetchEvents'); }); diff --git a/plugins/receiptFE/src/Ricevuta.php b/plugins/receiptFE/src/Ricevuta.php index e2bb6f2bd..2b687d010 100644 --- a/plugins/receiptFE/src/Ricevuta.php +++ b/plugins/receiptFE/src/Ricevuta.php @@ -108,10 +108,11 @@ class Ricevuta $fattura = $this->getFattura(); // Modifica lo stato solo se la fattura non è già stata consegnata (per evitare problemi da doppi invii) - // In realtà per le PA potrebbe esserci lo stato NE (che può essere positiva o negativa) successivo alla RC - //if ($fattura->codice_stato_fe == 'RC') { - //return; - //} + // In realtà per le PA potrebbe esserci lo stato NE (che può essere positiva o negativa) successivo alla RC, + // quindi aggiungo eccezzione nel caso il nuovo codice della ricevuta sia NE + if ($fattura->codice_stato_fe == 'RC' AND $codice != 'NE' ) { + return; + } // Processo la ricevuta e salvo data ricezione, codice e messaggio $descrizione = $this->xml['Destinatario']['Descrizione'];