trabajando2

This commit is contained in:
2025-07-18 17:56:39 +02:00
parent f73472c729
commit ad8e0ac75b
5 changed files with 149 additions and 0 deletions

View File

@ -301,6 +301,53 @@ class Papelesgenericos extends \App\Controllers\BaseResourceController
}
}
public function getTipoPapelCliente(){
if($this->request->isAJAX()) {
$data_input = $this->request->getGet();
$result = $this->papelService->getTiposPalelGenerico((object)$data_input);
/*
$tirada = goSanitize($this->request->getGet('tirada'))[0] ?? null;
$POD = null;
if ($tirada != null) {
$POD_value = model('App\Models\Configuracion\ConfigVariableModel')->getVariable('POD')->value;
if (intval($tirada) <= intval($POD_value)) {
$POD = true;
} else {
$POD = false;
}
}
$tipo = goSanitize($this->request->getGet('tipo'))[0];
$selected_papel = goSanitize($this->request->getGet('papel'))[0] ?? null;
$cubierta = goSanitize($this->request->getGet('cubierta'))[0] ?? 0;
$tapa_dura = goSanitize($this->request->getGet('tapa_dura'))[0] ?? null;
$sobrecubierta = goSanitize($this->request->getGet('sobrecubierta'))[0] ?? 0;
$guardas = goSanitize($this->request->getGet('guardas'))[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);
$anchoLibro = $ancho;
if(intval($cubierta) == 1 || intval($sobrecubierta) == 1){
$anchoLibro = 2 * $ancho + 2 * $solapas + $lomo;
}
$menu = $this->model->getPapelCliente($tipo, $cubierta, $sobrecubierta, $guardas, $selected_papel, $tapa_dura, false, $POD, $anchoLibro, $alto, $tirada);
*/
return $this->respond($result);
} else {
return $this->failUnauthorized('Invalid request', 403);
}
}
public function getPapelCliente()
{
if ($this->request->isAJAX()) {