From 8a8092ed101117c0314ab194dea182cd7f622119 Mon Sep 17 00:00:00 2001 From: Dasc3er Date: Fri, 20 Nov 2020 16:54:40 +0100 Subject: [PATCH] Correzione minore stato FE --- plugins/exportFE/src/Interaction.php | 4 ++-- plugins/exportFE/src/InvoiceHook.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/exportFE/src/Interaction.php b/plugins/exportFE/src/Interaction.php index 79d8d0e07..054473c62 100755 --- a/plugins/exportFE/src/Interaction.php +++ b/plugins/exportFE/src/Interaction.php @@ -40,9 +40,9 @@ class Interaction extends Services 'filename' => $fattura->getFilename(), ]); $body = static::responseBody($response); - + // Aggiornamento dello stato - if ($body['status'] == 200) { + if ($body['status'] == 200 || $body['status'] == 301) { database()->update('co_documenti', [ 'codice_stato_fe' => 'WAIT', 'data_stato_fe' => date('Y-m-d H:i:s'), diff --git a/plugins/exportFE/src/InvoiceHook.php b/plugins/exportFE/src/InvoiceHook.php index e08f627ba..a1b69444d 100755 --- a/plugins/exportFE/src/InvoiceHook.php +++ b/plugins/exportFE/src/InvoiceHook.php @@ -50,7 +50,7 @@ class InvoiceHook extends Manager $result = Interaction::sendInvoice($fattura->id); - if ($result['code'] == 200) { + if ($result['code'] == 200 || $result['code'] == 301) { $fattura->hook_send = false; $fattura->save(); }