mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
copiada la rama presu_cliente_v2 en esta para poder hacer el merge al main
This commit is contained in:
@ -322,4 +322,22 @@ class PapelImpresionModel extends \App\Models\BaseModel
|
||||
|
||||
return $builder->orderBy("t1.id", "asc")->get()->getResultObject();
|
||||
}
|
||||
|
||||
public function getPapelGenericoCode($papel_id = 0){
|
||||
$builder = $this->db
|
||||
->table($this->table . " t1")
|
||||
->select("t2.code AS code")
|
||||
->join("lg_papel_generico t2", "t1.papel_generico_id = t2.id", "left")
|
||||
->where("t1.id", $papel_id)
|
||||
->where("t1.is_deleted", 0)
|
||||
->where("t1.isActivo", 1)
|
||||
->where("t2.is_deleted", 0);
|
||||
|
||||
$result = $builder->get()->getResultObject();
|
||||
if(count($result) > 0){
|
||||
return $result[0]->code;
|
||||
}
|
||||
else
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user