diff --git a/modules/addons/gofasnfeio/addonPage/outputproduct.php b/modules/addons/gofasnfeio/addonPage/outputproduct.php index 959dad6..0732e45 100644 --- a/modules/addons/gofasnfeio/addonPage/outputproduct.php +++ b/modules/addons/gofasnfeio/addonPage/outputproduct.php @@ -20,22 +20,19 @@ } $message = '
Código Salvo
'; header_remove(); - header('Location: ' . $gnfewhmcsadminurl . 'addonmodules.php?module=gofasnfeio&action=code_product&gnfe_message=' . base64_encode(urlencode($message))); + header('Location: addonmodules.php?module=gofasnfeio&action=code_product&gnfe_message=' . base64_encode(urlencode($message))); exit; } catch (\Exception $e) { $e->getMessage(); $message = '
' . $e->getMessage() . '
'; header_remove(); - header('Location: ' . $gnfewhmcsadminurl . 'addonmodules.php?module=gofasnfeio&action=code_product&gnfe_message=' . base64_encode(urlencode($message))); + header('Location: addonmodules.php?module=gofasnfeio&action=code_product&gnfe_message=' . base64_encode(urlencode($message))); exit; } } - foreach (Capsule::table('tblconfiguration')->where('setting', '=', 'gnfewhmcsadminurl')->get(['value']) as $gnfewhmcsadminurl_) { - $gnfewhmcsadminurl = $gnfewhmcsadminurl_->value; - } $nfes = []; foreach (Capsule::table('tblproducts')->orderBy('id', 'desc')->get(['id']) as $nfes_) { $nfes[] = $nfes_->id; @@ -48,10 +45,10 @@ $created_at = $product->created_at ? date('d/m/Y', strtotime($product->created_at)) : ''; $update_at = $product->update_at ? date('d/m/Y', strtotime($product->update_at)) : ''; - $html_table .= '#' . $product->id . ' + $html_table .= '#' . $product->id . ' ' . $created_at . ' ' . $update_at . ' - ' . $product->name . ' + ' . $product->name . '
@@ -61,8 +58,8 @@ } echo ' - NFE.io - Sistema legado + NFE.io + Sistema legado
diff --git a/modules/addons/gofasnfeio/addonPage/outputsystemlegacy.php b/modules/addons/gofasnfeio/addonPage/outputsystemlegacy.php index 6520eb6..d7bc558 100644 --- a/modules/addons/gofasnfeio/addonPage/outputsystemlegacy.php +++ b/modules/addons/gofasnfeio/addonPage/outputsystemlegacy.php @@ -4,13 +4,10 @@ } use WHMCS\Database\Capsule; - foreach (Capsule::table('tblconfiguration')->where('setting', '=', 'gnfewhmcsadminurl')->get(['value']) as $gnfewhmcsadminurl_) { - $gnfewhmcsadminurl = $gnfewhmcsadminurl_->value; - } ?>
- Código de Serviços - NFE.io + Código de Serviços + NFE.io
+ $html_table .= ' - +
#' . $value->invoice_id . '
#' . $value->invoice_id . ' ' . date('d/m/Y', strtotime($value->created_at)) . '' . $client['fullname'] . '' . $client['fullname'] . ' ' . number_format($value->services_amount, 2, ',', '.') . ' ' . $status . ' - + - - '; + + '; } if ((int) $nfes_total > 0) { echo ' - Código de Serviços - Sistema legado - Testar conexão + Código de Serviços + Sistema legado + Testar conexão

Listagem de notas fiscais

' . $nfes_total . ' Itens encontrados.
Exibindo de ' . $nfes_from . ' a ' . $nfes_to . '. Página ' . $nfes_page . ' de ' . $nfes_pages . '
@@ -192,8 +189,8 @@ function gofasnfeio_output($vars) { '; } else { echo ' - Código de Serviços - Sistema legado + Código de Serviços + Sistema legado

Nenhuma nota fiscal gerada até o momento

'; @@ -207,14 +204,14 @@ function gofasnfeio_output($vars) { if ($queue !== 'success') { $message = '
Erro ao salvar nota fiscal no DB: ' . $queue . '
'; header_remove(); - header('Location: ' . $gnfewhmcsadminurl . 'addonmodules.php?module=gofasnfeio&gnfe_message=' . base64_encode(urlencode($message))); + header('Location: addonmodules.php?module=gofasnfeio&gnfe_message=' . base64_encode(urlencode($message))); exit; } if ($queue === 'success') { $message = '
Nota fiscal enviada para processamento
'; header_remove(); - header('Location: ' . $gnfewhmcsadminurl . 'addonmodules.php?module=gofasnfeio&gnfe_message=' . base64_encode(urlencode($message))); + header('Location: addonmodules.php?module=gofasnfeio&gnfe_message=' . base64_encode(urlencode($message))); exit; } @@ -222,7 +219,7 @@ function gofasnfeio_output($vars) { if ($queue !== 'success') { $message = '
Erro ao salvar nota fiscal no DB: ' . 'nota fiscal já solicitada' . '
'; header_remove(); - header('Location: ' . $gnfewhmcsadminurl . 'addonmodules.php?module=gofasnfeio&gnfe_message=' . base64_encode(urlencode($message))); + header('Location: addonmodules.php?module=gofasnfeio&gnfe_message=' . base64_encode(urlencode($message))); exit; } @@ -234,14 +231,14 @@ function gofasnfeio_output($vars) { $gnfe_update_nfe = gnfe_update_nfe((object) ['id' => $_REQUEST['gnfe_cancel'], 'status' => 'Cancelled', 'servicesAmount' => $_REQUEST['services_amount'], 'environment' => $_REQUEST['environment'], 'flow_status' => $_REQUEST['flow_status']], $_REQUEST['user_id'], $_REQUEST['invoice_id'], 'n/a', $_REQUEST['created_at'], date('Y-m-d H:i:s')); $message = '
Nota fiscal cancelada com sucesso
'; header_remove(); - header('Location: ' . $gnfewhmcsadminurl . 'addonmodules.php?module=gofasnfeio&gnfe_message=' . base64_encode(urlencode($message))); + header('Location: addonmodules.php?module=gofasnfeio&gnfe_message=' . base64_encode(urlencode($message))); exit; } if ($delete_nfe->message) { $message = '
' . $delete_nfe->message . '
'; header_remove(); - header('Location: ' . $gnfewhmcsadminurl . 'addonmodules.php?module=gofasnfeio&gnfe_message=' . base64_encode(urlencode($message))); + header('Location: addonmodules.php?module=gofasnfeio&gnfe_message=' . base64_encode(urlencode($message))); exit; } @@ -251,14 +248,14 @@ function gofasnfeio_output($vars) { if (!$gnfe_email->message) { $message = '
Email Enviado com Sucesso
'; header_remove(); - header('Location: ' . $gnfewhmcsadminurl . 'addonmodules.php?module=gofasnfeio&gnfe_message=' . base64_encode(urlencode($message))); + header('Location: addonmodules.php?module=gofasnfeio&gnfe_message=' . base64_encode(urlencode($message))); exit; } if ($gnfe_email->message) { $message = '
' . $gnfe_email->message . '
'; header_remove(); - header('Location: ' . $gnfewhmcsadminurl . 'addonmodules.php?module=gofasnfeio&gnfe_message=' . base64_encode(urlencode($message))); + header('Location: addonmodules.php?module=gofasnfeio&gnfe_message=' . base64_encode(urlencode($message))); exit; }