lp en edit terminadas

This commit is contained in:
Jaime Jiménez Ortega
2023-11-14 08:21:34 +01:00
parent 2f38df4886
commit e12913c2a0
13 changed files with 394 additions and 140 deletions

View File

@ -380,5 +380,17 @@ class MaquinaModel extends \App\Models\GoBaseModel
}
return $builder->orderBy("t1.id", "asc")->get()->getResultObject();
}
public function getNombre($id){
$builder = $this->db
->table($this->table . " t1")
->select(
"t1.nombre AS text");
$builder->where("t1.id", $id);
return $builder->orderBy("t1.id", "asc")->get()->getResultObject();
}
}

View File

@ -124,7 +124,7 @@ class MaquinasTarifasImpresionModel extends \App\Models\GoBaseModel
$builder = $this->db
->table($this->table . " t1")
->select(
"t1.precio AS precio"
"t1.id AS id, t1.precio AS precio"
);
//JJO
@ -135,7 +135,7 @@ class MaquinasTarifasImpresionModel extends \App\Models\GoBaseModel
$tarifas = $builder->get()->getResultArray();
if (count($tarifas)>0){
return floatval($tarifas[0]['precio']);
return [$tarifas[0]['id'], floatval($tarifas[0]['precio'])];
}
return $tarifas;
}

View File

@ -300,4 +300,15 @@ class PapelImpresionModel extends \App\Models\GoBaseModel
return $builder->orderBy("t1.id", "asc")->get()->getResultObject();
}
public function getNombre($id){
$builder = $this->db
->table($this->table . " t1")
->select(
"t1.nombre AS text");
$builder->where("t1.id", $id);
return $builder->orderBy("t1.id", "asc")->get()->getResultObject();
}
}