add tareas orden de trabajo

This commit is contained in:
amazuecos
2024-12-24 18:55:07 +01:00
parent 60706ecfc2
commit 66a36bcf3b
9 changed files with 50 additions and 8 deletions

View File

@ -2,9 +2,7 @@
namespace App\Services;
use App\Database\Migrations\OrdenTrabajoUsers;
use App\Entities\Clientes\ClienteEntity;
use App\Entities\Configuracion\Maquina;
use App\Entities\Pedidos\PedidoEntity;
use App\Entities\Presupuestos\PresupuestoEntity;
use App\Entities\Presupuestos\PresupuestoLineaEntity;
@ -185,6 +183,7 @@ class ProductionService extends BaseService
} else {
$ot_tareas["orden_trabajo_id"] = $this->ot->id;
$ot_tareas["presupuesto_acabado_id"] = $p_linea->id;
$ot_tareas["nombre"] = $p_linea->tarifa()->nombre ?? "";
$this->otTarea->insert($ot_tareas);
}
}
@ -210,6 +209,7 @@ class ProductionService extends BaseService
} else {
$ot_tareas["orden_trabajo_id"] = $this->ot->id;
$ot_tareas["presupuesto_manipulado_id"] = $p_linea->id;
$ot_tareas["nombre"] = $p_linea->tarifa()->nombre ?? "";
$this->otTarea->insert($ot_tareas);
}
}
@ -235,6 +235,7 @@ class ProductionService extends BaseService
} else {
$ot_tareas["orden_trabajo_id"] = $this->ot->id;
$ot_tareas["presupuesto_preimpresion_id"] = $p_linea->id;
$ot_tareas["nombre"] = $p_linea->tarifa()->nombre ?? "";
$this->otTarea->insert($ot_tareas);
}
}
@ -249,7 +250,7 @@ class ProductionService extends BaseService
if (count($p_linea_maquinas) > 0) {
foreach ($p_linea_maquinas as $key => $linea) {
$ot_tareas["orden_trabajo_id"] = $this->ot->id;
$ot_tareas["presupuesto_encuadernacion_id"] = $p_linea->id;
$ot_tareas["presupuesto_encuadernado_id"] = $p_linea->id;
$ot_tareas["nombre"] = $linea->nombre;
$ot_tareas["orden"] = $linea->orden_planning;
$ot_tareas["maquina_id"] = $linea->id;
@ -259,7 +260,8 @@ class ProductionService extends BaseService
}
} else {
$ot_tareas["orden_trabajo_id"] = $this->ot->id;
$ot_tareas["presupuesto_encuadernacion_id"] = $p_linea->id;
$ot_tareas["presupuesto_encuadernado_id"] = $p_linea->id;
$ot_tareas["nombre"] = $p_linea->tarifa()->nombre ?? "";
$this->otTarea->insert($ot_tareas);
}
}
@ -285,6 +287,8 @@ class ProductionService extends BaseService
} else {
$ot_tareas["orden_trabajo_id"] = $this->ot->id;
$ot_tareas["presupuesto_extra_id"] = $p_linea->id;
$ot_tareas["nombre"] = $p_linea->tarifa()->nombre ?? "";
$this->otTarea->insert($ot_tareas);
}
}