mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
hecho el html de las lineas de presupuesto
This commit is contained in:
@ -114,6 +114,7 @@ class PapelGenericoModel extends \App\Models\GoBaseModel
|
||||
|
||||
->where("t1.is_deleted", 0)
|
||||
->where("t2.is_deleted", 0)
|
||||
->where("t3.active", 1)
|
||||
->where("t4.is_deleted", 0)
|
||||
->where("t4.tipo", "impresion")
|
||||
->where("t5.tipo", $tipo);
|
||||
@ -134,21 +135,34 @@ class PapelGenericoModel extends \App\Models\GoBaseModel
|
||||
|
||||
public function getGramajeComparador(string $papel_generico_nombre="", $uso="")
|
||||
{
|
||||
$tipo=$uso; // color y colorhq valen para los dos
|
||||
if($uso == 'bn')
|
||||
$tipo="negro";
|
||||
if($uso == 'bnhq')
|
||||
$tipo="negrohq";
|
||||
|
||||
$builder = $this->db
|
||||
->table($this->table . " t1")
|
||||
->select(
|
||||
"t2.gramaje AS text"
|
||||
)
|
||||
->join("lg_papel_impresion t2", "t2.papel_generico_id = t1.id", "left")
|
||||
->join("lg_maquina_papel_impresion t3", "t3.papel_impresion_id = t2.id", "left")
|
||||
->join("lg_maquinas t4", "t3.maquina_id = t4.id", "left")
|
||||
->join("lg_maquinas_tarifas_impresion t5", "t5.maquina_id = t4.id", "left")
|
||||
|
||||
->where("t1.is_deleted", 0)
|
||||
->where("t2.is_deleted", 0)
|
||||
->where("t2.isActivo", 1)
|
||||
->where("t3.active", 1)
|
||||
->where("t4.is_deleted", 0)
|
||||
->where("t4.tipo", "impresion")
|
||||
->where("t5.tipo", $tipo)
|
||||
->where("t1.nombre", $papel_generico_nombre);
|
||||
|
||||
if($uso == 'bn')
|
||||
if($uso == 'bn' || $uso == 'bnhq')
|
||||
$builder->where("t2.bn", 1);
|
||||
else if ($uso == 'color')
|
||||
else if ($uso == 'color' || $uso == 'colorhq')
|
||||
$builder->where("t2.color", 1);
|
||||
else if ($uso == 'cubierta')
|
||||
$builder->where("t2.cubierta", 1);
|
||||
|
||||
Reference in New Issue
Block a user