mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
lp en edit terminadas
This commit is contained in:
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
@ -69,6 +69,8 @@ class PresupuestoLineaModel extends \App\Models\GoBaseModel
|
||||
"rotativa_tiempo_corte",
|
||||
"rotativa_precio_hora_corte",
|
||||
"rotativa_total_corte",
|
||||
'check_impresion_total',
|
||||
'check_papel_total',
|
||||
"isActiva",
|
||||
];
|
||||
protected $returnType = "App\Entities\Presupuestos\PresupuestoLineaEntity";
|
||||
@ -313,9 +315,6 @@ class PresupuestoLineaModel extends \App\Models\GoBaseModel
|
||||
|
||||
public function getLineasPresupuesto($presupuesto_id = -1)
|
||||
{
|
||||
/*
|
||||
Todos los servicios de manipulado activas que se pueden usar en presupuestos
|
||||
*/
|
||||
$builder = $this->db
|
||||
->table($this->table . " t1")
|
||||
->select(
|
||||
@ -327,6 +326,19 @@ class PresupuestoLineaModel extends \App\Models\GoBaseModel
|
||||
|
||||
return $builder->orderBy("t1.id", "asc")->get()->getResultObject();
|
||||
}
|
||||
|
||||
public function updateLineasPresupuesto($presupuesto_id = -1, $datos=[])
|
||||
{
|
||||
foreach($datos as $linea){
|
||||
|
||||
$this->db
|
||||
->table($this->table . " t1")
|
||||
->where("t1.presupuesto_id", $presupuesto_id)
|
||||
->where("t1.tipo", $linea["tipo"])
|
||||
->update($linea);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user