planning plana

This commit is contained in:
amazuecos
2025-03-29 11:07:36 +01:00
parent 47455cd9c2
commit 8c64b678fe
28 changed files with 655 additions and 209 deletions

View File

@ -193,8 +193,16 @@ class Ordentrabajo extends BaseController
$q = $this->produccionService->papelGramajeDatatableQuery();
return DataTable::of($q)
->edit("tiempoReal", fn($q) => float_seconds_to_hhmm_string($q->tiempoReal * 3600))
->add("metros", fn($q) => $q->papel_ancho*$q->totalTirada/1000)
->edit("tiempoReal", fn($q) => $q->tiempoReal * 3600)
->add("action", fn($q) => ["title" => lang('Produccion.datatable.filter_by_task'), 'data' => $q])
->toJson(true);
}
public function papel_pliego_datatable()
{
$q = $this->produccionService->papelPliegoDatatableQuery();
return DataTable::of($q)
->edit("tiempoReal", fn($q) => $q->tiempoReal * 3600)
->add("action", fn($q) => ["title" => lang('Produccion.datatable.filter_by_task'), 'data' => $q])
->toJson(true);
}
@ -266,9 +274,17 @@ class Ordentrabajo extends BaseController
->edit("fecha_entrega_real_at", fn($q) => $q->fecha_entrega_real_at ? Time::createFromFormat("Y-m-d", $q->fecha_entrega_real_at)->format("d/m/Y") : "")
->add("metros_check", fn($q) => $q->otId)
->add("corte", fn($q) => $q->otId)
->add("metros", fn($q) => $q->papel_ancho*$q->ot_tirada/1000)
->add("action", fn($q) => $q)
->toJson(true);
}
public function planning_plana_datatable()
{
$q = $this->produccionService->planningPlanaQueryDatatable();
return DataTable::of($q)
->edit("fecha_entrega_real_at", fn($q) => $q->fecha_entrega_real_at ? Time::createFromFormat("Y-m-d", $q->fecha_entrega_real_at)->format("d/m/Y") : "")
->add("pliegos_check", fn($q) => $q->otId)
->add("action", fn($q) => $q)
->toJson(true);
}
}