';
if ($_REQUEST['gnfe_error']) {
diff --git a/modules/addons/gofasnfeio/output.php b/modules/addons/gofasnfeio/output.php
index b20f806..c9b17fa 100644
--- a/modules/addons/gofasnfeio/output.php
+++ b/modules/addons/gofasnfeio/output.php
@@ -6,9 +6,6 @@
function gofasnfeio_output($vars) {
require_once __DIR__ . '/functions.php';
$params = gnfe_config();
- foreach (Capsule::table('tblconfiguration')->where('setting', '=', 'gnfewhmcsadminurl')->get(['value']) as $gnfewhmcsadminurl_) {
- $gnfewhmcsadminurl = $gnfewhmcsadminurl_->value;
- }
if ($_GET['action'] === 'code_product') {
require_once __DIR__ . '/addonPage/outputproduct.php';
@@ -81,7 +78,7 @@ function gofasnfeio_output($vars) {
$tag = 'a ';
$a_style = '';
$li_class = 'class="enabled"';
- $href = $gnfewhmcsadminurl . 'addonmodules.php?module=gofasnfeio&page=' . $page_num;
+ $href = 'addonmodules.php?module=gofasnfeio&page=' . $page_num;
} elseif ((int) $page_num === (int) $nfes_page) {
$tag = 'span ';
$a_style = 'style="background: #337ab7; color: #fff"';
@@ -96,7 +93,7 @@ function gofasnfeio_output($vars) {
$preview_tag = 'span ';
} else {
$preview_class = ' class="previous" ';
- $preview_href = ' href="' . $gnfewhmcsadminurl . 'addonmodules.php?module=gofasnfeio&page=' . ($nfes_page - 1) . '" ';
+ $preview_href = ' href="addonmodules.php?module=gofasnfeio&page=' . ($nfes_page - 1) . '" ';
$preview_tag = 'a ';
}
if ((int) $nfes_page === (int) $nfes_pages) {
@@ -105,7 +102,7 @@ function gofasnfeio_output($vars) {
$next_tag = 'span ';
} else {
$next_class = ' class="next" ';
- $next_href = ' href="' . $gnfewhmcsadminurl . 'addonmodules.php?module=gofasnfeio&page=' . ($nfes_page + 1) . '" ';
+ $next_href = ' href="addonmodules.php?module=gofasnfeio&page=' . ($nfes_page + 1) . '" ';
$next_tag = 'a ';
}
$pagination .= '
<' . $preview_tag . ' ' . $preview_href . '>« Página anterior' . $preview_tag . '>';
@@ -146,25 +143,25 @@ function gofasnfeio_output($vars) {
$status = '
Nenhum';
$disabled = ['a' => '', 'b' => '', 'c' => 'disabled="disabled"', 'd' => 'disabled="disabled"'];
}
- $html_table .= '
#' . $value->invoice_id . ' |
+ $html_table .= '
#' . $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;
}
|