Skip to content

[BUG] Cancelar Pedido #180

@souzadavi

Description

@souzadavi

Ao cancelar um pedido e o mesmo não ter uma nota fiscal atrelada a ele, o WHMCS gera um erro.

Para reproduzor o erro, configure o modulo da NFE para gerar a nota fiscal apenas após o pagamento.

Crie um pedido, acesse o pedido que contenha uma fatura aberta, cancele o pedido.

NFeObjectNotFound: service_invoice: não encontrado. in /www/wwwroot/cliente/modules/addons/NFEioServiceInvoices/lib/vendor/nfe/nfe/lib/NFe/APIResource.php:109
Stack trace:
#0 /www/wwwroot/cliente/modules/addons/NFEioServiceInvoices/lib/vendor/nfe/nfe/lib/NFe/ServiceInvoice.php(12): NFe_APIResource::fetchAPI()
#1 /www/wwwroot/cliente/modules/addons/NFEioServiceInvoices/lib/NFEio/Nfe.php(853): NFe_ServiceInvoice::fetch()
#2 /www/wwwroot/cliente/modules/addons/NFEioServiceInvoices/lib/Legacy/Hooks.php(34): NFEioServiceInvoices\NFEio\Nfe->cancelNfSeriesByInvoiceId()
#3 /www/wwwroot/cliente/modules/addons/NFEioServiceInvoices/hooks.php(51): NFEioServiceInvoices\Legacy\Hooks->invoicecancelled()
#4 [internal function]: WHMCS\Utility\SafeInclude::{closure}()
#5 /www/wwwroot/cliente/vendor/whmcs/whmcs-foundation/lib/Hook/Manager.php(0): call_user_func()
#6 /www/wwwroot/cliente/vendor/illuminate/support/Facades/Facade.php(261): WHMCS\Hook\Manager->run()
#7 /www/wwwroot/clientel/includes/functions.php(0): Illuminate\Support\Facades\Facade::__callStatic()
#8 /www/wwwroot/cliente/includes/orderfunctions.php(0): run_hook()
#9 /www/wwwroot/cliente/extra/orders.php(0): changeOrderStatus()
#10 {main}

Metadata

Metadata

Labels

bugSomething isn't working

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions