terminadas tarifas cliente

This commit is contained in:
2024-12-03 22:59:57 +01:00
parent 65f179bdd8
commit 3fb37af0f8
11 changed files with 384 additions and 485 deletions

View File

@ -287,6 +287,27 @@ class ClientePreciosModel extends \App\Models\BaseModel
}
}
public function getPlantilla($cliente_id = -1){
$builder = $this->db
->table($this->table . " t1")
->select(
"t1.plantilla_id AS id, t2.nombre AS nombre"
);
$builder->where('t1.is_deleted', 0);
$builder->where('t1.cliente_id', $cliente_id);
$builder->join("cliente_plantilla_precios t2", "t1.plantilla_id = t2.id", "left");
$builder->limit(1);
$values = $builder->get()->getResultArray();
if(count($values)>0){
return $values[0];
}
return [];
}
public function checkIntervals($data = [], $id_linea = null, $cliente_id = null){