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(); }