rotativa planning

This commit is contained in:
amazuecos
2025-03-26 21:01:31 +01:00
parent ff73caec21
commit 81573eede4
11 changed files with 101 additions and 18 deletions

View File

@ -110,7 +110,6 @@ class ProductionService extends BaseService
{
$auth_user = auth()->user();
$ot = new OrdenTrabajoEntity();
$ot_exists = $this->pedido->orden_trabajo();
if ($ot_exists) {
return $ot_exists;
@ -122,13 +121,10 @@ class ProductionService extends BaseService
"total_tirada" => $this->pedido->total_tirada,
"total_precio" => $this->pedido->total_precio
];
$ot->fill($data);
$this->otModel->save($ot);
$ot_id = $this->otModel->getInsertID();
$ot->id = $ot_id;
$ot_id = $this->otModel->insert($data);
$this->init($ot_id);
$this->storeOrdenTrabajoUsers();
$this->storeOrdenTrabajoDates();
// $this->storeOrdenTrabajoUsers();
// $this->storeOrdenTrabajoDates();
$this->storeAllTareas();
return $this->ot;
}
@ -467,6 +463,7 @@ class ProductionService extends BaseService
public function papelGramajeDatatableQuery() : BaseBuilder
{
$q = $this->otModel->builder()->select([
"lg_papel_impresion.id as papelImpresionId",
"lg_papel_impresion.nombre as papelImpresionNombre",
"lg_papel_impresion.gramaje as papelImpresionGramaje",
"COUNT(orden_trabajo_tareas.id) as tareasCount",
@ -692,5 +689,9 @@ class ProductionService extends BaseService
}
protected function actionButtonFilterTask(int $id)
{
return ["title" => lang('ot.filter_by_task'),'id' => $id];
}
}