mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
fix pdf tables encuadernacion. Add tarifa acabado configuration for ots
This commit is contained in:
@ -100,9 +100,9 @@ class OrdenTrabajo extends BaseConfig
|
||||
];
|
||||
public array $OT_PLASTIFICADO_COLOR =
|
||||
[
|
||||
"BRIL" => ["bg" => "#00B0F0", "color" => "white"],
|
||||
"BRILLO" => ["bg" => "#00B0F0", "color" => "white"],
|
||||
"MATE" => ["bg" => "#FF0000", "color" => "white"],
|
||||
"SOFT_TOUCH" => ["bg" => "#00B050", "color" => "white"],
|
||||
"SOFT" => ["bg" => "#00B050", "color" => "white"],
|
||||
"SANDY" => ["bg" => "#782170", "color" => "white"],
|
||||
"ANTIRAYADO" => ["bg" => "#E97132", "color" => "white"],
|
||||
"GOFRADO" => ["bg" => "#FFFF00", "color" => "black"],
|
||||
|
||||
@ -0,0 +1,68 @@
|
||||
<?php
|
||||
|
||||
namespace App\Database\Migrations;
|
||||
|
||||
use CodeIgniter\Database\Migration;
|
||||
|
||||
class AlterTarifasAcabadoAddBoleanColumns extends Migration
|
||||
{
|
||||
protected array $COLUMNS = [
|
||||
'plastificado' => [
|
||||
'type' => 'BOOLEAN',
|
||||
'default' => false,
|
||||
],
|
||||
'plakene' => [
|
||||
'type' => 'BOOLEAN',
|
||||
'default' => false,
|
||||
],
|
||||
'rectractilado' => [
|
||||
'type' => 'BOOLEAN',
|
||||
'default' => false,
|
||||
],
|
||||
'estampado' => [
|
||||
'type' => 'BOOLEAN',
|
||||
'default' => false,
|
||||
],
|
||||
'uvi' => [
|
||||
'type' => 'BOOLEAN',
|
||||
'default' => false,
|
||||
],
|
||||
'plastificado_tipo' => [
|
||||
'type' => 'ENUM',
|
||||
'constraint' => ['BRILLO','MATE','SANDY','GOFRADO','SOFT','ANTIRAYADO'],
|
||||
'null' => true,
|
||||
],
|
||||
'plakene_tipo' => [
|
||||
'type' => 'ENUM',
|
||||
'constraint' => ['TRASLUCIDO','MATE','NEGRO'],
|
||||
'null' => true,
|
||||
],
|
||||
'rectractilado_tipo' => [
|
||||
'type' => 'ENUM',
|
||||
'constraint' => ['1','3','5'],
|
||||
'null' => true,
|
||||
],
|
||||
'estampado_tipo' => [
|
||||
'type' => 'ENUM',
|
||||
'constraint' => ['ORO','PLATA','COBRE','BRONCE'],
|
||||
'null' => true,
|
||||
],
|
||||
'uvi_tipo' => [
|
||||
'type' => 'ENUM',
|
||||
'constraint' => ['2D','3D','BRAILLE'],
|
||||
'null' => true,
|
||||
]
|
||||
];
|
||||
public function up()
|
||||
{
|
||||
|
||||
$this->forge->addColumn('lg_tarifa_acabado',$this->COLUMNS);
|
||||
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
$this->forge->dropColumn('lg_tarifa_acabado',array_keys($this->COLUMNS));
|
||||
|
||||
}
|
||||
}
|
||||
@ -1,7 +1,9 @@
|
||||
<?php
|
||||
namespace App\Entities\Presupuestos;
|
||||
|
||||
use App\Entities\Compras\ProveedorEntity;
|
||||
use App\Entities\Tarifas\Acabados\TarifaAcabadoEntity;
|
||||
use App\Models\Compras\ProveedorModel;
|
||||
use App\Models\Configuracion\MaquinaModel;
|
||||
use App\Models\Tarifas\Acabados\TarifaAcabadoModel;
|
||||
use App\Models\Tarifas\Maquinas\TarifaAcabadoMaquinaModel;
|
||||
@ -54,5 +56,13 @@ class PresupuestoAcabadosEntity extends \CodeIgniter\Entity\Entity
|
||||
$m = model(TarifaAcabadoModel::class);
|
||||
return $m->find($this->attributes["tarifa_acabado_id"]);
|
||||
}
|
||||
|
||||
public function proveedor(): ?ProveedorEntity
|
||||
{
|
||||
$proveedor = null;
|
||||
$m = model(ProveedorModel::class);
|
||||
if ($this->attributes["proveedor_id"]) {
|
||||
$proveedor = $m->find($this->attributes["proveedor_id"]);
|
||||
}
|
||||
return $proveedor;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,7 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace App\Entities\Presupuestos;
|
||||
|
||||
use App\Entities\Compras\ProveedorEntity;
|
||||
use App\Entities\Tarifas\TarifaEncuadernacionEntity;
|
||||
use App\Models\Compras\ProveedorModel;
|
||||
use App\Models\Configuracion\MaquinaModel;
|
||||
use App\Models\Tarifas\Maquinas\TarifaEncuadernacionMaquinaModel;
|
||||
use App\Models\Tarifas\TarifaEncuadernacionModel;
|
||||
@ -32,10 +35,10 @@ class PresupuestoEncuadernacionesEntity extends \CodeIgniter\Entity\Entity
|
||||
"precio_total" => "float",
|
||||
"margen" => "float",
|
||||
];
|
||||
public function maquinas() : array
|
||||
public function maquinas(): array
|
||||
{
|
||||
$m = model(TarifaEncuadernacionMaquinaModel::class);
|
||||
$tarifa_maquinas = $m->where("tarifa_encuadernacion_id",$this->attributes["tarifa_encuadernado_id"])->findAll();
|
||||
$tarifa_maquinas = $m->where("tarifa_encuadernacion_id", $this->attributes["tarifa_encuadernado_id"])->findAll();
|
||||
$maquinaModel = model(MaquinaModel::class);
|
||||
$maquinas = [];
|
||||
foreach ($tarifa_maquinas as $key => $tarifa_maquina) {
|
||||
@ -43,9 +46,18 @@ class PresupuestoEncuadernacionesEntity extends \CodeIgniter\Entity\Entity
|
||||
}
|
||||
return $maquinas;
|
||||
}
|
||||
public function tarifa() : TarifaEncuadernacionEntity
|
||||
public function tarifa(): TarifaEncuadernacionEntity
|
||||
{
|
||||
$m = model(TarifaEncuadernacionModel::class);
|
||||
return $m->find($this->attributes["tarifa_encuadernado_id"]);
|
||||
}
|
||||
public function proveedor(): ?ProveedorEntity
|
||||
{
|
||||
$proveedor = null;
|
||||
$m = model(ProveedorModel::class);
|
||||
if ($this->attributes["proveedor_id"]) {
|
||||
$proveedor = $m->find($this->attributes["proveedor_id"]);
|
||||
}
|
||||
return $proveedor;
|
||||
}
|
||||
}
|
||||
|
||||
@ -210,7 +210,7 @@ class PresupuestoEntity extends \CodeIgniter\Entity\Entity
|
||||
|
||||
$q = $model->where('presupuesto_id', $this->attributes["id"])->findAll();
|
||||
|
||||
return $q;
|
||||
return $q ?? [];
|
||||
}
|
||||
/**
|
||||
* Obtiene las lineas de presupuesto del actual presupuesto
|
||||
@ -251,6 +251,14 @@ class PresupuestoEntity extends \CodeIgniter\Entity\Entity
|
||||
|
||||
return $q;
|
||||
}
|
||||
public function presupuestoLineaGuarda(): ?PresupuestoLineaEntity
|
||||
{
|
||||
$model = model(PresupuestoLineaModel::class);
|
||||
|
||||
$q = $model->where('presupuesto_id', $this->attributes["id"])->whereIn("tipo", ["lp_guardas"])->first();
|
||||
|
||||
return $q;
|
||||
}
|
||||
public function hasSobrecubierta(): bool
|
||||
{
|
||||
$hasSobrecubierta = false;
|
||||
|
||||
@ -24,6 +24,16 @@ class TarifaAcabadoEntity extends \CodeIgniter\Entity\Entity
|
||||
"deleted_at" => null,
|
||||
"created_at" => null,
|
||||
"updated_at" => null,
|
||||
'plastificado' => false,
|
||||
'plakene' => false,
|
||||
'rectractilado' => false,
|
||||
'estampado' => false,
|
||||
'uvi' => false,
|
||||
'plastificado_tipo' => null,
|
||||
'plakene_tipo' => null,
|
||||
'rectractilado_tipo' => null,
|
||||
'estampado_tipo' => null,
|
||||
'uvi_tipo' => null,
|
||||
];
|
||||
protected $casts = [
|
||||
"precio_min" => "float",
|
||||
@ -33,6 +43,16 @@ class TarifaAcabadoEntity extends \CodeIgniter\Entity\Entity
|
||||
"user_created_id" => "int",
|
||||
"user_updated_id" => "int",
|
||||
"is_deleted" => "int",
|
||||
'plastificado' => 'boolean',
|
||||
'plakene' => 'boolean',
|
||||
'rectractilado' => 'boolean',
|
||||
'estampado' => 'boolean',
|
||||
'uvi' => 'boolean',
|
||||
'plastificado_tipo' => '?string',
|
||||
'plakene_tipo' => '?string',
|
||||
'rectractilado_tipo' => '?string',
|
||||
'estampado_tipo' => '?string',
|
||||
'uvi_tipo' => '?string',
|
||||
];
|
||||
/**
|
||||
* Devuelve las maquinas asociadas a esta tarifa de acabado
|
||||
@ -48,6 +68,7 @@ class TarifaAcabadoEntity extends \CodeIgniter\Entity\Entity
|
||||
|
||||
public function isUVI(): bool
|
||||
{
|
||||
return in_array($this->attributes["code"],["R3D","R2D"]);
|
||||
return $this->attributes['uvi'];
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\Tarifas\Acabados;
|
||||
|
||||
class TarifaAcabadoModel extends \App\Models\BaseModel
|
||||
@ -33,6 +34,16 @@ class TarifaAcabadoModel extends \App\Models\BaseModel
|
||||
"is_deleted",
|
||||
"user_created_id",
|
||||
"user_updated_id",
|
||||
'plastificado',
|
||||
'plakene',
|
||||
'rectractilado',
|
||||
'estampado',
|
||||
'uvi',
|
||||
'plastificado_tipo',
|
||||
'plakene_tipo',
|
||||
'rectractilado_tipo',
|
||||
'estampado_tipo',
|
||||
'uvi_tipo'
|
||||
];
|
||||
protected $returnType = 'App\Entities\Tarifas\Acabados\TarifaAcabadoEntity';
|
||||
|
||||
@ -96,9 +107,9 @@ class TarifaAcabadoModel extends \App\Models\BaseModel
|
||||
return empty($search)
|
||||
? $builder
|
||||
: $builder
|
||||
->groupStart()
|
||||
->like("t1.nombre", $search)
|
||||
->groupEnd();
|
||||
->groupStart()
|
||||
->like("t1.nombre", $search)
|
||||
->groupEnd();
|
||||
}
|
||||
|
||||
public function getServiciosAcabadoSelector()
|
||||
|
||||
@ -100,7 +100,24 @@ class ProductionService extends BaseService
|
||||
* @var boolean
|
||||
*/
|
||||
public bool $isGofrado = false; //* CHECK DONE
|
||||
|
||||
/**
|
||||
* Indica si la orden de trabajo contiene plastificado
|
||||
* Se usa para mostrar la fecha correspondiente en la vista
|
||||
* @var boolean
|
||||
*/
|
||||
public bool $isPlastificado = false; //* CHECK DONE
|
||||
/**
|
||||
* Indica si la orden de trabajo contiene gofrado
|
||||
* Se usa para mostrar la fecha correspondiente en la vista
|
||||
* @var boolean
|
||||
*/
|
||||
public bool $isPlakene = false; //* CHECK DONE
|
||||
/**
|
||||
* Indica si la orden de trabajo contiene gofrado
|
||||
* Se usa para mostrar la fecha correspondiente en la vista
|
||||
* @var boolean
|
||||
*/
|
||||
public bool $isEstampado = false; //* CHECK DONE
|
||||
/**
|
||||
* Indica si la orden de trabajo contiene cosido
|
||||
* Se usa para mostrar la fecha correspondiente en la vista y pliegos
|
||||
@ -110,7 +127,7 @@ class ProductionService extends BaseService
|
||||
/**
|
||||
* Indica si la orden de trabajo contiene gofrado
|
||||
* Se usa para mostrar la fecha correspondiente en la vista
|
||||
* TODO Hay que implementar un boolean en `lg_tarifa_acabado` para identificar
|
||||
* TODO Hay que implementar un boolean en `lg_tarifa_manipulado` para identificar
|
||||
* @var boolean
|
||||
*/
|
||||
public bool $isGrapado = true; //TODO
|
||||
@ -128,14 +145,7 @@ class ProductionService extends BaseService
|
||||
* @var boolean
|
||||
*/
|
||||
public bool $isUVI = false; //* CHECK DONE
|
||||
/**
|
||||
* Indica si la orden de trabajo contiene plastificado
|
||||
* Se usa para mostrar la fecha correspondiente en la vista
|
||||
* TODO Hay que implementar un boolean en `lg_tarifa_acabado` para identificar
|
||||
* DEFAULT true hasta implementacion
|
||||
* @var boolean
|
||||
*/
|
||||
public bool $isPlastificado = true; //TODO
|
||||
|
||||
/**
|
||||
* Indica si la orden de trabajo contiene cubierta
|
||||
* Se usa para mostrar la fecha correspondiente en la vista
|
||||
@ -365,7 +375,7 @@ class ProductionService extends BaseService
|
||||
$ot_tareas["maquina_id"] = $p_linea_maquina->id;
|
||||
$ot_tareas["imposicion_id"] = null;
|
||||
$ot_tareas["tiempo_estimado"] = $p_linea->horas_maquina * 3600;
|
||||
$ot_tareas["tiempo_real"] = 0;
|
||||
$ot_tareas["tiempo_real"] = 0;
|
||||
$insert_query_result = $this->otTarea->insert($ot_tareas);
|
||||
$ot_tareas = [];
|
||||
$this->storeTareaCorte($p_linea);
|
||||
@ -837,6 +847,7 @@ class ProductionService extends BaseService
|
||||
"preimpresiones" => $this->presupuesto->preimpresiones(),
|
||||
"manipulados" => $this->presupuesto->manipulados(),
|
||||
"encuadernaciones" => $this->presupuesto->encuadernaciones(),
|
||||
"encuadernacionCode" => $this->getEncuadernacionCode(),
|
||||
"linea_impresion" => $this->presupuesto->presupuestoLineaImpresion(),
|
||||
"linea_cubierta" => $this->presupuesto->presupuestoLineaCubierta(),
|
||||
"peso_unidad" => $logistica_data["peso_unidad"],
|
||||
@ -847,7 +858,9 @@ class ProductionService extends BaseService
|
||||
"colors" => $this->getPdfColors(),
|
||||
"isPOD" => $this->isPOD,
|
||||
"uvi" => $this->getUVI(),
|
||||
"flags" => $this->getFlags(),
|
||||
"tareaCosido" => $this->getTareaCosido(),
|
||||
"plakene_tipo" => $this->plakene_tipo()
|
||||
];
|
||||
}
|
||||
public function getImposicionTareaImpresion(): ?Imposicion
|
||||
@ -1374,7 +1387,7 @@ class ProductionService extends BaseService
|
||||
$uvi = null;
|
||||
$acabados = $this->presupuesto->acabados();
|
||||
foreach ($acabados as $key => $acabado) {
|
||||
if ($acabado->tarifa()->isUVI()) {
|
||||
if ($acabado->tarifa()->uvi) {
|
||||
$uvi = $acabado->tarifa();
|
||||
}
|
||||
}
|
||||
@ -1490,8 +1503,11 @@ class ProductionService extends BaseService
|
||||
{
|
||||
$code = "";
|
||||
$encuadernaciones = $this->presupuesto->encuadernaciones();
|
||||
if (isset($encuadernaciones[0])) {
|
||||
$code = $encuadernaciones[0]->tarifa()->code;
|
||||
foreach ($encuadernaciones as $key => $value) {
|
||||
$code = $value->tarifa()->code;
|
||||
if ($code) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
return $code;
|
||||
}
|
||||
@ -1596,21 +1612,10 @@ class ProductionService extends BaseService
|
||||
foreach ($acabados as $key => $acabado) {
|
||||
$tarifa_acabado = $acabado->tarifa();
|
||||
if ($tarifa_acabado->code) {
|
||||
$plastificado_code = $tarifa_acabado->code;
|
||||
if ($plastificado_code == "BRIL") {
|
||||
$color = $this->ordenTrabajoConfig->OT_PLASTIFICADO_COLOR['BRIL'];
|
||||
}
|
||||
if ($plastificado_code == "MATE") {
|
||||
$color = $this->ordenTrabajoConfig->OT_PLASTIFICADO_COLOR['MATE'];
|
||||
}
|
||||
if ($plastificado_code == "ANTI") {
|
||||
$color = $this->ordenTrabajoConfig->OT_PLASTIFICADO_COLOR['ANTIRAYADO'];
|
||||
}
|
||||
if ($plastificado_code == "SAND") {
|
||||
$color = $this->ordenTrabajoConfig->OT_PLASTIFICADO_COLOR['SANDY'];
|
||||
}
|
||||
if ($plastificado_code == "GOF") {
|
||||
$color = $this->ordenTrabajoConfig->OT_PLASTIFICADO_COLOR['GOFRADO'];
|
||||
if ($tarifa_acabado->plastificado) {
|
||||
if (isset($this->ordenTrabajoConfig->OT_PLASTIFICADO_COLOR[$tarifa_acabado->plastificado_tipo])) {
|
||||
$color = $this->ordenTrabajoConfig->OT_PLASTIFICADO_COLOR[$tarifa_acabado->plastificado_tipo];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1641,9 +1646,9 @@ class ProductionService extends BaseService
|
||||
$this->color();
|
||||
return [
|
||||
"isGofrado" => $this->gofrado(),
|
||||
"isEspiral" => $this->isEspiral,
|
||||
"isEspiral" => $this->isEspiral, //TODO
|
||||
"isUVI" => $this->uvi(),
|
||||
"isPlastificado" => $this->isPlastificado,
|
||||
"isPlastificado" => $this->plastificado(),
|
||||
"isCubierta" => $this->cubierta(),
|
||||
"isColor" => $this->isColor,
|
||||
"isBN" => $this->isBN,
|
||||
@ -1669,6 +1674,61 @@ class ProductionService extends BaseService
|
||||
$this->isGofrado = $flag;
|
||||
return $this->isGofrado;
|
||||
}
|
||||
public function plakene(): bool
|
||||
{
|
||||
$flag = false;
|
||||
$acabados = $this->presupuesto->acabados();
|
||||
foreach ($acabados as $key => $acabado) {
|
||||
$tarifa_acabado = $acabado->tarifa();
|
||||
if ($tarifa_acabado->plakene) {
|
||||
$flag = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
$this->isPlakene = $flag;
|
||||
return $this->isPlakene;
|
||||
}
|
||||
public function plakene_tipo(): ?string
|
||||
{
|
||||
$tipo = "";
|
||||
$acabados = $this->presupuesto->acabados();
|
||||
foreach ($acabados as $key => $acabado) {
|
||||
$tarifa_acabado = $acabado->tarifa();
|
||||
if ($tarifa_acabado->plakene) {
|
||||
$tipo = $tarifa_acabado->plakene_tipo;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return $tipo;
|
||||
}
|
||||
public function plastificado(): bool
|
||||
{
|
||||
$flag = false;
|
||||
$acabados = $this->presupuesto->acabados();
|
||||
foreach ($acabados as $key => $acabado) {
|
||||
$tarifa_acabado = $acabado->tarifa();
|
||||
if ($tarifa_acabado->plastificado) {
|
||||
$flag = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
$this->isPlastificado = $flag;
|
||||
return $this->isPlastificado;
|
||||
}
|
||||
public function estampado(): bool
|
||||
{
|
||||
$flag = false;
|
||||
$acabados = $this->presupuesto->acabados();
|
||||
foreach ($acabados as $key => $acabado) {
|
||||
$tarifa_acabado = $acabado->tarifa();
|
||||
if ($tarifa_acabado->estampado) {
|
||||
$flag = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
$this->isEstampado = $flag;
|
||||
return $this->isEstampado;
|
||||
}
|
||||
public function cosido(): bool
|
||||
{
|
||||
$flag = false;
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<table>
|
||||
<tr class="encuadernacion">
|
||||
<th >Encuadernacion</th>
|
||||
<th class="cell-50"></th>
|
||||
<th class="cell-50"><?=$presupuesto->solapas > 0 ? "Solapas" : ""?></th>
|
||||
<th class="cell-50"></th>
|
||||
<th class="cell-50"></th>
|
||||
<th class="cell-50"></th>
|
||||
@ -10,10 +10,13 @@
|
||||
<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><?= $encuadernacion->tarifa()->nombre ?></td>
|
||||
<?php if ($presupuesto->solapas > 0): ?>
|
||||
<td><?= "SI ($presupuesto->solapas_ancho mm.)" ?></td>
|
||||
<?php else: ?>
|
||||
<td></td>
|
||||
<?php endif; ?>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
@ -21,7 +24,6 @@
|
||||
<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>
|
||||
|
||||
@ -1,30 +0,0 @@
|
||||
<table>
|
||||
<tr class="encuadernacion">
|
||||
<th >Encuadernacion</th>
|
||||
<th class="cell-50">Solapas</th>
|
||||
<th class="cell-50"></th>
|
||||
<th class="cell-50"></th>
|
||||
<th class="cell-50"></th>
|
||||
<th class="cell-50"></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><?= $presupuesto->solapas ? "SI ($presupuesto->solapas_ancho mm.)" : "NO" ?></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></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>
|
||||
@ -9,17 +9,15 @@
|
||||
<th class="cell-50">Retractilado</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><?= $encuadernacion->tarifa()->nombre ?></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td><?= $flags['isPlakene'] ? "SI" : "NO" ?></td>
|
||||
<td><?= $plakene_tipo ?? "" ?></td>
|
||||
<td><?= $encuadernacion->proveedor() ? $encuadernacion->proveedor()->nombre : "" ?></td>
|
||||
<td><?= $presupuesto->retractilado ? "SI" : "NO" ?></td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
<?php else: ?>
|
||||
<tr style="color: red;">
|
||||
<td colspan="7">Sin encuadernación</td>
|
||||
|
||||
@ -3,25 +3,27 @@
|
||||
<th>Encuadernacion</th>
|
||||
<th class="cell-50">Pliegos</th>
|
||||
<th class="cell-50">Pliegos</th>
|
||||
<th class="cell-50"></th>
|
||||
<th class="cell-50"><?=$presupuesto->solapas > 0 ? "Solapas" : ""?></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><?=$tareaCosido->pliego_1." de ".$tareaCosido->pliego_1_total?></td>
|
||||
<td><?=$tareaCosido->pliego_2." de ".$tareaCosido->pliego_2_total?></td>
|
||||
<td></td>
|
||||
<td><?= $encuadernacion->tarifa()->nombre ?></td>
|
||||
<td><?= $tareaCosido->pliego_1 . " de " . $tareaCosido->pliego_1_total ?></td>
|
||||
<td><?= $tareaCosido->pliego_2 . " de " . $tareaCosido->pliego_2_total ?></td>
|
||||
<?php if ($presupuesto->solapas > 0): ?>
|
||||
<td><?= "SI ($presupuesto->solapas_ancho mm.)" ?></td>
|
||||
<?php else: ?>
|
||||
<td>NO</td>
|
||||
<?php endif; ?>
|
||||
<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>
|
||||
|
||||
@ -1,30 +0,0 @@
|
||||
<table>
|
||||
<tr class="encuadernacion">
|
||||
<th>Encuadernacion</th>
|
||||
<th class="cell-50">Pliegos</th>
|
||||
<th class="cell-50">Pliegos</th>
|
||||
<th class="cell-50">Solapas</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><?=$tareaCosido->pliego_1." de ".$tareaCosido->pliego_1_total?></td>
|
||||
<td><?=$tareaCosido->pliego_2." de ".$tareaCosido->pliego_2_total?></td>
|
||||
<td><?= $presupuesto->solapas ? "SI ($presupuesto->solapas_ancho mm.)" : "NO" ?></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>
|
||||
@ -1,7 +1,7 @@
|
||||
<table>
|
||||
<tr class="encuadernacion">
|
||||
<th >Encuadernacion</th>
|
||||
<th class="cell-50"></th>
|
||||
<th class="cell-50"><?=$presupuesto->solapas > 0 ? "Solapas" : ""?></th>
|
||||
<th class="cell-50"></th>
|
||||
<th class="cell-50"></th>
|
||||
<th class="cell-50">Sobrecubierta</th>
|
||||
@ -10,10 +10,13 @@
|
||||
<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><?= $encuadernacion->tarifa()->nombre ?></td>
|
||||
<?php if ($encuadernacion->solapas > 0): ?>
|
||||
<td><?= "SI ($presupuesto->solapas_ancho mm.)" ?></td>
|
||||
<?php else: ?>
|
||||
<td></td>
|
||||
<?php endif; ?>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td><?= $presupuesto->hasSobrecubierta() ? "SI" : "NO" ?></td>
|
||||
@ -21,7 +24,6 @@
|
||||
<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>
|
||||
|
||||
@ -1,30 +0,0 @@
|
||||
<table>
|
||||
<tr class="encuadernacion">
|
||||
<th >Encuadernacion</th>
|
||||
<th class="cell-50">Solapas</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><?= $presupuesto->solapas ? "SI ($presupuesto->solapas_ancho mm.)" : "NO" ?></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>
|
||||
@ -1,36 +0,0 @@
|
||||
<table>
|
||||
<tr>
|
||||
<th class="encuadernacion">Encuadernacion</th>
|
||||
<th class="cell-50">Pliegos</th>
|
||||
<th class="cell-50">Pliegos</th>
|
||||
<th class="cell-50">Guardas</th>
|
||||
<th class="cell-50">Guardas Impresion</th>
|
||||
<th class="cell-50">Cabezada</th>
|
||||
<th class="cell-50">Lomo</th>
|
||||
</tr>
|
||||
<?php if (count($encuadernaciones) > 0): ?>
|
||||
<?php foreach ($encuadernaciones as $key => $value): ?>
|
||||
<tr style="color: red;">
|
||||
<td><?= $value->tarifa()->nombre ?></td>
|
||||
<td><?=$tareaCosido->pliego_1." de ".$tareaCosido->pliego_1_total?></td>
|
||||
<td><?=$tareaCosido->pliego_2." de ".$tareaCosido->pliego_2_total?></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td>Color/NO</td>
|
||||
<td>Recto/Redondo</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="encuadernacion" colspan="1">Sobrecubierta</td>
|
||||
<td style="color:red" colspan="2"><?= $linea_impresion->isSobreCubierta() ? "SI" : "NO" ?></td>
|
||||
<td class="encuadernacion">Retractilado</td>
|
||||
<td style="color:red"><?= $presupuesto->retractilado ? "SI" : "NO" ?></td>
|
||||
<td class="encuadernacion">Marcapáginas</td>
|
||||
<td style="color:red"><?= $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>
|
||||
48
ci4/app/Views/themes/vuexy/pdfs/encuadernados/TDCF.php
Normal file
48
ci4/app/Views/themes/vuexy/pdfs/encuadernados/TDCF.php
Normal file
@ -0,0 +1,48 @@
|
||||
<table>
|
||||
<tr>
|
||||
<th class="encuadernacion">Encuadernacion</th>
|
||||
<th class="cell-50">Pliegos</th>
|
||||
<th class="cell-50">Pliegos</th>
|
||||
<th class="cell-50">Guardas</th>
|
||||
<th class="cell-50">Guardas Impresion</th>
|
||||
<th class="cell-50">Cabezada</th>
|
||||
<th class="cell-50">Lomo</th>
|
||||
</tr>
|
||||
<?php if (count($encuadernaciones) > 0): ?>
|
||||
<tr style="color: red;">
|
||||
<td><?= $encuadernacion->tarifa()->nombre ?></td>
|
||||
<?php if ($tareaCosido): ?>
|
||||
<td><?= $tareaCosido->pliego_1 . " de " . $tareaCosido->pliego_1_total ?></td>
|
||||
<td><?= $tareaCosido->pliego_2 . " de " . $tareaCosido->pliego_2_total ?></td>
|
||||
<?php else: ?>
|
||||
<td><?= "___de___" ?></td>
|
||||
<td><?= "___de___" ?></td>
|
||||
<?php endif; ?>
|
||||
|
||||
<!-- Guardas -->
|
||||
<?php if ($presupuesto->presupuestoLineaGuarda()): ?>
|
||||
<td><?= $presupuesto->presupuestoLineaGuarda()->papel_generico()?->code ?></td>
|
||||
<td><?= $presupuesto->presupuestoLineaGuarda()->paginas_impresion > 0 ? "SI" : "NO" ?></td>
|
||||
<?php else: ?>
|
||||
<td>?</td>
|
||||
<td><?= $presupuesto->presupuestoLineaGuarda()->paginas_impresion > 0 ? "SI" : "NO" ?>></td>
|
||||
<?php endif; ?>
|
||||
<!-- Cabezada -->
|
||||
<td><?= $presupuesto->cabezada ? "COLOR" : "NO" ?></td>
|
||||
<!-- Lomo -->
|
||||
<td><?= $presupuesto->lomo_redondo ? "REDONDO" : "RECTO" ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="encuadernacion" colspan="1">Sobrecubierta</td>
|
||||
<td style="color:red" colspan="2"><?= $linea_impresion->isSobreCubierta() ? "SI" : "NO" ?></td>
|
||||
<td class="encuadernacion">Retractilado</td>
|
||||
<td style="color:red"><?= $presupuesto->retractilado ? "SI" : "NO" ?></td>
|
||||
<td class="encuadernacion">Marcapáginas</td>
|
||||
<td style="color:red"><?= $presupuesto->marcapaginas ? "SI" : "NO" ?></td>
|
||||
</tr>
|
||||
<?php else: ?>
|
||||
<tr style="color: red;">
|
||||
<td colspan="7">Sin encuadernación</td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
</table>
|
||||
@ -1,6 +1,6 @@
|
||||
<table>
|
||||
<tr class="encuadernacion">
|
||||
<th >Encuadernacion</th>
|
||||
<th>Encuadernacion</th>
|
||||
<th class="cell-50">Guardas</th>
|
||||
<th class="cell-50">Guardas Imp.</th>
|
||||
<th class="cell-50">Cabezada</th>
|
||||
@ -10,18 +10,27 @@
|
||||
<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></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td><?= $encuadernacion->tarifa()->nombre ?></td>
|
||||
<!-- Guardas -->
|
||||
<?php if ($presupuesto->presupuestoLineaGuarda()): ?>
|
||||
<td><?= $presupuesto->presupuestoLineaGuarda()->papel_generico()?->nombre ?></td>
|
||||
<td><?= $presupuesto->presupuestoLineaGuarda()->paginas_impresion > 0 ? "SI" : "NO" ?>></td>
|
||||
<?php else: ?>
|
||||
<td>?</td>
|
||||
<td><?= $presupuesto->presupuestoLineaGuarda()->paginas_impresion > 0 ? "SI" : "NO" ?>></td>
|
||||
<?php endif; ?>
|
||||
<!-- Cabezada -->
|
||||
<td><?= $presupuesto->cabezada ? "COLOR" : "NO" ?></td>
|
||||
<!-- Lomo -->
|
||||
<td><?= $presupuesto->lomo_redondo ? "REDONDO" : "RECTO" ?></td>
|
||||
<!-- Sobrecubierta -->
|
||||
<td><?= $linea_impresion->isSobreCubierta() ? "SI" : "NO" ?></td>
|
||||
<!-- Retractilado -->
|
||||
<td><?= $presupuesto->retractilado ? "SI" : "NO" ?></td>
|
||||
<!-- Marcapaginas -->
|
||||
<td><?= $presupuesto->marcapaginas ? "SI" : "NO" ?></td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
<?php else: ?>
|
||||
<tr style="color: red;">
|
||||
<td colspan="7">Sin encuadernación</td>
|
||||
|
||||
@ -1,7 +1,4 @@
|
||||
<table>
|
||||
<caption>
|
||||
WIO
|
||||
</caption>
|
||||
<tr class="encuadernacion">
|
||||
<th class="cell-50">Encuadernacion</th>
|
||||
<th class="cell-50">Color</th>
|
||||
@ -11,16 +8,14 @@
|
||||
<th class="cell-50">Retractilado</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><?= $encuadernacion->tarifa()->nombre ?></td>
|
||||
<td></td>
|
||||
<td><?= $flags['isPlakene'] ? "SI" : "NO" ?></td>
|
||||
<td><?= $plakene_tipo ?? "" ?></td>
|
||||
<td><?= $encuadernacion->proveedor() ? $encuadernacion->proveedor()->nombre : "" ?></td>
|
||||
<td><?= $presupuesto->retractilado ? "SI" : "NO" ?></td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
<?php else: ?>
|
||||
<tr style="color: red;">
|
||||
<td colspan="7">Sin encuadernación</td>
|
||||
|
||||
@ -10,9 +10,8 @@
|
||||
<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><?= $encuadernacion->tarifa()->nombre ?></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
@ -21,7 +20,6 @@
|
||||
<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>
|
||||
|
||||
@ -85,9 +85,9 @@ $settings = $session->get('settings');
|
||||
</div>
|
||||
</div>
|
||||
<div class="row px-2 mt-2 h-100">
|
||||
<table class="h-100">
|
||||
<table class="h-100 bg-white">
|
||||
<tr>
|
||||
<th>IN</th>
|
||||
<th class="bg-white">IN</th>
|
||||
<td class="t-cell bg-white"><?= $ubicacion ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -113,7 +113,7 @@ $settings = $session->get('settings');
|
||||
<div class="col-5">
|
||||
<div class="row">
|
||||
<div class="col-12 w-50 text-center" style="background-color: <?= $colors["ot"]["bg"] ?>;color:<?= $colors["ot"]["color"] ?>;">
|
||||
<strong><?= isset($encuadernaciones[0]) ? $encuadernaciones[0]->tarifa()->code ?? "" : "" ?></strong>
|
||||
<strong><?= $encuadernacionCode ?></strong>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row h-75">
|
||||
@ -308,27 +308,30 @@ $settings = $session->get('settings');
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<div class="row mb-2">
|
||||
<div class="section-title encuadernacion">ENCUADERNACIÓN</div>
|
||||
<div class="section-title encuadernacion">ACABADOS/ENCUADERNACIÓN</div>
|
||||
<div class="col-12">
|
||||
<div class="col-1 w-10 mb-2 text-center" style="background-color: <?= $colors["ot"]["bg"] ?>;color:<?= $colors["ot"]["color"] ?>;">
|
||||
<span class="fs-bold"><?= isset($encuadernaciones[0]) ? $encuadernaciones[0]->tarifa()->code ?? "" : "" ?></span>
|
||||
<span class="fs-bold"><?= $encuadernacionCode ?></span>
|
||||
</div>
|
||||
<table>
|
||||
<tr>
|
||||
<td class="w-10 encuadernacion">Plastificado</td>
|
||||
<td><?= $acabados[0]->tarifa()->nombre ?></td>
|
||||
<td class="encuadernacion bg-encuadernacion" style="width: 100px;">UVI</td>
|
||||
<td style="color:red;width:100px" class="bg-encuadernacion"> <?= $uvi ? 'SI' : "NO" ?> </td>
|
||||
<td class="encuadernacion bg-encuadernacion" style="width: 100px;">EXTERNO:</td>
|
||||
<td class="bg-encuadernacion" style="width: 100px;"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="text-start" colspan="2">Meter datos de solapas y preparación guillotina</td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td class="t-header">CORTE PIE:</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<?php foreach ($acabados as $key => $acabado): ?>
|
||||
<tr>
|
||||
<td class="w-10 encuadernacion">Plastificado</td>
|
||||
<td><?= $acabado->tarifa()->nombre ?></td>
|
||||
<td class="encuadernacion bg-encuadernacion" style="width: 100px;">UVI</td>
|
||||
<td style="color:red;width:100px" class="bg-encuadernacion"> <?= $uvi ? 'SI' : "NO" ?> </td>
|
||||
<td class="encuadernacion bg-encuadernacion" style="width: 100px;">EXTERNO:</td>
|
||||
<td class="bg-encuadernacion" style="width: 100px;"><?= $acabado->proveedor() ? $acabado->proveedor()->nombre : "" ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="text-start" colspan="2">Meter datos de solapas y preparación guillotina</td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td class="t-header">CORTE PIE:</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
|
||||
</table>
|
||||
|
||||
<?php
|
||||
@ -336,13 +339,12 @@ $settings = $session->get('settings');
|
||||
$encuadernacion_code = $encuadernacion->tarifa()->code;
|
||||
try {
|
||||
if ($encuadernacion_code) {
|
||||
echo view("/themes/vuexy/pdfs/encuadernados/$encuadernacion_code.php");
|
||||
echo view("/themes/vuexy/pdfs/encuadernados/$encuadernacion_code.php", ["encuadernacion" => $encuadernacion]);
|
||||
} else {
|
||||
echo view("/themes/vuexy/pdfs/encuadernados/default.php");
|
||||
echo view("/themes/vuexy/pdfs/encuadernados/default.php", ["encuadernacion" => $encuadernacion]);
|
||||
}
|
||||
} 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>";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user