mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
modificados todos los buscadores de papeles y gramajes para ver el alto y el ancho (admin y cliente)
This commit is contained in:
@ -129,16 +129,16 @@ class PapelGenericoModel extends \App\Models\BaseModel
|
||||
return empty($search)
|
||||
? $builder
|
||||
: $builder
|
||||
->groupStart()
|
||||
->like("t1.id", $search)
|
||||
->orLike("t1.nombre", $search)
|
||||
->orLike("t1.code", $search)
|
||||
->orLike("t1.code_ot", $search)
|
||||
->orLike("t1.id", $search)
|
||||
->orLike("t1.nombre", $search)
|
||||
->orLike("t1.code", $search)
|
||||
->orLike("t1.code_ot", $search)
|
||||
->groupEnd();
|
||||
->groupStart()
|
||||
->like("t1.id", $search)
|
||||
->orLike("t1.nombre", $search)
|
||||
->orLike("t1.code", $search)
|
||||
->orLike("t1.code_ot", $search)
|
||||
->orLike("t1.id", $search)
|
||||
->orLike("t1.nombre", $search)
|
||||
->orLike("t1.code", $search)
|
||||
->orLike("t1.code_ot", $search)
|
||||
->groupEnd();
|
||||
}
|
||||
|
||||
|
||||
@ -149,7 +149,10 @@ class PapelGenericoModel extends \App\Models\BaseModel
|
||||
$rotativa = false,
|
||||
$is_guardas = false,
|
||||
$tapa_dura = false,
|
||||
$POD = false
|
||||
$POD = false,
|
||||
$ancho = 0,
|
||||
$alto = 0,
|
||||
$tirada = 0
|
||||
) {
|
||||
/*
|
||||
1.-> Tipo impresion
|
||||
@ -183,6 +186,8 @@ class PapelGenericoModel extends \App\Models\BaseModel
|
||||
->where("t3.active", 1)
|
||||
->where("t4.is_deleted", 0)
|
||||
->where("t4.tipo", "impresion")
|
||||
->where("t4.min <= ", $tirada)
|
||||
->where("t4.max >= ", $tirada)
|
||||
->where("t5.is_deleted", 0)
|
||||
->where("t5.tipo", $tipo)
|
||||
->distinct('t1.id');
|
||||
@ -196,6 +201,17 @@ class PapelGenericoModel extends \App\Models\BaseModel
|
||||
->where("t3_inner.active", 1);
|
||||
});
|
||||
|
||||
$builder->groupStart()
|
||||
->groupStart()
|
||||
->where("t4.ancho_impresion >", $ancho)
|
||||
->where("t4.alto_impresion >", $alto)
|
||||
->groupEnd()
|
||||
->orGroupStart()
|
||||
->where("t4.ancho_impresion >", $alto)
|
||||
->where("t4.alto_impresion >", $ancho)
|
||||
->groupEnd()
|
||||
->groupEnd();
|
||||
|
||||
if ($is_cubierta == true) {
|
||||
$builder->where("t2.cubierta", 1);
|
||||
$builder->where("t5.uso", 'cubierta');
|
||||
@ -236,7 +252,10 @@ class PapelGenericoModel extends \App\Models\BaseModel
|
||||
$rotativa = false,
|
||||
$is_guardas = false,
|
||||
$tapa_dura = false,
|
||||
$POD = false
|
||||
$POD = false,
|
||||
$ancho = 0,
|
||||
$alto = 0,
|
||||
$tirada = 0
|
||||
) {
|
||||
if ($POD == true && ($tipo == 'color' || $tipo == 'negro')) {
|
||||
if ($tipo == 'color')
|
||||
@ -264,6 +283,8 @@ class PapelGenericoModel extends \App\Models\BaseModel
|
||||
->where("t2.isActivo", 1)
|
||||
->where("t3.active", 1)
|
||||
->where("t4.is_deleted", 0)
|
||||
->where("t4.min <= ", $tirada)
|
||||
->where("t4.max >= ", $tirada)
|
||||
->where("t4.tipo", "impresion")
|
||||
->where("t5.is_deleted", 0)
|
||||
->where("t5.tipo", $tipo)
|
||||
@ -278,6 +299,17 @@ class PapelGenericoModel extends \App\Models\BaseModel
|
||||
->where("t3_inner.active", 1);
|
||||
});
|
||||
|
||||
$builder->groupStart()
|
||||
->groupStart()
|
||||
->where("t4.ancho_impresion >", $ancho)
|
||||
->where("t4.alto_impresion >", $alto)
|
||||
->groupEnd()
|
||||
->orGroupStart()
|
||||
->where("t4.ancho_impresion >", $alto)
|
||||
->where("t4.alto_impresion >", $ancho)
|
||||
->groupEnd()
|
||||
->groupEnd();
|
||||
|
||||
if ($is_cubierta == true) {
|
||||
$builder->where("t2.cubierta", 1);
|
||||
$builder->where("t5.uso", 'cubierta');
|
||||
@ -370,8 +402,17 @@ class PapelGenericoModel extends \App\Models\BaseModel
|
||||
}
|
||||
|
||||
|
||||
public function getPapelCliente($tipo, $is_cubierta = false, $selected_papel_id = null, $tapa_dura = null, $papel_especial = false, $POD = null)
|
||||
{
|
||||
public function getPapelCliente(
|
||||
$tipo,
|
||||
$is_cubierta = false,
|
||||
$selected_papel_id = null,
|
||||
$tapa_dura = null,
|
||||
$papel_especial = false,
|
||||
$POD = null,
|
||||
$ancho = 0,
|
||||
$alto = 0,
|
||||
$tirada = 0
|
||||
) {
|
||||
/*
|
||||
1.-> Tipo impresion
|
||||
2.-> Maquina
|
||||
@ -406,6 +447,8 @@ class PapelGenericoModel extends \App\Models\BaseModel
|
||||
->where("t2.use_in_client", 1)
|
||||
->where("t3.active", 1)
|
||||
->where("t4.is_deleted", 0)
|
||||
->where("t4.min <= ", $tirada)
|
||||
->where("t4.max >= ", $tirada)
|
||||
->where("t4.tipo", "impresion")
|
||||
->where("t5.is_deleted", 0)
|
||||
->where("t5.tipo", $tipo)
|
||||
@ -429,6 +472,8 @@ class PapelGenericoModel extends \App\Models\BaseModel
|
||||
->where("t2.use_in_client", 1)
|
||||
->where("t3.active", 1)
|
||||
->where("t4.is_deleted", 0)
|
||||
->where("t4.min <= ", $tirada)
|
||||
->where("t4.max >= ", $tirada)
|
||||
->where("t4.tipo", "impresion")
|
||||
->where("t5.is_deleted", 0)
|
||||
->where("t5.tipo", $tipo)
|
||||
@ -443,6 +488,17 @@ class PapelGenericoModel extends \App\Models\BaseModel
|
||||
->where("t3_inner.active", 1);
|
||||
});
|
||||
|
||||
$builder->groupStart()
|
||||
->groupStart()
|
||||
->where("t4.ancho_impresion >", $ancho)
|
||||
->where("t4.alto_impresion >", $alto)
|
||||
->groupEnd()
|
||||
->orGroupStart()
|
||||
->where("t4.ancho_impresion >", $alto)
|
||||
->where("t4.alto_impresion >", $ancho)
|
||||
->groupEnd()
|
||||
->groupEnd();
|
||||
|
||||
if ($is_cubierta == true) {
|
||||
$builder->where("t2.cubierta", 1);
|
||||
$builder->where("t5.uso", 'cubierta');
|
||||
|
||||
Reference in New Issue
Block a user