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,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;
|
||||
|
||||
Reference in New Issue
Block a user