mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
terminadas tarifas cliente
This commit is contained in:
@ -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){
|
||||
|
||||
|
||||
Reference in New Issue
Block a user