mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
añadido que si no es pod busca papel rotativa para color y negro
This commit is contained in:
@ -298,13 +298,24 @@ class Papelesgenericos extends \App\Controllers\BaseResourceController
|
||||
{
|
||||
if ($this->request->isAJAX()) {
|
||||
|
||||
$tirada = goSanitize($this->request->getGet('tirada'))[0] ?? null;
|
||||
$POD = null;
|
||||
if($tirada != null){
|
||||
$POD_value = model('App\Models\Configuracion\ConfiguracionSistemaModel')->getPOD();
|
||||
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;
|
||||
|
||||
$menu = $this->model->getPapelCliente($tipo, $cubierta, $selected_papel, $tapa_dura, false);
|
||||
$menu2 = $this->model->getPapelCliente($tipo, $cubierta, $selected_papel, $tapa_dura, true);
|
||||
$menu = $this->model->getPapelCliente($tipo, $cubierta, $selected_papel, $tapa_dura, false, $POD);
|
||||
$menu2 = $this->model->getPapelCliente($tipo, $cubierta, $selected_papel, $tapa_dura, true, $POD);
|
||||
|
||||
$newTokenHash = csrf_hash();
|
||||
$csrfTokenName = csrf_token();
|
||||
@ -325,10 +336,21 @@ class Papelesgenericos extends \App\Controllers\BaseResourceController
|
||||
|
||||
if ($this->request->isAJAX()) {
|
||||
|
||||
$tirada = goSanitize($this->request->getGet('tirada'))[0] ?? null;
|
||||
$POD = null;
|
||||
if($tirada != null){
|
||||
$POD_value = model('App\Models\Configuracion\ConfiguracionSistemaModel')->getPOD();
|
||||
if(intval($tirada) <= intval($POD_value)){
|
||||
$POD = true;
|
||||
}
|
||||
else{
|
||||
$POD = false;
|
||||
}
|
||||
}
|
||||
$tipo = goSanitize($this->request->getGet('tipo'))[0];
|
||||
$cubierta = goSanitize($this->request->getGet('cubierta'))[0] ?? 0;
|
||||
|
||||
$items = $this->model->getPapelCliente($tipo, $cubierta, null, true);
|
||||
$items = $this->model->getPapelCliente($tipo, $cubierta, null, true, $POD);
|
||||
$items = array_map(function ($item) {
|
||||
return [
|
||||
'id' => $item->id,
|
||||
|
||||
Reference in New Issue
Block a user