mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
Merge branch 'fix/filter-datatable-ot' into 'main'
Fix/filter datatable ot See merge request jjimenez/safekat!748
This commit is contained in:
@ -242,7 +242,7 @@ class Ordentrabajo extends BaseController
|
||||
{
|
||||
$logo = config(LogoImpresion::class);
|
||||
|
||||
$q = $this->otModel->getDatatableQuery()->where("ferro_ok_at", null);
|
||||
$q = $this->otModel->getDatatableQuery()->where('presupuestos.ferro',1)->where("ferro_ok_at", null);
|
||||
// return $this->response->setJSON($q->get()->getResultArray());
|
||||
return DataTable::of($q)
|
||||
->add("logo", fn($q) => ["logo" => site_url($logo->get_logo_path($q->presupuesto_linea_tipo)), "imposicion" => $q->imposicion_name, "color" => $this->produccionService->init($q->id)->getOtColorStatus()])
|
||||
@ -257,7 +257,7 @@ class Ordentrabajo extends BaseController
|
||||
{
|
||||
$logo = config(LogoImpresion::class);
|
||||
|
||||
$q = $this->otModel->getDatatableQuery()->where("ferro_ok_at is NOT NULL", NULL, FALSE);
|
||||
$q = $this->otModel->getDatatableQuery()->where('presupuestos.ferro',1)->where("ferro_ok_at is NOT NULL", NULL, FALSE);
|
||||
// return $this->response->setJSON($q->get()->getResultArray());
|
||||
return DataTable::of($q)
|
||||
->add("logo", fn($q) => ["logo" => site_url($logo->get_logo_path($q->presupuesto_linea_tipo)), "imposicion" => $q->imposicion_name, "color" => $this->produccionService->init($q->id)->getOtColorStatus()])
|
||||
|
||||
@ -1353,9 +1353,13 @@ class ProductionService extends BaseService
|
||||
}
|
||||
public function getTiempoProcesamientoHHMM(): ?string
|
||||
{
|
||||
$time_tareas_seconds = array_map(fn($q) => $q->tiempo_estimado ?? 0, $this->ot->tareas());
|
||||
$seconds = array_sum($time_tareas_seconds);
|
||||
return float_seconds_to_hhmm_string($seconds);
|
||||
try {
|
||||
$time_tareas_seconds = array_map(fn($q) => $q->tiempo_estimado ?? 0, $this->ot->tareas());
|
||||
$seconds = array_sum($time_tareas_seconds);
|
||||
return float_seconds_to_hhmm_string($seconds);
|
||||
} catch (\Throwable $th) {
|
||||
return '00:00';
|
||||
}
|
||||
}
|
||||
public function getTiempoTareasImpresionHHMM(): string
|
||||
{
|
||||
|
||||
30
ci4/app/Views/themes/vuexy/pdfs/encuadernados/default.php
Normal file
30
ci4/app/Views/themes/vuexy/pdfs/encuadernados/default.php
Normal file
@ -0,0 +1,30 @@
|
||||
<table>
|
||||
<tr class="encuadernacion">
|
||||
<th >Encuadernacion</th>
|
||||
<th class="cell-50"></th>
|
||||
<th class="cell-50"></th>
|
||||
<th class="cell-50"></th>
|
||||
<th class="cell-50">Sobrecubierta</th>
|
||||
<th class="cell-50">Guardas</th>
|
||||
<th class="cell-50">Retractilado</th>
|
||||
<th class="cell-50">Marcapáginas</th>
|
||||
</tr>
|
||||
<?php if (count($encuadernaciones) > 0): ?>
|
||||
<?php foreach ($encuadernaciones as $key => $value): ?>
|
||||
<tr style="color: red;">
|
||||
<td><?= $value->tarifa()->nombre ?></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td><?= $presupuesto->hasSobrecubierta() ? "SI" : "NO" ?></td>
|
||||
<td><?= $presupuesto->guardas ? "SI" : "NO" ?></td>
|
||||
<td><?= $presupuesto->retractilado ? "SI" : "NO" ?></td>
|
||||
<td><?= $presupuesto->marcapaginas ? "SI" : "NO" ?></td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
<?php else: ?>
|
||||
<tr style="color: red;">
|
||||
<td colspan="7">Sin encuadernación</td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
</table>
|
||||
@ -335,12 +335,13 @@ $settings = $session->get('settings');
|
||||
if ($encuadernacion_code) {
|
||||
echo view("/themes/vuexy/pdfs/encuadernados/$encuadernacion_code.php");
|
||||
} else {
|
||||
throw new Exception('No existe código de encuadernación.');
|
||||
echo view("/themes/vuexy/pdfs/encuadernados/default.php");
|
||||
}
|
||||
} catch (\Throwable $th) {
|
||||
$error_message = $th->getMessage();
|
||||
echo view("/themes/vuexy/pdfs/encuadernados/default.php");
|
||||
echo "<span style='color:red'>No se ha podido renderizar la tabla de encuadernación</span>";
|
||||
echo "<br><span style='color:red'>$error_message</span>";
|
||||
// echo "<br><span style='color:red'>$error_message</span>";
|
||||
}
|
||||
?>
|
||||
<?php if (count($encuadernaciones) > 0): ?>
|
||||
|
||||
Reference in New Issue
Block a user