mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
finalizado servicios encuadernado
This commit is contained in:
@ -17,6 +17,8 @@ class TarifaEncuadernacionModel extends \App\Models\GoBaseModel
|
||||
1 => "t1.precio_min",
|
||||
2 => "t1.importe_fijo",
|
||||
3 => "t1.mostrar_en_presupuesto",
|
||||
4 => "t1.tipo_encuadernacion",
|
||||
5 => "t1.servicio_encuadernacion",
|
||||
|
||||
];
|
||||
|
||||
@ -25,6 +27,8 @@ class TarifaEncuadernacionModel extends \App\Models\GoBaseModel
|
||||
"precio_min",
|
||||
"importe_fijo",
|
||||
"mostrar_en_presupuesto",
|
||||
"tipo_encuadernacion",
|
||||
"servicio_encuadernacion",
|
||||
"deleted_at",
|
||||
"is_deleted",
|
||||
"user_created_id",
|
||||
@ -82,7 +86,8 @@ class TarifaEncuadernacionModel extends \App\Models\GoBaseModel
|
||||
public function getResource(string $search = "")
|
||||
{
|
||||
$builder = $this->db->table($this->table . " t1")->select("t1.id AS id, t1.nombre AS nombre,
|
||||
t1.precio_min AS precio_min, t1.importe_fijo AS importe_fijo, t1.mostrar_en_presupuesto AS mostrar_en_presupuesto");
|
||||
t1.precio_min AS precio_min, t1.importe_fijo AS importe_fijo, t1.mostrar_en_presupuesto AS mostrar_en_presupuesto,
|
||||
t1.tipo_encuadernacion AS tipo_encuadernacion, t1.servicio_encuadernacion AS servicio_encuadernacion");
|
||||
|
||||
//JJO
|
||||
$builder->where("t1.is_deleted", 0);
|
||||
@ -106,7 +111,23 @@ class TarifaEncuadernacionModel extends \App\Models\GoBaseModel
|
||||
"t1.id as value, t1.nombre AS label"
|
||||
)
|
||||
->where("t1.is_deleted", 0)
|
||||
->where("t1.mostrar_en_presupuesto", 1);
|
||||
->where("t1.servicio_encuadernacion", 1);
|
||||
|
||||
return $builder->orderBy("t1.nombre", "asc")->get()->getResultObject();
|
||||
}
|
||||
|
||||
public function getNombreTarifaEncuadernacion($id=-1)
|
||||
{
|
||||
/*
|
||||
Todos los servicios de encuadernacion activas que se pueden usar en presupuestos
|
||||
*/
|
||||
$builder = $this->db
|
||||
->table($this->table . " t1")
|
||||
->select(
|
||||
"t1.nombre AS nombre"
|
||||
)
|
||||
->where("t1.id", $id)
|
||||
->where("t1.is_deleted", 0);
|
||||
|
||||
return $builder->orderBy("t1.nombre", "asc")->get()->getResultObject();
|
||||
}
|
||||
@ -127,7 +148,7 @@ class TarifaEncuadernacionModel extends \App\Models\GoBaseModel
|
||||
->join("tarifa_encuadernacion_dimensiones t4", "t3.dimensiones_id = t4.id", "left")
|
||||
->join("lg_proveedores t5", "t2.proveedor_id = t5.id", "left")
|
||||
->where("t1.is_deleted", 0)
|
||||
->where("t1.mostrar_en_presupuesto", 1)
|
||||
//->where("t1.mostrar_en_presupuesto", 1)
|
||||
->where("t2.is_deleted", 0)
|
||||
->where("t3.is_deleted", 0);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user