mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
falta el mensaje de dejar tipologías o por defecto
This commit is contained in:
@ -47,7 +47,7 @@ class PresupuestoDireccionesModel extends \App\Models\GoBaseModel
|
||||
"entregaPieCalle",
|
||||
];
|
||||
|
||||
protected $returnType = "App\Entities\Clientes\ClienteDireccionesEntity";
|
||||
protected $returnType = "App\Entities\Presupuestos\PresupuestoDireccionesEntity";
|
||||
|
||||
public static $labelField = "id";
|
||||
|
||||
|
||||
@ -411,6 +411,19 @@ class PresupuestoLineaModel extends \App\Models\GoBaseModel
|
||||
return $builder;
|
||||
}
|
||||
|
||||
public function duplicateLineasPresupuesto($presupuesto_id, $new_presupuesto_id)
|
||||
{
|
||||
$lineas = $this->getLineasPresupuesto($presupuesto_id);
|
||||
$lineas = json_decode(json_encode($lineas), true);
|
||||
foreach ($lineas as $linea) {
|
||||
$linea['presupuesto_id'] = $new_presupuesto_id;
|
||||
unset($linea['id']);
|
||||
$this->db
|
||||
->table($this->table . " t1")
|
||||
->insert($linea);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user