terminado lineas de presupuesto

This commit is contained in:
Jaime Jiménez Ortega
2023-11-10 13:18:02 +01:00
parent 397d69f823
commit 75eb95b040
10 changed files with 1347 additions and 224 deletions

View File

@ -93,7 +93,7 @@ class PapelGenericoModel extends \App\Models\GoBaseModel
}
public function getPapelForComparador($tipo, $is_cubierta = null, $is_sobrecubierta = null)
public function getPapelForComparador($tipo, $is_cubierta = null, $is_sobrecubierta = null, $rotativa = null)
{
/*
1.-> Tipo impresion
@ -124,12 +124,19 @@ class PapelGenericoModel extends \App\Models\GoBaseModel
$builder->where("t2.cubierta", 1);
}
}
if(!is_null($is_sobrecubierta)){
if($is_sobrecubierta==true){
$builder->where("t2.sobrecubierta", 1);
}
}
if(!is_null($rotativa)){
if($rotativa==true){
$builder->where("t2.rotativa", 1);
}
}
return $builder->orderBy("t1.nombre", "asc")->get()->getResultObject();
}
@ -162,15 +169,23 @@ class PapelGenericoModel extends \App\Models\GoBaseModel
->where("t4.tipo", "impresion")
->where("t5.tipo", $tipo)
->where("t1.nombre", $papel_generico_nombre);
$uso_tarifa = 'interior';
if($uso == 'bn' || $uso == 'bnhq')
$builder->where("t2.bn", 1);
else if ($uso == 'color' || $uso == 'colorhq')
$builder->where("t2.color", 1);
else if ($uso == 'cubierta')
else if ($uso == 'cubierta'){
$uso_tarifa = 'cubierta';
$builder->where("t2.cubierta", 1);
else if ($uso == 'sobrecubierta')
}
else if ($uso == 'sobrecubierta'){
$uso_tarifa = 'sobrecubierta';
$builder->where("t2.sobrecubierta", 1);
}
$builder->where("t5.uso", $uso_tarifa);
$values = $builder->orderBy("t2.gramaje", "asc")->get()->getResultObject();
$id = 1;
@ -209,18 +224,26 @@ class PapelGenericoModel extends \App\Models\GoBaseModel
->where("t5.tipo", $tipo)
->where("t1.id", $papel_generico_id);
$uso_tarifa = 'interior';
if($tipo == 'negro' || $tipo == 'negrohq')
$builder->where("t2.bn", 1);
else if ($tipo == 'color' || $tipo == 'colorhq')
$builder->where("t2.color", 1);
if ($uso == 'cubierta')
if ($uso == 'cubierta'){
$uso_tarifa = 'cubierta';
$builder->where("t2.cubierta", 1);
else if ($uso == 'sobrecubierta')
}
else if ($uso == 'sobrecubierta'){
$uso_tarifa = 'sobrecubierta';
$builder->where("t2.sobrecubierta", 1);
}
if($uso=='rotativa')
$builder->where("t2.rotativa", 1);
else
$builder->where("t2.rotativa", 0);
$builder->where("t5.uso", $uso_tarifa);
$values = $builder->orderBy("t2.gramaje", "asc")->get()->getResultObject();