comprobando presupuestos

This commit is contained in:
2024-10-22 08:43:21 +02:00
parent 62a3706049
commit 2f83526d7e
20 changed files with 37035 additions and 223 deletions

View File

@ -76,6 +76,22 @@ class PapelGenericoModel extends \App\Models\BaseModel
return $data;
}
public function getCodeFromId($id=0){
$builder = $this->db
->table($this->table . " t1")
->select(
"t1.code AS code"
)
->where("t1.id", $id)
->where("t1.is_deleted", 0);
$data = $builder->get()->getFirstRow();
// se convierte a de stdClass a array
$data = json_decode(json_encode($data), true);
return $data;
}
/**
* Get resource data.
*