falta terminar albaranes

This commit is contained in:
2025-04-20 22:10:56 +02:00
parent 61abcb3dbd
commit 19fd76e910
21 changed files with 1731 additions and 464 deletions

View File

@ -163,7 +163,6 @@ class LogisticaController extends BaseController
if (empty($envioEntity)) {
return redirect()->to(base_url('logistica/selectEnvios/simple'))->with('error', lang('Logistica.errors.noEnvio'));
}
$envioEntity->nextCaja = model('App\Models\Logistica\EnvioLineaModel')->getMaxCaja();
$viewData = [
'currentModule' => static::$controllerSlug,
@ -177,6 +176,23 @@ class LogisticaController extends BaseController
return view(static::$viewPath . 'viewEnvioEditForm', $viewData);
}
public function updateCajasEnvio()
{
if ($this->request->isAJAX()) {
$id = $this->request->getPost('id');
$cajas = $this->request->getPost('cajas');
$model = model('App\Models\Logistica\EnvioModel');
$result = $model->update($id, [
'cajas' => $cajas,
]);
return $this->response->setJSON([
"status" => $result,
]);
} else {
return $this->failUnauthorized('Invalid request', 403);
}
}
public function datatable_enviosEdit($idEnvio)
{
$model = model('App\Models\Logistica\EnvioLineaModel');