tabajando

This commit is contained in:
2025-04-23 17:22:12 +02:00
parent b5b4d6b026
commit e0916b567c
4 changed files with 53 additions and 14 deletions

View File

@ -206,7 +206,8 @@ class LogisticaController extends BaseController
{
if ($this->request->isAJAX()) {
$id = $this->request->getPost('id');
$id = $this->request->getPost('id') ?? null;
$finalizar_ots = $this->request->getPost('finalizar_ots') ?? false;
$result = LogisticaService::finalizarEnvio($id);
return $this->response->setJSON($result);
@ -215,6 +216,20 @@ class LogisticaController extends BaseController
}
}
public function finalizarEnvioYOts()
{
if ($this->request->isAJAX()) {
$id = $this->request->getPost('id') ?? null;
$finalizar_ots = $this->request->getPost('finalizar_ots') ?? false;
$result = LogisticaService::finalizarEnvio($id, $finalizar_ots);
return $this->response->setJSON($result);
} else {
return $this->failUnauthorized('Invalid request', 403);
}
}
public function datatable_enviosEdit($idEnvio)
{
$model = model('App\Models\Logistica\EnvioLineaModel');