mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
añadidas caracteristicas a tarifas acabados para cubierta y sobre cubierta. Añadido en el presupuesto
This commit is contained in:
@ -100,6 +100,8 @@ class PresupuestoModel extends \App\Models\GoBaseModel
|
||||
"total_descuentoPercent",
|
||||
"total_presupuesto",
|
||||
"total_precio_unidad",
|
||||
"acabado_cubierta_id",
|
||||
"acabado_sobrecubierta_id",
|
||||
];
|
||||
protected $returnType = "App\Entities\Presupuestos\PresupuestoEntity";
|
||||
|
||||
|
||||
@ -24,6 +24,8 @@ class TarifaacabadoModel extends \App\Models\GoBaseModel
|
||||
"precio_min",
|
||||
"importe_fijo",
|
||||
"mostrar_en_presupuesto",
|
||||
"acabado_cubierta",
|
||||
"acabado_sobrecubierta",
|
||||
"deleted_at",
|
||||
"is_deleted",
|
||||
"user_created_id",
|
||||
@ -81,7 +83,8 @@ class TarifaacabadoModel 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.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.acabado_cubierta AS acabado_cubierta, t1.acabado_sobrecubierta AS acabado_sobrecubierta"
|
||||
);
|
||||
|
||||
//JJO
|
||||
@ -117,7 +120,7 @@ class TarifaacabadoModel extends \App\Models\GoBaseModel
|
||||
->table($this->table . " t1")
|
||||
->select(
|
||||
"t1.id AS tarifa_acabado_id, t1.nombre AS tarifa_acabado_nombre, t1.precio_min AS tarifa_precio_min, t1.importe_fijo AS tarifa_importe_fijo,
|
||||
t2.id AS tarifa_linea_id, t2.tirada_min AS tirada_min, t2.tirada_max AS tirada_max,
|
||||
t1.acabado_cubierta AS acabado_cubierta, t1.acabado_sobrecubierta AS acabado_sobrecubierta, t2.id AS tarifa_linea_id, t2.tirada_min AS tirada_min, t2.tirada_max AS tirada_max,
|
||||
t2.precio_min AS precio_min, t2.precio_max AS precio_max, t2.margen AS margen"
|
||||
)
|
||||
->join("tarifa_acabado_lineas t2", "t1.id = t2.tarifa_acabado_id", "left")
|
||||
@ -148,4 +151,33 @@ class TarifaacabadoModel extends \App\Models\GoBaseModel
|
||||
return $builder->orderBy("t1.nombre", "asc")->get()->getResultObject();
|
||||
}
|
||||
|
||||
|
||||
public function getServiciosAcabadoCubierta()
|
||||
{
|
||||
$builder = $this->db
|
||||
->table($this->table . " t1")
|
||||
->select(
|
||||
"t1.id as id, t1.nombre AS label"
|
||||
)
|
||||
->where("t1.is_deleted", 0)
|
||||
->where("t1.mostrar_en_presupuesto", 1)
|
||||
->where("t1.acabado_cubierta", 1);
|
||||
|
||||
return $builder->orderBy("t1.id", "asc")->get()->getResultObject();
|
||||
}
|
||||
|
||||
|
||||
public function getServiciosAcabadoSobrecubierta()
|
||||
{
|
||||
$builder = $this->db
|
||||
->table($this->table . " t1")
|
||||
->select(
|
||||
"t1.id as id, t1.nombre AS label"
|
||||
)
|
||||
->where("t1.is_deleted", 0)
|
||||
->where("t1.mostrar_en_presupuesto", 1)
|
||||
->where("t1.acabado_sobrecubierta", 1);
|
||||
|
||||
return $builder->orderBy("t1.id", "asc")->get()->getResultObject();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user