modificados todos los buscadores de papeles y gramajes para ver el alto y el ancho (admin y cliente)

This commit is contained in:
2025-01-28 18:47:20 +01:00
parent 2df3f5914e
commit e87e278dd0
8 changed files with 249 additions and 25 deletions

View File

@ -314,8 +314,15 @@ class Papelesgenericos extends \App\Controllers\BaseResourceController
$cubierta = goSanitize($this->request->getGet('cubierta'))[0] ?? 0;
$tapa_dura = goSanitize($this->request->getGet('tapa_dura'))[0] ?? null;
$menu = $this->model->getPapelCliente($tipo, $cubierta, $selected_papel, $tapa_dura, false, $POD);
$menu2 = $this->model->getPapelCliente($tipo, $cubierta, $selected_papel, $tapa_dura, true, $POD);
$ancho = floatval($this->request->getGet('ancho') ?? 0);
$alto = floatval($this->request->getGet('alto') ?? 0);
$solapas = floatval($this->request->getGet('solapas') ?? 0);
$lomo = floatval($this->request->getGet('lomo') ?? 0);
$anchoLibro = 2* $ancho + 2 * $solapas + $lomo;
$menu = $this->model->getPapelCliente($tipo, $cubierta, $selected_papel, $tapa_dura, false, $POD, $anchoLibro, $alto, $tirada);
$menu2 = $this->model->getPapelCliente($tipo, $cubierta, $selected_papel, $tapa_dura, true, $POD, $anchoLibro, $alto, $tirada);
$newTokenHash = csrf_hash();
$csrfTokenName = csrf_token();
@ -349,8 +356,17 @@ class Papelesgenericos extends \App\Controllers\BaseResourceController
}
$tipo = goSanitize($this->request->getGet('tipo'))[0];
$cubierta = goSanitize($this->request->getGet('cubierta'))[0] ?? 0;
$ancho = floatval($this->request->getGet('ancho') ?? 0);
$alto = floatval($this->request->getGet('alto') ?? 0);
$solapas = floatval($this->request->getGet('solapas') ?? 0);
$lomo = floatval($this->request->getGet('lomo') ?? 0);
$items = $this->model->getPapelCliente($tipo, $cubierta, null, true, $POD);
$tapa_dura = $this->request->getGet('tapa_dura') ?? 0;
$anchoLibro = 2* $ancho + 2 * $solapas + $lomo;
$items = $this->model->getPapelCliente($tipo, $cubierta, null, $tapa_dura, true, $POD, $anchoLibro, $alto, $tirada);
$items = array_map(function ($item) {
return [
'id' => $item->id,