add alias_ot to maquina code header in pdf and seeder to update alias in lg_maquinas

This commit is contained in:
amazuecos
2025-05-19 21:13:21 +02:00
parent 64337257ee
commit 42edf2bbc0
2 changed files with 42 additions and 2 deletions

View File

@ -0,0 +1,40 @@
<?php
namespace App\Database\Seeds;
use App\Models\Configuracion\MaquinaModel;
use CodeIgniter\Database\Seeder;
class MaquinaAliasOtSeeder extends Seeder
{
public function run()
{
$m = model(MaquinaModel::class);
$data = [
[
"value" => "6136p",
"alias" => "6136p"
],
[
"value" => "c6100",
"alias" => "c6100"
],
[
"value" => "2250p",
"alias" => "2250p"
],
[
"value" => "C14 000",
"alias" => "C14 000"
],
[
"value" => "IX",
"alias" => "IX"
]
];
foreach ($data as $key => $row) {
$m->like('nombre', $row['value'])->set(['alias_ot' => $row['alias']])->update();
}
}
}

View File

@ -62,11 +62,11 @@ $settings = $session->get('settings');
<div class="px-2 d-flex flex justify-content-center align-items-center w-100">
<span class="w-100 text-center code-title" style="background-color: <?= $colors["impresion_interior_ppal"]["bg"] ?>;color:<?= $colors["impresion_interior_ppal"]["color"] ?>;">
<?php if ($isPOD): ?>
<strong>POD</strong>
<strong><?= $linea_impresion->maquina()->alias_ot ?? "POD" ?></strong>
<?php elseif ($presupuesto->presupuestoLineaImpresion()->isRotativa()): ?>
<strong>ROTATIVA</strong>
<?php else: ?>
<strong>GENERAL</strong>
<strong><?= $linea_impresion->maquina()->alias_ot ?? "GENERAL" ?></strong>
<?php endif; ?>