mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
Merge branch 'add/view_logistica_principal' of https://git.imnavajas.es/jjimenez/safekat into add/view_logistica_principal
This commit is contained in:
@ -25,6 +25,7 @@ class OrdenTrabajo extends BaseConfig
|
||||
"retractilado5_at" => "retractilado5_user_id",
|
||||
"prototipo_at" => "prototipo_user_id",
|
||||
"marcapaginas_at" => "marcapaginas_user_id",
|
||||
"espiral_at" => "espiral_user_id",
|
||||
//FERRO
|
||||
"pendiente_ferro_at" => "pendiente_ferro_user_id",
|
||||
"ferro_en_cliente_at" => "ferro_en_cliente_user_id",
|
||||
@ -57,12 +58,66 @@ class OrdenTrabajo extends BaseConfig
|
||||
"cosido" => "#FF0B55",
|
||||
"grapado" => "#FEBA17",
|
||||
"encuadernado" => "#FEBA17",
|
||||
"corte" => "#67AE6E"
|
||||
"corte" => "#67AE6E"
|
||||
];
|
||||
public array $OT_WEEK_COLOR_DAY = [
|
||||
["bg" => "#FFFFFF", "color" => "black"],
|
||||
["bg" => "yellow", "color" => "black"],
|
||||
["bg" => "purple", "color" => "white"],
|
||||
["bg" => "orange", "color" => "white"],
|
||||
["bg" => "blue", "color" => "black"],
|
||||
["bg" => "pink", "color" => "black"],
|
||||
["bg" => "#FFFFFF", "color" => "black"],
|
||||
];
|
||||
public array $OT_ENCUADERNACION_COLOR = [
|
||||
"RF" => ["bg" => "#FF9900", "color" => "white"],
|
||||
"RFS" => ["bg" => "#FF9900", "color" => "white"],
|
||||
"RCHV" => ["bg" => "#FF9900", "color" => "blue"],
|
||||
"RCHVS" => ["bg" => "#FF9900", "color" => "blue"],
|
||||
"CC2" => ["bg" => "#104861", "color" => "yellow"],
|
||||
"CC2S" => ["bg" => "#104861", "color" => "yellow"],
|
||||
"TDF" => ["bg" => "#E49EDD", "color" => "white"],
|
||||
"TDC" => ["bg" => "#E49EDD", "color" => "blue"],
|
||||
"default" => ["bg" => "#FFFF00", "color" => "red"],
|
||||
];
|
||||
public array $OT_BACKGROUND_COLOR = [
|
||||
"ferro_digital" => ["bg" => "#BFBFBF","color" => "black"],
|
||||
"ferro" => ["bg" => "#BFBFBF","color" => "black"],
|
||||
"prototipo" => ["bg" => "#BFBFBF","color" => "black"],
|
||||
"pod" => ["bg" => "#47D359","color" => "black"],
|
||||
"inaplazable" => ["bg" => "red","color" => "white"],
|
||||
"default" => ["bg" => "#FFFFFF","color" => "black"]
|
||||
];
|
||||
public array $OT_PAPEL_COLOR =
|
||||
[
|
||||
"blanco" => ["bg" => "#FFFFFF", "color" => "black"],
|
||||
"ahuesado" => ["bg" => "#FFF2CC", "color" => "black"],
|
||||
"marfil" => ["bg" => "#FFD966", "color" => "black"],
|
||||
"volumen_ahuesado" => ["bg" => "#BF8F00", "color" => "black"],
|
||||
"estucado_mate" => ["bg" => "#BDD7EE", "color" => "black"],
|
||||
"cartulina" => ["bg" => "#C6E0B4", "color" => "black"],
|
||||
"default" => ["bg" => "#FFCCFF", "color" => "black"],
|
||||
];
|
||||
public array $OT_PLASTIFICADO_COLOR =
|
||||
[
|
||||
"BRIL" => ["bg" => "#00B0F0", "color" => "white"],
|
||||
"MATE" => ["bg" => "#FF0000", "color" => "white"],
|
||||
"SOFT_TOUCH" => ["bg" => "#00B050", "color" => "white"],
|
||||
"SANDY" => ["bg" => "#782170", "color" => "white"],
|
||||
"ANTIRAYADO" => ["bg" => "#E97132", "color" => "white"],
|
||||
"GOFRADO" => ["bg" => "#FFFF00", "color" => "black"],
|
||||
"default" => ["bg" => "#FFFFFF", "color" => "black"],
|
||||
];
|
||||
public array $OT_IMPRESION_INTERIOR_PPAL_COLOR =
|
||||
[
|
||||
"ROTATIVA" => ["bg" => "white", "color" => "red"],
|
||||
"POD" => ["bg" => "white", "color" => "#47D359"],
|
||||
"GENERAL" => ["bg" => "white", "color" => "#A02B93"],
|
||||
"default" => ["bg" => "white", "color" => "black"],
|
||||
];
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -147,11 +147,18 @@ class Ordentrabajo extends BaseController
|
||||
];
|
||||
$this->viewData["modelId"] = $orden_trabajo_id;
|
||||
$this->produccionService->init($orden_trabajo_id);
|
||||
$this->produccionService->reInsertOrdenTrabajoDates();
|
||||
$this->produccionService->reInsertOrdenTrabajoUsers();
|
||||
$this->viewData["presupuesto"] = $this->produccionService->getPresupuesto();
|
||||
$this->viewData["cliente"] = $this->produccionService->getCliente();
|
||||
$this->viewData["ot"] = $this->produccionService->getOrdenTrabajo();
|
||||
$this->viewData["is_finalizada"] = $this->produccionService->getOrdenTrabajo()->estado == "F";
|
||||
$this->viewData["user_dates"] = $this->produccionService->userDates();
|
||||
$this->viewData["pedido_user_dates"] = $this->produccionService->pedidoUserDates();
|
||||
$this->viewData["colors"] = $this->produccionService->getPdfColors();
|
||||
$this->viewData["tiempo_estimado"] = $this->produccionService->getTiempoProcesamientoHHMM();
|
||||
$this->viewData["flags"] = $this->produccionService->getFlags();
|
||||
|
||||
|
||||
return view(static::$viewPath . $this->editRoute, $this->viewData);
|
||||
}
|
||||
@ -166,7 +173,7 @@ class Ordentrabajo extends BaseController
|
||||
->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()])
|
||||
->edit(
|
||||
"fecha_encuadernado_at",
|
||||
fn($q) => $q->fecha_encuadernado_at ? Time::createFromFormat("Y-m-d", $q->fecha_encuadernado_at)->format("d/m/Y") : ""
|
||||
fn($q) => $q->fecha_encuadernado_at ? Time::createFromFormat("Y-m-d H:i:s", $q->fecha_encuadernado_at)->format("d/m/Y") : ""
|
||||
)
|
||||
->add("action", fn($q) => $q->id)
|
||||
->toJson(true);
|
||||
@ -181,7 +188,7 @@ class Ordentrabajo extends BaseController
|
||||
->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()])
|
||||
->edit(
|
||||
"fecha_encuadernado_at",
|
||||
fn($q) => $q->fecha_encuadernado_at ? Time::createFromFormat("Y-m-d", $q->fecha_encuadernado_at)->format("d/m/Y") : ""
|
||||
fn($q) => $q->fecha_encuadernado_at ? Time::createFromFormat("Y-m-d H:i:s", $q->fecha_encuadernado_at)->format("d/m/Y") : ""
|
||||
)
|
||||
->add("action", fn($q) => $q->id)
|
||||
->toJson(true);
|
||||
@ -196,7 +203,7 @@ class Ordentrabajo extends BaseController
|
||||
->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()])
|
||||
->edit(
|
||||
"fecha_encuadernado_at",
|
||||
fn($q) => $q->fecha_encuadernado_at ? Time::createFromFormat("Y-m-d", $q->fecha_encuadernado_at)->format("d/m/Y") : ""
|
||||
fn($q) => $q->fecha_encuadernado_at ? Time::createFromFormat("Y-m-d H:i:s", $q->fecha_encuadernado_at)->format("d/m/Y") : ""
|
||||
)
|
||||
->add("action", fn($q) => $q->id)
|
||||
->toJson(true);
|
||||
@ -211,7 +218,7 @@ class Ordentrabajo extends BaseController
|
||||
->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()])
|
||||
->edit(
|
||||
"fecha_encuadernado_at",
|
||||
fn($q) => $q->fecha_encuadernado_at ? Time::createFromFormat("Y-m-d", $q->fecha_encuadernado_at)->format("d/m/Y") : ""
|
||||
fn($q) => $q->fecha_encuadernado_at ? Time::createFromFormat("Y-m-d H:i:s", $q->fecha_encuadernado_at)->format("d/m/Y") : ""
|
||||
)
|
||||
->add("action", fn($q) => $q->id)
|
||||
->toJson(true);
|
||||
|
||||
@ -0,0 +1,41 @@
|
||||
<?php
|
||||
|
||||
namespace App\Database\Migrations;
|
||||
|
||||
use CodeIgniter\Database\Migration;
|
||||
use CodeIgniter\Database\RawSql;
|
||||
|
||||
class AddEspiralOrdenTrabajoDates extends Migration
|
||||
{
|
||||
protected array $DATES = [
|
||||
"espiral_at" => [
|
||||
"type" => "DATE",
|
||||
"null" => true,
|
||||
],
|
||||
];
|
||||
protected array $USERS = [
|
||||
"espiral_user_id" => [
|
||||
"type" => "INT",
|
||||
"unsigned" => true,
|
||||
"constraint" => 10,
|
||||
"null" => true,
|
||||
],
|
||||
];
|
||||
|
||||
public function up()
|
||||
{
|
||||
$this->forge->addColumn("orden_trabajo_dates", $this->DATES);
|
||||
$this->forge->addColumn("orden_trabajo_users", $this->USERS);
|
||||
foreach ($this->USERS as $key => $value) {
|
||||
$this->forge->addForeignKey([$key],"users",["id"]);
|
||||
}
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
$this->forge->dropColumn("orden_trabajo_dates", array_keys($this->DATES));
|
||||
$this->forge->dropColumn("orden_trabajo_users", array_keys($this->USERS));
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@ -54,4 +54,5 @@ class PresupuestoAcabadosEntity extends \CodeIgniter\Entity\Entity
|
||||
$m = model(TarifaAcabadoModel::class);
|
||||
return $m->find($this->attributes["tarifa_acabado_id"]);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -4,8 +4,10 @@ namespace App\Entities\Presupuestos;
|
||||
|
||||
use App\Entities\Clientes\ClienteEntity;
|
||||
use App\Entities\Configuracion\PapelFormatoEntity;
|
||||
use App\Entities\Configuracion\TipoPresupuestoEntity;
|
||||
use App\Models\Clientes\ClienteModel;
|
||||
use App\Models\Configuracion\PapelFormatoModel;
|
||||
use App\Models\Configuracion\TipoPresupuestoModel;
|
||||
use App\Models\Presupuestos\PresupuestoAcabadosModel;
|
||||
use App\Models\Presupuestos\PresupuestoEncuadernacionesModel;
|
||||
use App\Models\Presupuestos\PresupuestoFicheroModel;
|
||||
@ -300,4 +302,15 @@ class PresupuestoEntity extends \CodeIgniter\Entity\Entity
|
||||
$files = $m->where('presupuesto_id',$this->attributes['id'])->findAll();
|
||||
return $files ?? [];
|
||||
}
|
||||
public function tipo_presupuesto() : ?TipoPresupuestoEntity
|
||||
{
|
||||
$tipo_presupuesto = null;
|
||||
$m = model(TipoPresupuestoModel::class);
|
||||
if($this->attributes["tipo_impresion_id"]){
|
||||
$tipo_presupuesto = $m->find($this->attributes['tipo_impresion_id']);
|
||||
}
|
||||
return $tipo_presupuesto;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -23,11 +23,12 @@ class OrdenTrabajoDateEntity extends Entity
|
||||
"entrada_manipulado_at" => null,
|
||||
"cosido_at" => null,
|
||||
"solapa_at" => null,
|
||||
"cosido_at" => null,
|
||||
"grapado_at" => null,
|
||||
"retractilado_at"=> null,
|
||||
"retractilado5_at"=> null,
|
||||
"prototipo_at"=> null,
|
||||
"marcapaginas_at"=> null,
|
||||
"espiral_at"=> null,
|
||||
//FERRO
|
||||
"pendiente_ferro_at" => null,
|
||||
"ferro_en_cliente_at" => null,
|
||||
|
||||
@ -74,6 +74,11 @@ class OrdenTrabajoEntity extends Entity
|
||||
$m = model(OrdenTrabajoTarea::class);
|
||||
return $m->where("orden_trabajo_id", $this->attributes["id"])->findAll();
|
||||
}
|
||||
public function tareas_impresion() : array
|
||||
{
|
||||
$m = model(OrdenTrabajoTarea::class);
|
||||
return $m->where("orden_trabajo_id", $this->attributes["id"])->where("presupuesto_linea_id IS NOT NULL", NULL, FALSE)->findAll() ?? [];
|
||||
}
|
||||
/**
|
||||
* Devuelve el pedido de la orden de trabajo
|
||||
*
|
||||
@ -148,4 +153,14 @@ class OrdenTrabajoEntity extends Entity
|
||||
}
|
||||
return $portada_path;
|
||||
}
|
||||
public function getEstadoText(): string
|
||||
{
|
||||
$estados = [
|
||||
"E" => lang('Produccion.error'),
|
||||
"I" => lang('Produccion.iniciada'),
|
||||
"F" => lang('Produccion.finalizada'),
|
||||
"PM" => lang("Produccion.pendiente_material")
|
||||
];
|
||||
return $estados[$this->attributes["estado"]];
|
||||
}
|
||||
}
|
||||
|
||||
@ -45,4 +45,9 @@ class TarifaAcabadoEntity extends \CodeIgniter\Entity\Entity
|
||||
$ta_maquinas = $m->where('tarifa_acabado_id',$this->attributes['id'])->findAll();
|
||||
return array_map(fn(TarifaAcabadoMaquinaEntity $ta_maquina) => $ta_maquina->maquina(),$ta_maquinas);
|
||||
}
|
||||
|
||||
public function isUVI(): bool
|
||||
{
|
||||
return in_array($this->attributes["code"],["R3D","R2D"]);
|
||||
}
|
||||
}
|
||||
|
||||
@ -71,6 +71,7 @@ return [
|
||||
"tiempo_consumido" => "Tiempo consumido",
|
||||
"tiempo_estimado" => "Tiempo estimado",
|
||||
"finalizar_orden" => "Finalizar orden",
|
||||
"reactivar_orden" => "Reactivar",
|
||||
"comments" => "Comentarios orden trabajo",
|
||||
"preview_pdf" => "Previsualizar PDF",
|
||||
"imprimir_codigo_safekat" => "Imprimir código SAFEKAT",
|
||||
@ -105,13 +106,22 @@ return [
|
||||
"pre_codbarras" => "Revisión código barras",
|
||||
"pre_imposicion" => "Revisión imposición",
|
||||
|
||||
|
||||
"iniciada" => "Iniciada",
|
||||
"finalizada" => "Finalizada",
|
||||
"error" => "Error",
|
||||
"pendiente_material" => "Pendiente material",
|
||||
"empty" => "Vacio",
|
||||
|
||||
"errors" => [
|
||||
"date_not_exist" => "Esta fecha no existe en el modelo",
|
||||
"attr_not_exist" => "El atributo {0,string} no pertenece al modelo Pedido"
|
||||
|
||||
]
|
||||
],
|
||||
|
||||
"progress_preimpresion" => "Preimpresión",
|
||||
"progress_logistica" => "Ferro/Logística",
|
||||
"progress_impresion" => "Impresión",
|
||||
"progress_manipulado" => "Manipulado/Acabado"
|
||||
|
||||
|
||||
|
||||
|
||||
@ -30,11 +30,12 @@ class OrdenTrabajoDate extends Model
|
||||
"entrada_manipulado_at",
|
||||
"cosido_at",
|
||||
"solapa_at",
|
||||
"cosido_at",
|
||||
"grapado_at",
|
||||
"retractilado_at",
|
||||
"retractilado5_at",
|
||||
"prototipo_at",
|
||||
"marcapaginas_at",
|
||||
"espiral_at",
|
||||
//FERRO
|
||||
"pendiente_ferro_at",
|
||||
"ferro_en_cliente_at",
|
||||
|
||||
@ -73,7 +73,7 @@ class OrdenTrabajoModel extends Model
|
||||
->select([
|
||||
"ordenes_trabajo.id",
|
||||
"ordenes_trabajo.pedido_id",
|
||||
"orden_trabajo_dates.fecha_encuadernado_at",
|
||||
"pedidos.fecha_encuadernado as fecha_encuadernado_at",
|
||||
"clientes.nombre as cliente_nombre",
|
||||
"presupuestos.titulo as presupuesto_titulo",
|
||||
"ordenes_trabajo.estado",
|
||||
|
||||
@ -16,6 +16,7 @@ use CodeIgniter\Config\BaseService;
|
||||
use App\Entities\Configuracion\Maquina as MaquinaEntity;
|
||||
use App\Entities\Produccion\OrdenTrabajoFileEntity;
|
||||
use App\Entities\Produccion\OrdenTrabajoTareaEntity;
|
||||
use App\Entities\Tarifas\Acabados\TarifaAcabadoEntity;
|
||||
use App\Models\Configuracion\ConfigVariableModel;
|
||||
use App\Models\Configuracion\MaquinaModel;
|
||||
use App\Models\OrdenTrabajo\OrdenTrabajoFileModel;
|
||||
@ -34,7 +35,17 @@ use Exception;
|
||||
*/
|
||||
class ProductionService extends BaseService
|
||||
{
|
||||
/**
|
||||
* Tipos de impresion para identificar linea de impresion plana/general
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
public array $TIPOS_PLANA = ['lp_bn', 'lp_color', 'lp_colorhq'];
|
||||
/**
|
||||
* Tipos de impresion para idenficiar si es rotativa
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
public array $TIPOS_ROTATIVA = ['lp_rot_bn', 'lp_rot_color'];
|
||||
|
||||
protected OrdenTrabajoModel $otModel;
|
||||
@ -46,12 +57,99 @@ class ProductionService extends BaseService
|
||||
protected OrdenTrabajoFileModel $otFileModel;
|
||||
protected PedidoModel $pedidoModel;
|
||||
protected UserModel $userModel;
|
||||
protected string $defaultMaquinaCorteName = 'HT-1000';
|
||||
protected ConfigVariableModel $configVariableModel;
|
||||
protected MaquinaEntity $defaultMaquinaCorte;
|
||||
protected MaquinaModel $maquinaModel;
|
||||
protected OrdenTrabajo $ordenTrabajoConfig;
|
||||
public string $statusColor;
|
||||
|
||||
|
||||
/**
|
||||
* Nombre de la maquina por defecto para realizar la tarea de corte.
|
||||
*
|
||||
* @var string 'HT-1000'
|
||||
*/
|
||||
protected string $defaultMaquinaCorteName = 'HT-1000';
|
||||
/**
|
||||
* Color del header en el formulario de orden de trabajo
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public string $statusColor;
|
||||
/**
|
||||
* Valor límite del POD
|
||||
*
|
||||
* `$this->configVariableModel->getVariable('POD')->value;`
|
||||
* @var integer
|
||||
*/
|
||||
protected int $podValue = 0;
|
||||
/**
|
||||
* Indica si es POD
|
||||
*
|
||||
* `tirada <= podValue`
|
||||
* @var boolean
|
||||
*/
|
||||
protected bool $isPOD = false;
|
||||
|
||||
/**
|
||||
* Indica si la orden de trabajo contiene gofrado
|
||||
* Se usa para mostrar la fecha correspondiente en la vista
|
||||
* @var boolean
|
||||
*/
|
||||
public bool $isGofrado = false; //* CHECK DONE
|
||||
/**
|
||||
* 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
|
||||
* @var boolean
|
||||
*/
|
||||
public bool $isGrapado = true; //TODO
|
||||
/**
|
||||
* Indica si la orden de trabajo contiene espiral
|
||||
* Se usa para mostrar la fecha correspondiente en la vista
|
||||
* TODO Hay que implementar un boolean en `lg_tarifa_manipulado` para identificar
|
||||
* DEFAULT true hasta implementacion
|
||||
* @var boolean
|
||||
*/
|
||||
public bool $isEspiral = true; //TODO
|
||||
/**
|
||||
* Indica si la orden de trabajo contiene UVI
|
||||
* Se usa para mostrar la fecha correspondiente en la vista
|
||||
* @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
|
||||
* @var boolean
|
||||
*/
|
||||
public bool $isCubierta = false; //* CHECK DONE
|
||||
/**
|
||||
* Indica si la impresion es en color
|
||||
* Se usa para mostrar la fecha correspondiente en la vista
|
||||
* @var boolean
|
||||
*/
|
||||
public bool $isColor = false; //* CHECK DONE
|
||||
/**
|
||||
* Indica si la impresion es en bn
|
||||
* Se usa para mostrar la fecha correspondiente en la vista
|
||||
* @var boolean
|
||||
*/
|
||||
public bool $isBN = false; //* CHECK DONE
|
||||
/**
|
||||
* Indica si hay una tarea de corte
|
||||
* Se usa para mostrar la fecha correspondiente en la vista
|
||||
* ! Se añade por defecto siempre en una rotativa una tarea de corte
|
||||
* @var boolean
|
||||
*/
|
||||
public bool $isCorte = false; //* CHECK DONE
|
||||
/**
|
||||
* Pedido Entity
|
||||
*
|
||||
@ -76,11 +174,13 @@ class ProductionService extends BaseService
|
||||
$this->pedidoModel = model(PedidoModel::class);
|
||||
$this->ordenTrabajoConfig = config('OrdenTrabajo');
|
||||
$this->statusColor = $this->ordenTrabajoConfig->OT_COLORS["sin_imprimir"];
|
||||
$this->configVariableModel = model(ConfigVariableModel::class);
|
||||
$this->podValue = $this->configVariableModel->getVariable('POD')->value;
|
||||
}
|
||||
|
||||
public function init(int $orden_trabajo_id): self
|
||||
{
|
||||
try {
|
||||
//code...
|
||||
$this->maquinaModel = model(MaquinaModel::class);
|
||||
$this->otModel = model(OrdenTrabajoModel::class);
|
||||
$this->ot = $this->otModel->find($orden_trabajo_id);
|
||||
@ -90,7 +190,6 @@ class ProductionService extends BaseService
|
||||
$this->statusColor = $this->ordenTrabajoConfig->OT_COLORS["sin_imprimir"];
|
||||
return $this;
|
||||
} catch (\Throwable $th) {
|
||||
dd($orden_trabajo_id);
|
||||
throw $th;
|
||||
}
|
||||
}
|
||||
@ -107,6 +206,7 @@ class ProductionService extends BaseService
|
||||
$this->otModel = model(OrdenTrabajoModel::class);
|
||||
$this->otDate = model(OrdenTrabajoDate::class);
|
||||
$this->otTarea = model(OrdenTrabajoTarea::class);
|
||||
$this->isPOD = $this->presupuesto->tirada <= $this->podValue;
|
||||
return $this;
|
||||
}
|
||||
/**
|
||||
@ -141,10 +241,10 @@ class ProductionService extends BaseService
|
||||
];
|
||||
$id = $this->otModel->insert($data);
|
||||
$this->init($id);
|
||||
$this->updatePedidoEspera();
|
||||
$this->storeOrdenTrabajoUsers();
|
||||
$this->storeOrdenTrabajoDates();
|
||||
$this->storeAllTareas();
|
||||
$this->updatePedidoEspera();
|
||||
return $this->ot;
|
||||
}
|
||||
|
||||
@ -171,12 +271,48 @@ class ProductionService extends BaseService
|
||||
$this->otDate->updateUserDateMap($this->ot->id, $data);
|
||||
return $otDateId;
|
||||
}
|
||||
/**
|
||||
* Crea un registro en `orden_trabajo_users`
|
||||
*
|
||||
* @return integer|boolean|string
|
||||
*/
|
||||
protected function storeOrdenTrabajoUsers(): int|bool|string
|
||||
{
|
||||
return $this->otUser->insert([
|
||||
"orden_trabajo_id" => $this->ot->id,
|
||||
]);
|
||||
}
|
||||
/**
|
||||
* Crea un registro en `orden_trabajo_users` si no ha sido creado previamente
|
||||
*
|
||||
* @return integer|boolean|string
|
||||
*/
|
||||
public function reInsertOrdenTrabajoUsers(): int|bool|string
|
||||
{
|
||||
$status = false;
|
||||
if ($this->otUser->where('orden_trabajo_id', $this->ot->id)->countAllResults() == 0) {
|
||||
$status = $this->storeOrdenTrabajoUsers();
|
||||
}
|
||||
return $status;
|
||||
}
|
||||
/**
|
||||
* Crea un registro en `orden_trabajo_dates` si no ha sido creado previamente
|
||||
*
|
||||
* @return integer|boolean|string
|
||||
*/
|
||||
public function reInsertOrdenTrabajoDates(): int|bool|string
|
||||
{
|
||||
$status = false;
|
||||
if ($this->otDate->where('orden_trabajo_id', $this->ot->id)->countAllResults() == 0) {
|
||||
$status = $this->storeOrdenTrabajoDates();
|
||||
}
|
||||
return $status;
|
||||
}
|
||||
/**
|
||||
* General las correspondientes tareas de la orden de trabajo en la table `orden_trabajo_tareas`
|
||||
*
|
||||
* @return integer|boolean|string
|
||||
*/
|
||||
protected function storeAllTareas()
|
||||
{
|
||||
$this->storeOrdenTrabajoTareas();
|
||||
@ -186,6 +322,12 @@ class ProductionService extends BaseService
|
||||
$this->storeOrdenTrabajoEncuadernacionTareas();
|
||||
// $this->storeOrdenTrabajoExtraTareas();
|
||||
}
|
||||
/**
|
||||
* Regenera las tareas.
|
||||
* !! Se eliminan las que hay previamente sin `softDelete`
|
||||
*
|
||||
* @return integer|boolean|string
|
||||
*/
|
||||
public function resetAllTareas(): BaseResult|bool
|
||||
{
|
||||
$r = $this->otTarea->where("orden_trabajo_id", $this->ot->id)->delete(purge: true);
|
||||
@ -222,6 +364,12 @@ class ProductionService extends BaseService
|
||||
}
|
||||
return $insert_query_result;
|
||||
}
|
||||
/**
|
||||
* Inserta una tarea de corte si la impresion es en `rotativa`
|
||||
*
|
||||
* @param PresupuestoLineaEntity $pLinea
|
||||
* @return OrdenTrabajoTareaEntity|null
|
||||
*/
|
||||
protected function storeTareaCorte(PresupuestoLineaEntity $pLinea): ?OrdenTrabajoTareaEntity
|
||||
{
|
||||
$otCorte = null;
|
||||
@ -242,6 +390,11 @@ class ProductionService extends BaseService
|
||||
return $otCorte;
|
||||
}
|
||||
|
||||
/**
|
||||
* General las tareas de acabado segun las líneas de presupuesto_acabados
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
protected function storeOrdenTrabajoAcabadoTareas(): bool
|
||||
{
|
||||
$p_lineas = $this->presupuesto_lineas_acabado();
|
||||
@ -268,6 +421,11 @@ class ProductionService extends BaseService
|
||||
}
|
||||
return true;
|
||||
}
|
||||
/**
|
||||
* General las tareas de acabado segun las líneas de presupuesto_manipulados
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
protected function storeOrdenTrabajoManipuladoTareas(): bool
|
||||
{
|
||||
$p_lineas = $this->presupuesto_lineas_manipulado();
|
||||
@ -294,6 +452,11 @@ class ProductionService extends BaseService
|
||||
}
|
||||
return true;
|
||||
}
|
||||
/**
|
||||
* General las tareas de acabado segun las líneas de presupuesto_preimpresion
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
protected function storeOrdenTrabajoPreimpresionTareas(): bool
|
||||
{
|
||||
$p_lineas = $this->presupuesto_lineas_preimpresion();
|
||||
@ -320,6 +483,11 @@ class ProductionService extends BaseService
|
||||
}
|
||||
return true;
|
||||
}
|
||||
/**
|
||||
* General las tareas de acabado segun las líneas de presupuesto_encuadernaciones
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
protected function storeOrdenTrabajoEncuadernacionTareas(): bool
|
||||
{
|
||||
$p_lineas = $this->presupuesto_lineas_encuadernaciones();
|
||||
@ -666,6 +834,10 @@ class ProductionService extends BaseService
|
||||
"peso_pedido" => $logistica_data["peso_pedido"],
|
||||
"imposicion" => $this->getImposicionTareaImpresion(),
|
||||
"tiempo_procesamiento" => $this->getTiempoProcesamientoHHMM(),
|
||||
"tiempo_impresion" => $this->getTiempoTareasImpresionHHMM(),
|
||||
"colors" => $this->getPdfColors(),
|
||||
"isPOD" => $this->isPOD,
|
||||
"uvi" => $this->getUVI()
|
||||
|
||||
];
|
||||
}
|
||||
@ -757,8 +929,8 @@ class ProductionService extends BaseService
|
||||
{
|
||||
$result = [];
|
||||
$otDate = $this->otDate->where('orden_trabajo_id', $this->ot->id)
|
||||
->set([$data['name'] => $data[$data['name']]])
|
||||
->update($data);
|
||||
->set($data['name'], $data[$data['name']])
|
||||
->update();
|
||||
$this->otDate->updateUserDateMap($this->ot->id, $data);
|
||||
$ot_users = $this->ot->users();
|
||||
if (isset($this->ordenTrabajoConfig->DATE_USER_MAPPING[$data["name"]])) {
|
||||
@ -1063,7 +1235,7 @@ class ProductionService extends BaseService
|
||||
$status = false;
|
||||
$presupuestoFiles = $this->presupuesto->files();
|
||||
if (count($presupuestoFiles) == 0) {
|
||||
$status = $this->otModel->update($this->ot->id, ['pedido_espera' => true]);
|
||||
$status = $this->otModel->update($this->ot->id, ['is_pedido_espera' => true]);
|
||||
}
|
||||
return $status;
|
||||
}
|
||||
@ -1100,6 +1272,28 @@ class ProductionService extends BaseService
|
||||
$seconds = array_sum($time_tareas_seconds);
|
||||
return float_seconds_to_hhmm_string($seconds);
|
||||
}
|
||||
public function getTiempoTareasImpresionHHMM(): string
|
||||
{
|
||||
$tareas_impresion = $this->ot->tareas_impresion();
|
||||
$tiempo_seconds = 0;
|
||||
foreach ($tareas_impresion as $key => $tarea) {
|
||||
if ($tarea->is_corte == false) {
|
||||
$tiempo_seconds += $tarea->tiempo_estimado;
|
||||
}
|
||||
}
|
||||
return float_seconds_to_hhmm_string($tiempo_seconds);
|
||||
}
|
||||
public function getUVI(): ?TarifaAcabadoEntity
|
||||
{
|
||||
$uvi = null;
|
||||
$acabados = $this->presupuesto->acabados();
|
||||
foreach ($acabados as $key => $acabado) {
|
||||
if ($acabado->tarifa()->isUVI()) {
|
||||
$uvi = $acabado->tarifa();
|
||||
}
|
||||
}
|
||||
return $uvi;
|
||||
}
|
||||
public function updateProgress(): bool
|
||||
{
|
||||
$userDates = $this->ordenTrabajoConfig->DATE_USER_MAPPING;
|
||||
@ -1125,7 +1319,7 @@ class ProductionService extends BaseService
|
||||
}
|
||||
public function getOtColorStatus(): string
|
||||
{
|
||||
if($this->ot->dates()){
|
||||
if ($this->ot->dates()) {
|
||||
$this->updateColor();
|
||||
}
|
||||
return $this->statusColor;
|
||||
@ -1190,7 +1384,8 @@ class ProductionService extends BaseService
|
||||
$this->statusColor = $this->ordenTrabajoConfig->OT_COLORS["grapado"];
|
||||
};
|
||||
}
|
||||
protected function updateColor(){
|
||||
protected function updateColor()
|
||||
{
|
||||
$this->otSinImprimirColor();
|
||||
$this->otImpresionIntColor();
|
||||
$this->otCosidoColor();
|
||||
@ -1202,4 +1397,219 @@ class ProductionService extends BaseService
|
||||
$this->otEncuadernadoColor();
|
||||
$this->otCorteColor();
|
||||
}
|
||||
public function getEncuadernacionCode(): ?string
|
||||
{
|
||||
$code = "";
|
||||
$encuadernaciones = $this->presupuesto->encuadernaciones();
|
||||
if (isset($encuadernaciones[0])) {
|
||||
$code = $encuadernaciones[0]->tarifa()->code;
|
||||
}
|
||||
return $code;
|
||||
}
|
||||
public function getEncuadernacionColor(): array
|
||||
{
|
||||
$color = $this->ordenTrabajoConfig->OT_ENCUADERNACION_COLOR["default"];
|
||||
$encuadernacion_code = $this->getEncuadernacionCode();
|
||||
if ($encuadernacion_code) {
|
||||
if (isset($this->ordenTrabajoConfig->OT_ENCUADERNACION_COLOR[$encuadernacion_code])) {
|
||||
$color = $this->ordenTrabajoConfig->OT_ENCUADERNACION_COLOR[$encuadernacion_code];
|
||||
}
|
||||
}
|
||||
return $color;
|
||||
}
|
||||
public function getWeekDayColor(): array
|
||||
{
|
||||
$color = $this->ordenTrabajoConfig->OT_WEEK_COLOR_DAY[0];
|
||||
if ($this->ot->pedido()->fecha_encuadernado) {
|
||||
$week_day = Time::createFromFormat("Y-m-d H:i:s", $this->ot->pedido()->fecha_encuadernado)->getDayOfWeek();
|
||||
$color = $this->ordenTrabajoConfig->OT_WEEK_COLOR_DAY[$week_day];
|
||||
}
|
||||
return $color;
|
||||
}
|
||||
public function getGeneralBackgroundColor()
|
||||
{
|
||||
$color = $this->ordenTrabajoConfig->OT_BACKGROUND_COLOR['default'];
|
||||
$is_ferro_or_prototipo = ($this->presupuesto->ferro || $this->presupuesto->ferro_digital || $this->presupuesto->prototipo);
|
||||
$color = $is_ferro_or_prototipo ? $this->ordenTrabajoConfig->OT_BACKGROUND_COLOR['ferro'] : $color;
|
||||
$color = $this->isPOD ? $this->ordenTrabajoConfig->OT_BACKGROUND_COLOR['pod'] : $color;
|
||||
$color = $this->pedido->inaplazable ? $this->ordenTrabajoConfig->OT_BACKGROUND_COLOR['inaplazable'] : $color;
|
||||
return $color;
|
||||
}
|
||||
public function getPapelImpresionBackgroundColor()
|
||||
{
|
||||
$papel = $this->presupuesto->presupuestoLineaImpresion()->papel_generico();
|
||||
$color = $this->ordenTrabajoConfig->OT_PAPEL_COLOR['default'];
|
||||
$papel_code = $papel->code_ot;
|
||||
if ($papel_code) {
|
||||
if (strpos($papel_code, "BCLOF")) {
|
||||
$color = $this->ordenTrabajoConfig->OT_PAPEL_COLOR['blanco'];
|
||||
}
|
||||
if (strpos($papel_code, "AH") && $papel->code == "OFF2") {
|
||||
$color = $this->ordenTrabajoConfig->OT_PAPEL_COLOR['ahuesado'];
|
||||
}
|
||||
if (strpos($papel_code, "MARF")) {
|
||||
$color = $this->ordenTrabajoConfig->OT_PAPEL_COLOR['marfil'];
|
||||
}
|
||||
if (strpos($papel_code, "VOLAH")) {
|
||||
$color = $this->ordenTrabajoConfig->OT_PAPEL_COLOR['volumen_ahuesado'];
|
||||
}
|
||||
if ($papel_code == "EM") {
|
||||
$color = $this->ordenTrabajoConfig->OT_PAPEL_COLOR['estucado_mate'];
|
||||
}
|
||||
if ($papel_code == "CGE") {
|
||||
$color = $this->ordenTrabajoConfig->OT_PAPEL_COLOR['cartulina'];
|
||||
}
|
||||
}
|
||||
|
||||
return $color;
|
||||
}
|
||||
public function getPapelImpresionCubiertaBackgroundColor()
|
||||
{
|
||||
$papel = $this->presupuesto->presupuestoLineaCubierta()->papel_generico();
|
||||
$color = $this->ordenTrabajoConfig->OT_PAPEL_COLOR['default'];
|
||||
$papel_code = $papel->code_ot;
|
||||
if ($papel_code) {
|
||||
if (strpos($papel_code, "BCLOF")) {
|
||||
$color = $this->ordenTrabajoConfig->OT_PAPEL_COLOR['blanco'];
|
||||
}
|
||||
if (strpos($papel_code, "AH") && $papel->code == "OFF2") {
|
||||
$color = $this->ordenTrabajoConfig->OT_PAPEL_COLOR['ahuesado'];
|
||||
}
|
||||
if (strpos($papel_code, "MARF")) {
|
||||
$color = $this->ordenTrabajoConfig->OT_PAPEL_COLOR['marfil'];
|
||||
}
|
||||
if (strpos($papel_code, "VOLAH")) {
|
||||
$color = $this->ordenTrabajoConfig->OT_PAPEL_COLOR['volumen_ahuesado'];
|
||||
}
|
||||
if ($papel_code == "EM") {
|
||||
$color = $this->ordenTrabajoConfig->OT_PAPEL_COLOR['estucado_mate'];
|
||||
}
|
||||
if ($papel_code == "CGE") {
|
||||
$color = $this->ordenTrabajoConfig->OT_PAPEL_COLOR['cartulina'];
|
||||
}
|
||||
}
|
||||
return $color;
|
||||
}
|
||||
public function getPlastificadoColor()
|
||||
{
|
||||
$acabados = $this->presupuesto->acabados();
|
||||
$color = $this->ordenTrabajoConfig->OT_PLASTIFICADO_COLOR['default'];
|
||||
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'];
|
||||
}
|
||||
}
|
||||
}
|
||||
return $color;
|
||||
}
|
||||
public function getImpresionInteriorPPALColor()
|
||||
{
|
||||
$isRotativa = $this->presupuesto->presupuestoLineaImpresion()->isRotativa();
|
||||
$color = $isRotativa ? $this->ordenTrabajoConfig->OT_IMPRESION_INTERIOR_PPAL_COLOR['ROTATIVA'] : $this->ordenTrabajoConfig->OT_IMPRESION_INTERIOR_PPAL_COLOR['GENERAL'];
|
||||
$color = $this->isPOD ? $this->ordenTrabajoConfig->OT_IMPRESION_INTERIOR_PPAL_COLOR['POD'] : $color;
|
||||
return $color;
|
||||
}
|
||||
public function getPdfColors(): array
|
||||
{
|
||||
return [
|
||||
"general" => $this->getGeneralBackgroundColor(),
|
||||
"week_day" => $this->getWeekDayColor(),
|
||||
"ot" => $this->getEncuadernacionColor(),
|
||||
"papel_interior" => $this->getPapelImpresionBackgroundColor(),
|
||||
"papel_cubierta" => $this->getPapelImpresionCubiertaBackgroundColor(),
|
||||
"plastificado" => $this->getPlastificadoColor(),
|
||||
"impresion_interior_ppal" => $this->getImpresionInteriorPPALColor()
|
||||
];
|
||||
}
|
||||
|
||||
public function getFlags()
|
||||
{
|
||||
$this->color();
|
||||
return [
|
||||
"isGofrado" => $this->gofrado(),
|
||||
"isEspiral" => $this->isEspiral,
|
||||
"isUVI" => $this->uvi(),
|
||||
"isPlastificado" => $this->isPlastificado,
|
||||
"isCubierta" => $this->cubierta(),
|
||||
"isColor" => $this->isColor,
|
||||
"isBN" => $this->isBN,
|
||||
"isCorte" => $this->corte(),
|
||||
"isGrapado" => $this->isGrapado
|
||||
];
|
||||
}
|
||||
public function gofrado(): bool
|
||||
{
|
||||
$flag = false;
|
||||
$acabados = $this->presupuesto->acabados();
|
||||
foreach ($acabados as $key => $acabado) {
|
||||
$tarifa_acabado = $acabado->tarifa();
|
||||
if ($tarifa_acabado->code) {
|
||||
$plastificado_code = $tarifa_acabado->code;
|
||||
if ($plastificado_code == "GOF") {
|
||||
$flag = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
$this->isGofrado = $flag;
|
||||
return $this->isGofrado;
|
||||
}
|
||||
public function uvi(): bool
|
||||
{
|
||||
$flag = false;
|
||||
$tarifa_acabado_uvi = $this->getUVI();
|
||||
if ($tarifa_acabado_uvi) {
|
||||
$flag = true;
|
||||
}
|
||||
$this->isUVI = $flag;
|
||||
return $this->isUVI;
|
||||
}
|
||||
public function cubierta(): bool
|
||||
{
|
||||
$lineaCubierta = $this->presupuesto->presupuestoLineaCubierta();
|
||||
if ($lineaCubierta) {
|
||||
$this->isCubierta = true;
|
||||
}
|
||||
return $this->isCubierta;
|
||||
}
|
||||
public function color(): bool
|
||||
{
|
||||
$linea_impresion = $this->presupuesto->presupuestoLineaImpresion();
|
||||
if ($linea_impresion) {
|
||||
if ($linea_impresion->isColor()) {
|
||||
$this->isColor = true;
|
||||
$this->isBN = false;
|
||||
} else {
|
||||
$this->isColor = false;
|
||||
$this->isBN = true;
|
||||
}
|
||||
}
|
||||
return $this->isColor;
|
||||
}
|
||||
public function corte(): bool
|
||||
{
|
||||
$ot_tareas = $this->ot->tareas();
|
||||
foreach ($ot_tareas as $key => $tarea) {
|
||||
if ($tarea->is_corte) {
|
||||
$this->isCorte = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return $this->isCorte;
|
||||
}
|
||||
}
|
||||
|
||||
@ -22,7 +22,7 @@
|
||||
|
||||
<div class="col-xs-12 col-md-4 col-lg-4 mb-2">
|
||||
<label for="ot-fecha-entrega" class="form-label"><?= @lang("Produccion.fecha_impresion") ?></label>
|
||||
<input type="text" class="form-control ot-pedido" placeholder="DD/MM/YYYY" name="fecha_impresion" id="ot-fecha-impresion" data-input>
|
||||
<input type="text" class="form-control ot-pedido" placeholder="DD/MM/YYYY" name="fecha_impresion" id="ot-fecha-impresion" data-input <?= $is_finalizada ? "disabled": "" ?> >
|
||||
<div class="form-text"><?= $pedido_user_dates["fecha_impresion"] ?></div>
|
||||
|
||||
|
||||
@ -31,7 +31,7 @@
|
||||
|
||||
<div class="col-xs-12 col-md-4 col-lg-4 mb-2">
|
||||
<label for="ot-fecha-entrega" class="form-label"><?= @lang("Produccion.fecha_encuadernado") ?></label>
|
||||
<input type="date" class="form-control ot-pedido" placeholder="DD/MM/YYYY" name="fecha_encuadernado" id="ot-fecha-encuadernado" data-input />
|
||||
<input type="date" class="form-control ot-pedido" placeholder="DD/MM/YYYY" name="fecha_encuadernado" id="ot-fecha-encuadernado" data-input <?= $is_finalizada ? "disabled": "" ?> />
|
||||
<div class="form-text"><?= $pedido_user_dates["fecha_encuadernado"] ?></div>
|
||||
|
||||
</div>
|
||||
@ -39,7 +39,7 @@
|
||||
|
||||
<div class="col-xs-12 col-md-4 col-lg-4 mb-2">
|
||||
<label for="ot-fecha-entrega" class="form-label"><?= @lang("Produccion.fecha_entrega_externo") ?></label>
|
||||
<input type="date" class="form-control ot-pedido" placeholder="DD/MM/YYYY" name="fecha_entrega_externo" id="ot-fecha-entrega-externo" data-input />
|
||||
<input type="date" class="form-control ot-pedido" placeholder="DD/MM/YYYY" name="fecha_entrega_externo" id="ot-fecha-entrega-externo" data-input <?= $is_finalizada ? "disabled": "" ?> />
|
||||
<div class="form-text"><?= $pedido_user_dates["fecha_entrega_externo"] ?></div>
|
||||
|
||||
</div>
|
||||
@ -49,13 +49,13 @@
|
||||
<div>
|
||||
|
||||
<label for="ot-fecha-entrega" class="form-label"><?= @lang("Produccion.fecha_entrega_real") ?></label>
|
||||
<input type="date" class="form-control ot-pedido" placeholder="DD/MM/YYYY" name="fecha_entrega_real" id="ot-fecha-entrega-real" data-input />
|
||||
<input type="date" class="form-control ot-pedido" placeholder="DD/MM/YYYY" name="fecha_entrega_real" id="ot-fecha-entrega-real" data-input <?= $is_finalizada ? "disabled": "" ?> />
|
||||
<div class="form-text"><?= $pedido_user_dates["fecha_entrega_real"] ?></div>
|
||||
</div>
|
||||
<div class="d-flex flex-column">
|
||||
|
||||
<label class="switch switch-danger switch-lg mt-1">
|
||||
<input type="checkbox" class="switch-input ot-pedido-check" name="inaplazable" />
|
||||
<input type="checkbox" class="switch-input ot-pedido-check" name="inaplazable" data-input <?= $is_finalizada ? "disabled": "" ?>/>
|
||||
<span class="switch-toggle-slider">
|
||||
<span class="switch-on">
|
||||
<i class="ti ti-alert-triangle"></i>
|
||||
@ -68,7 +68,7 @@
|
||||
</label>
|
||||
<div class="form-text"><?= $pedido_user_dates["inaplazable"] ?></div>
|
||||
<label class="switch switch-lg mt-1">
|
||||
<input type="checkbox" class="switch-input ot-preview" name="fecha_entrega_warning_revised" />
|
||||
<input type="checkbox" class="switch-input ot-preview" name="fecha_entrega_warning_revised" data-input <?= $is_finalizada ? "disabled": "" ?>/>
|
||||
<span class="switch-toggle-slider">
|
||||
<span class="switch-on">
|
||||
<i class="ti ti-check"></i>
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="card mb-3" id="alert-orden-trabajo">
|
||||
<div class="row g-0">
|
||||
<div class="col-md-2 d-flex align-items-center justify-content-center " style="max-height: 50%;">
|
||||
<div class="row g-0" style="background-color: <?= $colors["general"]["bg"] ?>;" style="max-height: 25vh;">
|
||||
<div class="col-md-2 d-flex align-items-center justify-content-center " style="max-height: 100%;">
|
||||
<div class="sk-wave sk-primary portada-loader">
|
||||
<div class="sk-wave-rect"></div>
|
||||
<div class="sk-wave-rect"></div>
|
||||
@ -10,16 +10,16 @@
|
||||
<div class="sk-wave-rect"></div>
|
||||
<div class="sk-wave-rect"></div>
|
||||
</div>
|
||||
<img class="card-img card-img-left img-thumbnail" id="portada-orden-trabajo" src="<?=site_url('assets/img/portada_not_found.png')?>" hidden>
|
||||
<img class="card-img card-img-left img-thumbnail" id="portada-orden-trabajo" src="<?= site_url('assets/img/portada_not_found.png') ?>" hidden>
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
<div class="card-body">
|
||||
<h1 class="card-title mb-0">[<?= $presupuesto->id ?>]<?= $presupuesto->titulo ?></h1>
|
||||
<h4 class="card-title mb-0 text-secondary"><?= $cliente->nombre ?> (<?= $cliente->alias ?>)</h4>
|
||||
<h3 class="card-title mb-3">OT : <?= $ot->id ?></h3>
|
||||
<div class="card-body h-100">
|
||||
<h1 class="card-title mb-0" style="color: <?= $colors["general"]["color"] ?>;">[<?= $presupuesto->id ?>]<?= $presupuesto->titulo ?></h1>
|
||||
<h4 class="card-title mb-0" style="color: <?= $colors["general"]["color"] ?>;"><?= $cliente->nombre ?> (<?= $cliente->alias ?>)</h4>
|
||||
<h3 class="card-title mb-3" style="color: <?= $colors["general"]["color"] ?>;">OT : <?= $ot->id ?></h3>
|
||||
<div class="d-flex align-items-center">
|
||||
<div class="card-info">
|
||||
<h3 class="mb-0"><?= $ot->progreso ?> %</h3>
|
||||
<div class="card-info" style="color: <?= $colors["general"]["color"] ?>;">
|
||||
<h3 class="mb-0" style="color: <?= $colors["general"]["color"] ?>;"><?= $ot->progreso ?> %</h3>
|
||||
<span class="fx-large">Progreso</span>
|
||||
</div>
|
||||
</div>
|
||||
@ -36,6 +36,9 @@
|
||||
<span class="ti-sm ti ti-truck-delivery me-1"></span>
|
||||
Pedido
|
||||
</a>
|
||||
<a type="button" class="btn btn-danger btn-block mb-1" target="__blank" href="<?= "/produccion/ordentrabajo/pdf/" . $modelId ?>">
|
||||
<span class="ti-sm ti ti-file me-1"></span>
|
||||
PDF</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
<div class="text-light small fw-medium mb-4 text-start">Revisión</div>
|
||||
<div class="d-flex flex-column justify-content-start text-start gap-2">
|
||||
<label class="switch switch-md">
|
||||
<input type="checkbox" class="switch-input ot-preview" name="revisar_formato" />
|
||||
<input type="checkbox" class="switch-input ot-preview" name="revisar_formato" <?= $is_finalizada ? "disabled" : "" ?> />
|
||||
<span class="switch-toggle-slider">
|
||||
<span class="switch-on">
|
||||
<i class="ti ti-check"></i>
|
||||
@ -26,7 +26,7 @@
|
||||
<span class="switch-label">Revisar lomo</span>
|
||||
</label>
|
||||
<label class="switch switch-md">
|
||||
<input type="checkbox" class="switch-input ot-preview" id="revisar-solapa" name="revisar_solapa" />
|
||||
<input type="checkbox" class="switch-input ot-preview" id="revisar-solapa" name="revisar_solapa" <?= $is_finalizada ? "disabled" : "" ?> />
|
||||
<span class="switch-toggle-slider">
|
||||
<span class="switch-on">
|
||||
<i class="ti ti-check"></i>
|
||||
@ -45,7 +45,7 @@
|
||||
<div class="text-light small fw-medium mb-4 text-start"> </div>
|
||||
<div class="d-flex flex-column justify-content-start text-start gap-2">
|
||||
<label class="switch switch-md">
|
||||
<input type="checkbox" class="switch-input ot-preview" name="revisar_isbn" />
|
||||
<input type="checkbox" class="switch-input ot-preview" name="revisar_isbn" <?= $is_finalizada ? "disabled" : "" ?> />
|
||||
<span class="switch-toggle-slider">
|
||||
<span class="switch-on">
|
||||
<i class="ti ti-check"></i>
|
||||
@ -57,7 +57,7 @@
|
||||
<span class="switch-label">Revisar ISBN,D.L.</span>
|
||||
</label>
|
||||
<label class="switch switch-md">
|
||||
<input type="checkbox" class="switch-input ot-preview" name="revisar_codigo_barras" />
|
||||
<input type="checkbox" class="switch-input ot-preview" name="revisar_codigo_barras" <?= $is_finalizada ? "disabled" : "" ?> />
|
||||
<span class="switch-toggle-slider">
|
||||
<span class="switch-on">
|
||||
<i class="ti ti-check"></i>
|
||||
@ -69,7 +69,7 @@
|
||||
<span class="switch-label">Revisar código de barras</span>
|
||||
</label>
|
||||
<label class="switch switch-md">
|
||||
<input type="checkbox" class="switch-input ot-preview" name="realizar_imposicion" />
|
||||
<input type="checkbox" class="switch-input ot-preview" name="realizar_imposicion" <?= $is_finalizada ? "disabled" : "" ?> />
|
||||
<span class="switch-toggle-slider">
|
||||
<span class="switch-on">
|
||||
<i class="ti ti-check"></i>
|
||||
@ -86,7 +86,7 @@
|
||||
<div class="text-light small fw-medium mb-4 text-start"> </div>
|
||||
<div class="d-flex flex-column justify-content-start text-start gap-2">
|
||||
<label class="switch switch-md">
|
||||
<input type="checkbox" class="switch-input ot-preview" name="enviar_impresion" />
|
||||
<input type="checkbox" class="switch-input ot-preview" name="enviar_impresion" <?= $is_finalizada ? "disabled" : "" ?> />
|
||||
<span class="switch-toggle-slider">
|
||||
<span class="switch-on">
|
||||
<i class="ti ti-check"></i>
|
||||
|
||||
@ -25,128 +25,137 @@
|
||||
<div class="col-md-3">
|
||||
<!-- Progress -->
|
||||
<div class="col-xs-12 col-md-4 col-lg-4 mb-2 w-100">
|
||||
<h4><?=lang("Produccion.progress_impresion")?></h4>
|
||||
</div>
|
||||
<div class="col-xs-12 col-md-4 col-lg-4 mb-2 w-100 <?= $flags["isBN"] ? "" : "d-none" ?>">
|
||||
<label for="ot-impresion-color" class="form-label"><?= @lang("Produccion.impresion_bn") ?></label>
|
||||
<input type="text" class="form-control ot-date" placeholder="DD/MM/YYYY" name="interior_bn_at" id="ot-impresion-bn">
|
||||
<div class="form-text"><?= $user_dates["interior_bn_at"] ?></div>
|
||||
<input type="text" class="form-control ot-date" placeholder="DD/MM/YYYY" name="interior_bn_at" id="ot-impresion-bn" data-input <?= $is_finalizada ? "disabled" : "" ?>>
|
||||
<div class="form-text"><?= $user_dates["interior_bn_at"] ?? "<span class='ti-sm ti ti-alert-triangle me-1'></span>" ?></div>
|
||||
|
||||
</div>
|
||||
<!-- Progress -->
|
||||
<div class="col-xs-12 col-md-4 col-lg-4 mb-2 w-100">
|
||||
<div class="col-xs-12 col-md-4 col-lg-4 mb-2 w-100 <?= $flags["isColor"] ? "" : "d-none" ?>"">
|
||||
<label for="ot-impresion-color" class="form-label"><?= @lang("Produccion.impresion_color") ?></label>
|
||||
<input type="text" class="form-control ot-date" placeholder="DD/MM/YYYY" name="interior_color_at" id="ot-impresion-color">
|
||||
<div class="form-text"><?= $user_dates["interior_color_at"] ?></div>
|
||||
<input type="text" class="form-control ot-date" placeholder="DD/MM/YYYY" name="interior_color_at" id="ot-impresion-color" data-input <?= $is_finalizada ? "disabled" : "" ?>>
|
||||
<div class="form-text"><?= $user_dates["interior_color_at"] ?? "<span class='ti-sm ti ti-alert-triangle me-1'></span>" ?></div>
|
||||
|
||||
</div>
|
||||
<!-- Progress -->
|
||||
<div class="col-xs-12 col-md-4 col-lg-4 mb-2 w-100">
|
||||
<div class="col-xs-12 col-md-4 col-lg-4 mb-2 w-100 <?= $flags["isCubierta"] ? "" : "d-none" ?>">
|
||||
<label for="ot-portada" class="form-label"><?= @lang("Produccion.cubierta") ?></label>
|
||||
<input type="text" class="form-control ot-date" placeholder="DD/MM/YYYY" name="cubierta_at" id="ot-portada">
|
||||
<div class="form-text"><?= $user_dates["cubierta_at"] ?></div>
|
||||
<input type="text" class="form-control ot-date" placeholder="DD/MM/YYYY" name="cubierta_at" id="ot-portada" data-input <?= $is_finalizada ? "disabled" : "" ?>>
|
||||
<div class="form-text"><?= $user_dates["cubierta_at"] ?? "<span class='ti-sm ti ti-alert-triangle me-1'></span>"?></div>
|
||||
|
||||
</div>
|
||||
|
||||
<!-- Progress -->
|
||||
<div class="col-xs-12 col-md-4 col-lg-4 mb-2 w-100">
|
||||
<div class="col-xs-12 col-md-4 col-lg-4 mb-2 w-100 <?= $flags["isPlastificado"] ? "" : "d-none" ?>">
|
||||
<label for="ot-plastificado-mate" class="form-label"><?= @lang("Produccion.plastificado_mate") ?></label>
|
||||
<input type="text" class="form-control ot-date" placeholder="DD/MM/YYYY" name="plastificado_at" id="ot-plastificado-mate">
|
||||
<div class="form-text"><?= $user_dates["plastificado_at"] ?></div>
|
||||
<input type="text" class="form-control ot-date" placeholder="DD/MM/YYYY" name="plastificado_at" id="ot-plastificado-mate" data-input <?= $is_finalizada ? "disabled" : "" ?>>
|
||||
<div class="form-text"><?= $user_dates["plastificado_at"] ?? "<span class='ti-sm ti ti-alert-triangle me-1'></span>" ?></div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<!-- Progress -->
|
||||
<div class="col-xs-12 col-md-4 col-lg-4 mb-2 w-100">
|
||||
<h4><?=lang("Produccion.progress_manipulado")?></h4>
|
||||
</div>
|
||||
<div class="col-xs-12 col-md-4 col-lg-4 mb-2 w-100 <?= $presupuesto->cosido ? "" : "d-none" ?>">
|
||||
<label for="ot-prep-cosido" class="form-label"><?= @lang("Produccion.cosido") ?></label>
|
||||
<input type="text" class="form-control ot-date" placeholder="DD/MM/YYYY" name="cosido_at" id="ot-prep-cosido">
|
||||
<div class="form-text"><?= $user_dates["cosido_at"] ?></div>
|
||||
<input type="text" class="form-control ot-date" placeholder="DD/MM/YYYY" name="cosido_at" id="ot-prep-cosido" data-input <?= $is_finalizada ? "disabled" : "" ?>>
|
||||
<div class="form-text"><?= $user_dates["cosido_at"] ?? "<span class='ti-sm ti ti-alert-triangle me-1'></span>" ?></div>
|
||||
</div>
|
||||
<!-- Progress -->
|
||||
<div class="col-xs-12 col-md-4 col-lg-4 mb-2 w-100">
|
||||
<div class="col-xs-12 col-md-4 col-lg-4 mb-2 w-100 <?= $flags["isGrapado"] ? "" : "d-none" ?>">
|
||||
<label for="ot-prep-grapado" class="form-label"><?= @lang("Produccion.grapado") ?></label>
|
||||
<input type="text" class="form-control ot-date" placeholder="DD/MM/YYYY" name="grapado_at" id="ot-prep-grapado">
|
||||
<div class="form-text"><?= $user_dates["grapado_at"] ?></div>
|
||||
<input type="text" class="form-control ot-date" placeholder="DD/MM/YYYY" name="grapado_at" id="ot-prep-grapado" data-input <?= $is_finalizada ? "disabled" : "" ?>>
|
||||
<div class="form-text"><?= $user_dates["grapado_at"] ?? "<span class='ti-sm ti ti-alert-triangle me-1'></span>" ?></div>
|
||||
</div>
|
||||
<!-- Progress -->
|
||||
<div class="col-xs-12 col-md-4 col-lg-4 mb-2 w-100 <?= $presupuesto->solapas ? "" : "d-none" ?>">
|
||||
<label for="ot-prep-solapa" class="form-label"><?= @lang("Produccion.solapa") ?></label>
|
||||
<input type="text" class="form-control ot-date" placeholder="DD/MM/YYYY" name="solapa_at" id="ot-prep-solapa">
|
||||
<div class="form-text"><?= $user_dates["solapa_at"] ?></div>
|
||||
<input type="text" class="form-control ot-date" placeholder="DD/MM/YYYY" name="solapa_at" id="ot-prep-solapa" data-input <?= $is_finalizada ? "disabled" : "" ?>>
|
||||
<div class="form-text"><?= $user_dates["solapa_at"] ?? "<span class='ti-sm ti ti-alert-triangle me-1'></span>" ?></div>
|
||||
</div>
|
||||
<!-- Progress -->
|
||||
<div class="col-xs-12 col-md-4 col-lg-4 mb-2 w-100 <?= $presupuesto->retractilado ? "" : "d-none" ?>">
|
||||
<label for="ot-prep-retractilado" class="form-label"><?= @lang("Produccion.retractilado") ?></label>
|
||||
<input type="text" class="form-control ot-date" placeholder="DD/MM/YYYY" name="retractilado_at" id="ot-prep-retractilado">
|
||||
<div class="form-text"><?= $user_dates["retractilado_at"] ?></div>
|
||||
<input type="text" class="form-control ot-date" placeholder="DD/MM/YYYY" name="retractilado_at" id="ot-prep-retractilado" data-input <?= $is_finalizada ? "disabled" : "" ?>>
|
||||
<div class="form-text"><?= $user_dates["retractilado_at"] ?? "<span class='ti-sm ti ti-alert-triangle me-1'></span>" ?></div>
|
||||
</div>
|
||||
|
||||
<!-- Progress -->
|
||||
<div class="col-xs-12 col-md-4 col-lg-4 mb-2 w-100 <?= $presupuesto->retractilado5 ? "" : "d-none" ?>">
|
||||
<label for="ot-prep-retractilado5" class="form-label"><?= @lang("Produccion.retractilado5") ?></label>
|
||||
<input type="text" class="form-control ot-date" placeholder="DD/MM/YYYY" name="retractilado5_at" id="ot-prep-retractilado5">
|
||||
<div class="form-text"><?= $user_dates["retractilado5_at"] ?></div>
|
||||
<input type="text" class="form-control ot-date" placeholder="DD/MM/YYYY" name="retractilado5_at" id="ot-prep-retractilado5" data-input <?= $is_finalizada ? "disabled" : "" ?>>
|
||||
<div class="form-text"><?= $user_dates["retractilado5_at"] ?? "<span class='ti-sm ti ti-alert-triangle me-1'></span>" ?></div>
|
||||
</div>
|
||||
|
||||
<!-- Progress -->
|
||||
<div class="col-xs-12 col-md-4 col-lg-4 mb-2 w-100 <?= $presupuesto->prototipo ? "" : "d-none" ?>">
|
||||
<label for="ot-prep-prototipo" class="form-label"><?= @lang("Produccion.prototipo") ?></label>
|
||||
<input type="text" class="form-control ot-date" placeholder="DD/MM/YYYY" name="prototipo_at" id="ot-prep-prototipo">
|
||||
<div class="form-text"><?= $user_dates["prototipo_at"] ?></div>
|
||||
<input type="text" class="form-control ot-date" placeholder="DD/MM/YYYY" name="prototipo_at" id="ot-prep-prototipo" data-input <?= $is_finalizada ? "disabled" : "" ?>>
|
||||
<div class="form-text"><?= $user_dates["prototipo_at"] ?? "<span class='ti-sm ti ti-alert-triangle me-1'></span>" ?></div>
|
||||
</div>
|
||||
|
||||
<!-- Progress -->
|
||||
<div class="col-xs-12 col-md-4 col-lg-4 mb-2 w-100 <?= $presupuesto->marcapaginas ? "" : "d-none" ?>">
|
||||
<label for="ot-prep-marcapaginas" class="form-label"><?= @lang("Produccion.marcapaginas") ?></label>
|
||||
<input type="text" class="form-control ot-date" placeholder="DD/MM/YYYY" name="marcapaginas_at" id="ot-prep-marcapaginas">
|
||||
<div class="form-text"><?= $user_dates["marcapaginas_at"] ?></div>
|
||||
<input type="text" class="form-control ot-date" placeholder="DD/MM/YYYY" name="marcapaginas_at" id="ot-prep-marcapaginas" data-input <?= $is_finalizada ? "disabled" : "" ?>>
|
||||
<div class="form-text"><?= $user_dates["marcapaginas_at"] ?? "<span class='ti-sm ti ti-alert-triangle me-1'></span>" ?></div>
|
||||
</div>
|
||||
<!-- Progress -->
|
||||
<div class="col-xs-12 col-md-4 col-lg-4 mb-2 w-100">
|
||||
<div class="col-xs-12 col-md-4 col-lg-4 mb-2 w-100 <?= $flags["isCorte"] ? "" : "d-none" ?>">
|
||||
<label for="ot-prep-guillotina" class="form-label"><?= @lang("Produccion.guillotina") ?></label>
|
||||
<input type="text" class="form-control ot-date" placeholder="DD/MM/YYYY" name="corte_at" id="ot-prep-guillotina">
|
||||
<div class="form-text"><?= $user_dates["corte_at"] ?></div>
|
||||
<input type="text" class="form-control ot-date" placeholder="DD/MM/YYYY" name="corte_at" id="ot-prep-guillotina" data-input <?= $is_finalizada ? "disabled" : "" ?>>
|
||||
<div class="form-text"><?= $user_dates["corte_at"] ?? "<span class='ti-sm ti ti-alert-triangle me-1'></span>" ?></div>
|
||||
|
||||
</div>
|
||||
<!-- Progress -->
|
||||
<div class="col-xs-12 col-md-4 col-lg-4 mb-2 w-100">
|
||||
<div class="col-xs-12 col-md-4 col-lg-4 mb-2 w-100 <?= $flags["isEspiral"] ? "" : "d-none" ?>">
|
||||
<label for="ot-espiral" class="form-label"><?= @lang("Produccion.espiral") ?></label>
|
||||
<input type="text" class="form-control ot-date" placeholder="DD/MM/YYYY" name="espiral_at" id="ot-espiral">
|
||||
<div class="form-text"></div>
|
||||
<input type="text" class="form-control ot-date" placeholder="DD/MM/YYYY" name="espiral_at" id="ot-espiral" data-input <?= $is_finalizada ? "disabled" : "" ?>>
|
||||
<div class="form-text"> <?= $user_dates["espiral_at"] ?? "<span class='ti-sm ti ti-alert-triangle me-1'></span>" ?></div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<!-- Progress -->
|
||||
<div class="col-xs-12 col-md-4 col-lg-4 mb-2 w-100">
|
||||
<h4><?=lang("Produccion.progress_logistica")?></h4>
|
||||
</div>
|
||||
<div class="col-xs-12 col-md-4 col-lg-4 mb-2 w-100 <?= $presupuesto->ferro ? "" : "d-none" ?>">
|
||||
<label for="ot-pendiente-ferro" class="form-label"><?= @lang("Produccion.pendiente_ferro") ?></label>
|
||||
<input type="text" class="form-control ot-date" name="pendiente_ferro_at" placeholder="DD/MM/YYYY" id="ot-pendiente-ferro">
|
||||
<div class="form-text"><?= $user_dates["pendiente_ferro_at"] ?></div>
|
||||
<input type="text" class="form-control ot-date" name="pendiente_ferro_at" placeholder="DD/MM/YYYY" id="ot-pendiente-ferro" data-input <?= $is_finalizada ? "disabled" : "" ?>>
|
||||
<div class="form-text"><?= $user_dates["pendiente_ferro_at"] ?? "<span class='ti-sm ti ti-alert-triangle me-1'></span>" ?></div>
|
||||
|
||||
</div>
|
||||
<!-- Progress -->
|
||||
<div class="col-xs-12 col-md-4 col-lg-4 mb-2 w-100 <?= $presupuesto->ferro ? "" : "d-none" ?>">
|
||||
<label for="ot-ferro-cliente" class="form-label"><?= @lang("Produccion.ferro_cliente") ?></label>
|
||||
<input type="text" class="form-control ot-date" name="ferro_en_cliente_at" placeholder="DD/MM/YYYY" id="ot-ferro-cliente">
|
||||
<div class="form-text"><?= $user_dates["ferro_en_cliente_at"] ?></div>
|
||||
<input type="text" class="form-control ot-date" name="ferro_en_cliente_at" placeholder="DD/MM/YYYY" id="ot-ferro-cliente" data-input <?= $is_finalizada ? "disabled" : "" ?>>
|
||||
<div class="form-text"><?= $user_dates["ferro_en_cliente_at"] ?? "<span class='ti-sm ti ti-alert-triangle me-1'></span>" ?></div>
|
||||
</div>
|
||||
<!-- Progress -->
|
||||
<div class="col-xs-12 col-md-4 col-lg-4 mb-2 w-100 <?= $presupuesto->ferro ? "" : "d-none" ?>">
|
||||
<label for="ot-ferro-ok" class="form-label"><?= @lang("Produccion.ferro_ok") ?></label>
|
||||
<input type="text" class="form-control ot-date" name="ferro_ok_at" placeholder="DD/MM/YYYY" id="ot-ferro-ok">
|
||||
<div class="form-text"><?= $user_dates["ferro_ok_at"] ?></div>
|
||||
<input type="text" class="form-control ot-date" name="ferro_ok_at" placeholder="DD/MM/YYYY" id="ot-ferro-ok" data-input <?= $is_finalizada ? "disabled" : "" ?>>
|
||||
<div class="form-text"><?= $user_dates["ferro_ok_at"] ?? "<span class='ti-sm ti ti-alert-triangle me-1'></span>" ?></div>
|
||||
|
||||
</div>
|
||||
<!-- Progress -->
|
||||
<div class="col-xs-12 col-md-4 col-lg-4 mb-2 w-100">
|
||||
<label for="ot-embalaje" class="form-label"><?= @lang("Produccion.embalaje") ?></label>
|
||||
<input type="text" class="form-control ot-date" placeholder="DD/MM/YYYY" name="embalaje_at" id="ot-embalaje">
|
||||
<div class="form-text"><?= $user_dates["embalaje_at"] ?></div>
|
||||
<input type="text" class="form-control ot-date" placeholder="DD/MM/YYYY" name="embalaje_at" id="ot-embalaje" data-input <?= $is_finalizada ? "disabled" : "" ?>>
|
||||
<div class="form-text"><?= $user_dates["embalaje_at"] ?? "<span class='ti-sm ti ti-alert-triangle me-1'></span>" ?></div>
|
||||
|
||||
</div>
|
||||
<!-- Progress -->
|
||||
<div class="col-xs-12 col-md-4 col-lg-4 mb-2 w-100">
|
||||
<label for="ot-envio" class="form-label"><?= @lang("Produccion.envio") ?></label>
|
||||
<input type="text" class="form-control ot-date" placeholder="DD/MM/YYYY" name="envio_at" id="ot-envio">
|
||||
<div class="form-text"><?= $user_dates["envio_at"] ?></div>
|
||||
<input type="text" class="form-control ot-date" placeholder="DD/MM/YYYY" name="envio_at" id="ot-envio" data-input <?= $is_finalizada ? "disabled" : "" ?>>
|
||||
<div class="form-text"><?= $user_dates["envio_at"] ?? "<span class='ti-sm ti ti-alert-triangle me-1'></span>" ?></div>
|
||||
|
||||
</div>
|
||||
|
||||
@ -154,44 +163,47 @@
|
||||
<div class="col-md-3">
|
||||
<!-- PREIMPRESION -->
|
||||
<!-- Preformato -->
|
||||
<div class="col-xs-12 col-md-4 col-lg-4 mb-2 w-100">
|
||||
<h4><?=lang("Produccion.progress_preimpresion")?></h4>
|
||||
</div>
|
||||
<div class="col-xs-12 col-md-4 col-lg-4 mb-2 w-100 <?= $ot->revisar_formato ? "" : "d-none" ?>">
|
||||
<label for="ot-preformato-btn" class="form-label"><?= @lang("Produccion.pre_formato") ?></label>
|
||||
<input type="text" class="form-control ot-date" placeholder="DD/MM/YYYY" name="pre_formato_at" id="ot-preformato-date">
|
||||
<div class="form-text"><?= $user_dates["pre_formato_at"] ?></div>
|
||||
<input type="text" class="form-control ot-date" placeholder="DD/MM/YYYY" name="pre_formato_at" id="ot-preformato-date" data-input <?= $is_finalizada ? "disabled" : "" ?>>
|
||||
<div class="form-text"><?= $user_dates["pre_formato_at"] ?? "<span class='ti-sm ti ti-alert-triangle me-1'></span>" ?></div>
|
||||
</div>
|
||||
<!-- Prelomo -->
|
||||
<div class="col-xs-12 col-md-4 col-lg-4 mb-2 w-100 <?= $ot->revisar_lomo ? "" : "d-none" ?>">
|
||||
<label for="ot-prelomo-btn" class="form-label"><?= @lang("Produccion.pre_lomo") ?></label>
|
||||
<input type="text" class="form-control ot-date" placeholder="DD/MM/YYYY" name="pre_lomo_at" id="ot-prelomo-date">
|
||||
<div class="form-text"><?= $user_dates["pre_lomo_at"] ?></div>
|
||||
<input type="text" class="form-control ot-date" placeholder="DD/MM/YYYY" name="pre_lomo_at" id="ot-prelomo-date" data-input <?= $is_finalizada ? "disabled" : "" ?>>
|
||||
<div class="form-text"><?= $user_dates["pre_lomo_at"] ?? "<span class='ti-sm ti ti-alert-triangle me-1'></span>" ?></div>
|
||||
|
||||
</div>
|
||||
<!-- Presolapa -->
|
||||
<div class="col-xs-12 col-md-4 col-lg-4 mb-2 w-100 <?= $ot->revisar_solapa ? "" : "d-none" ?>">
|
||||
<label for="ot-presolapa-btn" class="form-label"><?= @lang("Produccion.pre_solapa") ?></label>
|
||||
<input type="text" class="form-control ot-date" placeholder="DD/MM/YYYY" name="pre_solapa_at" id="ot-presolapa-date">
|
||||
<div class="form-text"><?= $user_dates["pre_solapa_at"] ?></div>
|
||||
<input type="text" class="form-control ot-date" placeholder="DD/MM/YYYY" name="pre_solapa_at" id="ot-presolapa-date" data-input <?= $is_finalizada ? "disabled" : "" ?>>
|
||||
<div class="form-text"><?= $user_dates["pre_solapa_at"] ?? "<span class='ti-sm ti ti-alert-triangle me-1'></span>" ?></div>
|
||||
|
||||
</div>
|
||||
<!-- Precodbarras -->
|
||||
<div class="col-xs-12 col-md-4 col-lg-4 mb-2 w-100 <?= $ot->revisar_codigo_barras ? "" : "d-none" ?>">
|
||||
<label for="ot-precodbarras-btn" class="form-label"><?= @lang("Produccion.pre_codbarras") ?></label>
|
||||
<input type="text" class="form-control ot-date" placeholder="DD/MM/YYYY" name="pre_codbarras_at" id="ot-precodbarras-date">
|
||||
<div class="form-text"><?= $user_dates["pre_codbarras_at"] ?></div>
|
||||
<input type="text" class="form-control ot-date" placeholder="DD/MM/YYYY" name="pre_codbarras_at" id="ot-precodbarras-date" data-input <?= $is_finalizada ? "disabled" : "" ?>>
|
||||
<div class="form-text"><?= $user_dates["pre_codbarras_at"] ?? "<span class='ti-sm ti ti-alert-triangle me-1'></span>" ?></div>
|
||||
|
||||
</div>
|
||||
<!-- Preimposicion -->
|
||||
<div class="col-xs-12 col-md-4 col-lg-4 mb-2 w-100 <?= $ot->realizar_imposicion ? "" : "d-none" ?>">
|
||||
<label for="ot-preimposicion-btn" class="form-label"><?= @lang("Produccion.pre_imposicion") ?></label>
|
||||
<input type="text" class="form-control ot-date" placeholder="DD/MM/YYYY" name="pre_imposicion_at" id="ot-preimposicion-date">
|
||||
<div class="form-text"><?= $user_dates["pre_imposicion_at"] ?></div>
|
||||
<input type="text" class="form-control ot-date" placeholder="DD/MM/YYYY" name="pre_imposicion_at" id="ot-preimposicion-date" data-input <?= $is_finalizada ? "disabled" : "" ?>>
|
||||
<div class="form-text"><?= $user_dates["pre_imposicion_at"] ?? "<span class='ti-sm ti ti-alert-triangle me-1'></span>" ?></div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="row">
|
||||
<p><?= @lang("Produccion.tiempo_estimado") ?> :</p>
|
||||
<p><?= @lang("Produccion.tiempo_estimado") ?> : <?= $tiempo_estimado ?> (HH:MM)</p>
|
||||
</div>
|
||||
<div class="row">
|
||||
<p><?= @lang("Produccion.tiempo_consumido") ?> :</p>
|
||||
@ -201,7 +213,7 @@
|
||||
<div class="col-md-12">
|
||||
<div class="d-flex flex-row justify-content-between align-items-center">
|
||||
<label class="switch switch-danger switch-lg mt-1">
|
||||
<input type="checkbox" class="switch-input ot-preview" id="ot-pedido-espera" name="is_pedido_espera" />
|
||||
<input type="checkbox" class="switch-input ot-preview" id="ot-pedido-espera" name="is_pedido_espera" data-input <?= $is_finalizada ? "disabled" : "" ?> />
|
||||
<span class="switch-toggle-slider">
|
||||
<span class="switch-on">
|
||||
<i class="ti ti-alert-triangle"></i>
|
||||
@ -213,7 +225,12 @@
|
||||
<span class="switch-label fw-lg"><?= @lang("Produccion.pedido_espera") ?></span>
|
||||
<span class="badge text-bg-warning fw-lg" id="pedido_espera_by"></span>
|
||||
</label>
|
||||
<button type="button" id="btn-finalizar-orden-pedido" class="btn btn-primary btn-block" <?= $ot->estado == "F" ? "disabled" : "" ?>><?= @lang("Produccion.finalizar_orden") ?></button>
|
||||
<?php if ($is_finalizada): ?>
|
||||
<button type="button" id="btn-reactivar-orden-pedido" class="btn btn-primary btn-block"><?= @lang("Produccion.reactivar_orden") ?></button>
|
||||
<?php else: ?>
|
||||
<button type="button" id="btn-finalizar-orden-pedido" class="btn btn-warning btn-block"><?= @lang("Produccion.finalizar_orden") ?></button>
|
||||
<?php endif; ?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -47,7 +47,9 @@
|
||||
</div>
|
||||
<div class="col-md-3 gap-2 text-end">
|
||||
<!-- <button type="button" class="btn btn-warning btn-md" id="btn-reset-tareas-time"><span class="ti ti-clock ti-sm me-1"></span> Actualizar tiempo</button> -->
|
||||
<button type="button" class="btn btn-danger btn-md" id="btn-reset-tareas"><span class="ti ti-trash ti-sm me-1"></span> Reiniciar tareas</button>
|
||||
<?php if (!$is_finalizada): ?>
|
||||
<button type="button" class="btn btn-danger btn-md" id="btn-reset-tareas"><span class="ti ti-trash ti-sm me-1"></span> Reiniciar tareas</button>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -36,7 +36,7 @@ $settings = $session->get('settings');
|
||||
<div class="col-md-12" data-id=<?= $ot->id ?>>
|
||||
<div class="row">
|
||||
<div class="col-12 d-flex justify-content-between align-items-center">
|
||||
<h4><?= $presupuesto->titulo ?></h4>
|
||||
<h5><?= $presupuesto->titulo ?></h5>
|
||||
<span class="fs-medium"><strong><?= Time::now()->format("d/m/Y H:i:s") ?></strong></span>
|
||||
</div>
|
||||
</div>
|
||||
@ -46,79 +46,98 @@ $settings = $session->get('settings');
|
||||
<div class="col-2">
|
||||
<img class="portada-img border-secondary img-thumbnail img-fluid" src="<?= $ot->portada_path ? "data:image/png;base64," . base64_encode(file_get_contents(WRITEPATH . "uploads/" . $ot->portada_path)) : '/assets/img/portada_not_found.png' ?>" />
|
||||
</div>
|
||||
<div class="col-10 <?= $ot->fecha_entrega_warning ? "bg-danger" : "bg-secondary" ?> py-2 rounded border-1 border-secondary">
|
||||
<div class="col-10 py-2 rounded border-1 border-secondary" style="background-color: <?= $colors["general"]["bg"] ?>;color:<?= $colors["general"]["color"] ?>;">
|
||||
<div class="row">
|
||||
<div class="col-8">
|
||||
<div class="px-2 d-flex flex justify-content-between align-items-center mb-2 border boder-1 border-dark bg-primary text-white rounded-pill bordered border-secondary">
|
||||
<span><strong><?= $pedido->fecha_encuadernado ? week_day_humanize(Time::createFromFormat("Y-m-d H:i:s", $pedido->fecha_encuadernado)->getDayOfWeek(), true) : "" ?></strong></span>
|
||||
<div class="px-2 d-flex flex justify-content-between align-items-center" style="background-color: <?= $colors["week_day"]["bg"] ?>;color:<?= $colors["week_day"]["color"] ?>;">
|
||||
<span><strong><?= $pedido->fecha_encuadernado ? week_day_humanize(Time::createFromFormat("Y-m-d H:i:s", $pedido->fecha_encuadernado)->getDayOfWeek() - 1, true) : "" ?></strong></span>
|
||||
<span><strong>Comercial:</strong> <?= $cliente->first_name . " " . $cliente->comercial()->last_name ?> </span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-4">
|
||||
<div class="px-2 d-flex flex justify-content-center align-items-center mb-2 border boder-1 border-dark bg-success rounded-pill">
|
||||
<span class="text-white"><strong><?= $presupuesto->presupuestoLineaImpresion()->isRotativa() ? "Rotativa" : "Plana" ?></strong></span>
|
||||
<div class="px-2 d-flex flex justify-content-center align-items-center w-100">
|
||||
<span class="w-100 text-center" style="background-color: <?= $colors["impresion_interior_ppal"]["bg"] ?>;color:<?= $colors["impresion_interior_ppal"]["color"] ?>;">
|
||||
<?php if ($isPOD): ?>
|
||||
<strong>ROTATIVA</strong>
|
||||
<?php elseif ($presupuesto->presupuestoLineaImpresion()->isRotativa()): ?>
|
||||
<strong>ROTATIVA</strong>
|
||||
<?php else: ?>
|
||||
<strong>GENERAL</strong>
|
||||
<?php endif; ?>
|
||||
|
||||
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row p-2">
|
||||
<div class="col-4 h-100">
|
||||
<div class="col-3 h-100">
|
||||
<div class="row px-2 d-flex flex justify-content-between align-items-center">
|
||||
<div class="col-6 w-75 border border-1 border-dark text-center <?= $ot->fecha_entrega_warning ? "bg-danger" : "bg-white" ?> ">
|
||||
<span class="<?= $ot->fecha_entrega_warning ? "text-white" : "text-black" ?>" id="fecha_encuadernado_at"><strong><?= $pedido->fecha_encuadernado ? Time::createFromFormat("Y-m-d H:i:s", $pedido->fecha_encuadernado)->format('d/m/Y') : "" ?></strong></span>
|
||||
</div>
|
||||
<div class="col-6 w-25 border border-1 border-dark text-center bg-secondary text-white">
|
||||
<strong><?=isset($encuadernaciones[0]) ? $encuadernaciones[0]->tarifa()->code ?? "?" : "?" ?></strong>
|
||||
<div class="col-6 w-100 text-center">
|
||||
<span id="fecha_encuadernado_at" style="color:<?= $colors["general"]["color"] ?>;"><strong><?= $pedido->fecha_encuadernado ? Time::createFromFormat("Y-m-d H:i:s", $pedido->fecha_encuadernado)->format('d/m/Y') : "??" ?></strong></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row px-2 mt-2 h-100">
|
||||
<table class="h-100">
|
||||
<tr class="t-row">
|
||||
<th class="t-header">IN</th>
|
||||
<tr>
|
||||
<th>IN</th>
|
||||
<td class="t-cell bg-white"><?= $ubicacion ?></td>
|
||||
</tr>
|
||||
<tr class="t-row">
|
||||
<th class="t-header">PO</th>
|
||||
<tr>
|
||||
<th>PORT.</th>
|
||||
<td class="t-cell bg-white"><?= $ubicacion ?></td>
|
||||
</tr>
|
||||
<tr class="t-row">
|
||||
<th class="t-header">PL</th>
|
||||
<tr>
|
||||
<th>ACABAD.</th>
|
||||
<td class="t-cell bg-white"><?= $ubicacion ?></td>
|
||||
</tr>
|
||||
<tr class="t-row">
|
||||
<th class="t-header">EN</th>
|
||||
<tr>
|
||||
<th>ENCUAD.</th>
|
||||
<td class="t-cell bg-white"><?= $ubicacion ?></td>
|
||||
</tr>
|
||||
<tr class="t-row">
|
||||
<th class="t-header">MA</th>
|
||||
<tr>
|
||||
<th>MANIPUL.</th>
|
||||
<td class="t-cell bg-white"><?= $ubicacion ?></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="col-4">
|
||||
<div class="row h-100">
|
||||
<div class="col-6 h-50 square text-center text-dark bg-white border border-right border-dark">
|
||||
<?= $linea_impresion->papel_impresion()->papel_code_ot ?>
|
||||
</div>
|
||||
<div class="col-6 h-50 square text-center <?=$linea_impresion->isColor() ? "cmyk" : "bn" ?> border border-right border-dark">
|
||||
<?= $tiempo_procesamiento ?>
|
||||
</div>
|
||||
<div class="col-6 h-50 square bg-primary text-center text-white border border-right border-dark">
|
||||
<?= $linea_cubierta->papel_impresion()->papel_code_ot ?>
|
||||
</div>
|
||||
<div class="col-6 h-50 square bg-blue text-center text-dark bg-secondary border border-right border-dark">
|
||||
<?= isset($acabados[0]) ? $acabados[0]->tarifa()->code : "" ?>
|
||||
<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>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-4 bg-warning border border-dark">
|
||||
<div class="row h-100">
|
||||
<div class="col-12 h-25 d-flex flex align-items-center justify-content-center">
|
||||
<span class="fs-large text-white"><strong><?= $ot->id ?></strong></span>
|
||||
<div class="row h-75">
|
||||
<div class="col-6 square text-center" style="background-color: <?= $colors["papel_interior"]["bg"] ?>;color:<?= $colors["papel_interior"]["color"] ?>;">
|
||||
<?= $linea_impresion->papel_impresion()->papel_code_ot ?>
|
||||
</div>
|
||||
<div class="col-12 h-75 d-flex flex align-items-center justify-content-center bg-white">
|
||||
<div class="col-6 square text-center <?= $linea_impresion->isColor() ? "cmyk" : "bn" ?>">
|
||||
<?= $tiempo_impresion ?>
|
||||
</div>
|
||||
<div class="col-6 square text-center" style="background-color: <?= $colors["papel_cubierta"]["bg"] ?>;color:<?= $colors["papel_cubierta"]["color"] ?>;">
|
||||
<?= $linea_cubierta->papel_impresion()->papel_code_ot ?>
|
||||
</div>
|
||||
<div class="col-6 square text-center" style="background-color: <?= $colors["plastificado"]["bg"] ?>;color:<?= $colors["plastificado"]["color"] ?>;">
|
||||
<?= isset($acabados[0]) ? $acabados[0]->tarifa()->code : "" ?>
|
||||
</div>
|
||||
<?php foreach ($acabados as $key => $acabado): ?>
|
||||
<?php if ($acabado->tarifa()->isUVI()): ?>
|
||||
<div class="col-6 square offset-md-6 text-center" style="background-color:<?= $acabado->tarifa()->code == "R2D" ? "#4D93D9" : "#0070C0" ?>;color:white;">
|
||||
+ <?= $acabado->tarifa()->code ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-4" style="background-color: <?= $colors["ot"]["bg"] ?>">
|
||||
<div class="row h-100">
|
||||
<div class="col-12 h-50 d-flex flex align-items-center justify-content-center">
|
||||
<span class="fs-large" style="color:<?= $colors["ot"]["color"] ?>;"><strong><?= $ot->id ?></strong></span>
|
||||
</div>
|
||||
<div class="col-12 h-50 d-flex flex align-items-center justify-content-center bg-white">
|
||||
<img class="img-fluid" src="data:image/png;base64,<?= $ot->bar_code ?>" alt="barcode" />
|
||||
</div>
|
||||
|
||||
@ -132,25 +151,25 @@ $settings = $session->get('settings');
|
||||
<div class="col-8">
|
||||
<table class="h-50">
|
||||
<tr>
|
||||
<th >Cliente</th>
|
||||
<th>CLIENTE</th>
|
||||
<td class="t-cell">
|
||||
<?= $cliente->nombre ?>
|
||||
<?= $cliente->alias ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th >Titulo</th>
|
||||
<th>TITULO</th>
|
||||
<td class="t-cell">
|
||||
<?= $presupuesto->titulo ?>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<th >ISBN</th>
|
||||
<th>ISBN</th>
|
||||
<td class="t-cell"><?= $presupuesto->isbn ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th >CIF</th>
|
||||
<td class="t-cell"><?= $cliente->cif ?></td>
|
||||
<th>PEDIDO CLIENTE</th>
|
||||
<td class="t-cell"><?= $pedido->id ?></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
@ -198,18 +217,18 @@ $settings = $session->get('settings');
|
||||
<div class="section-title impresion">IMP. INTERIOR</div>
|
||||
<div class="col-12">
|
||||
<div>
|
||||
<table>
|
||||
<tr>
|
||||
<th class="t-header" style="width: 10%;"><?=lang('Produccion.size')?></th>
|
||||
<td class="t-cell text-center"> <?= $papel_formato->ancho ?>x<?= $papel_formato->alto ?> </td>
|
||||
<th class="t-header" style="width: 10%;"><?=lang('Produccion.ejemplares')?></th>
|
||||
<td class="t-cell text-center"> <?=$presupuesto->tirada ?> </td>
|
||||
<th class="t-header" style="width: 10%;"><?=lang('Produccion.tipo')?></th>
|
||||
<td class="t-cell text-center"> <?=$linea_impresion->tipo ?> </td>
|
||||
<th class="t-header" style="width: 10%;"><?=lang('Produccion.lomo')?></th>
|
||||
<td class="t-cell text-center"> <?=number_format($presupuesto->lomo_cubierta,2,',','.') ?> </td>
|
||||
</tr>
|
||||
</table>
|
||||
<table>
|
||||
<tr>
|
||||
<th class="t-header" style="width: 10%;"><?= lang('Produccion.size') ?></th>
|
||||
<td class="t-cell text-center"> <?= $papel_formato->ancho ?>x<?= $papel_formato->alto ?> </td>
|
||||
<th class="t-header" style="width: 10%;"><?= lang('Produccion.ejemplares') ?></th>
|
||||
<td class="t-cell text-center"> <?= $presupuesto->tirada ?> + <?= $presupuesto->merma ?> </td>
|
||||
<th class="t-header" style="width: 10%;"><?= lang('Produccion.tipo') ?></th>
|
||||
<td class="t-cell text-center"> <?= $presupuesto->tipo_presupuesto()?->codigo ?? "" ?> </td>
|
||||
<th class="t-header" style="width: 10%;"><?= lang('Produccion.lomo') ?></th>
|
||||
<td class="t-cell text-center"> <?= number_format($presupuesto->lomo_cubierta, 2, ',', '.') ?> </td>
|
||||
</tr>
|
||||
</table>
|
||||
<table>
|
||||
<tr>
|
||||
<td rowspan="3" class="row-logo-impresion"><img src="<?= site_url($linea_impresion->get_impresion_logo()) ?>" width="35px" height="35px"></td>
|
||||
@ -223,7 +242,7 @@ $settings = $session->get('settings');
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?= $presupuesto->paginas ?></td>
|
||||
<td><?= $presupuesto->tirada ?></td>
|
||||
<td><?= $presupuesto->tirada ?> </td>
|
||||
<td>??</td>
|
||||
<td><?= json_decode($linea_impresion->formas)->formas ?></td>
|
||||
<td><strong><?= $linea_impresion->maquina()->nombre ?></strong></td>
|
||||
@ -296,7 +315,7 @@ $settings = $session->get('settings');
|
||||
<th class="t-header" style="width: 10%;">Plastificado</th>
|
||||
<td class="t-cell text-center"><?= $acabados[0]->tarifa()->nombre ?></td>
|
||||
<th class="t-header" style="width: 10%;">UVI</th>
|
||||
<td class="t-cell text-center"> ?? </td>
|
||||
<td class="t-cell text-center"> <?= $uvi ? $uvi->code : "" ?> </td>
|
||||
<th class="t-header" style="width: 10%;">Máquina</th>
|
||||
<td class="t-cell text-center"><?= implode("/", array_map(fn($q) => $q->nombre, $acabados[0]->maquinas())) ?> </td>
|
||||
<th class="t-header " style="width: 10%;">Operario</th>
|
||||
@ -319,7 +338,7 @@ $settings = $session->get('settings');
|
||||
<td><?= $value->tarifa()->nombre ?></td>
|
||||
<td><?= $presupuesto->solapas ? "SI" : "NO" ?></td>
|
||||
<td><?= $presupuesto->hasSobrecubierta() ? "SI" : "NO" ?></td>
|
||||
<td>_____<?=" ".lang("Produccion.pliegos_de")." "?>_____</td>
|
||||
<td>_____<?= " " . lang("Produccion.pliegos_de") . " " ?>_____</td>
|
||||
<td><?= $presupuesto->guardas ? "SI" : "NO" ?></td>
|
||||
<td><?= $presupuesto->retractilado ? "SI" : "NO" ?></td>
|
||||
<td><?= $presupuesto->marcapaginas ? "SI" : "NO" ?></td>
|
||||
|
||||
@ -1,5 +1,4 @@
|
||||
$(() => {
|
||||
console.log("PDF")
|
||||
var opt = {
|
||||
margin: 2,
|
||||
filename: "PDF_OrdenTrabajo_" + $(".pdf-wrapper").data("id") + ".pdf",
|
||||
|
||||
@ -81,6 +81,15 @@ class OrdenTrabajo {
|
||||
this.prepGrapado = new DatePicker(this.otForm.find("#ot-prep-grapado"), option)
|
||||
this.prepSolapa = new DatePicker(this.otForm.find("#ot-prep-solapa"), option)
|
||||
|
||||
this.prepPrototipo = new DatePicker(this.otForm.find("#ot-prep-prototipo"), option)
|
||||
this.prepMarcapaginas = new DatePicker(this.otForm.find("#ot-prep-marcapaginas"), option)
|
||||
this.prepRetractilado = new DatePicker(this.otForm.find("#ot-prep-retractilado"), option)
|
||||
this.prepRetractilado5 = new DatePicker(this.otForm.find("#ot-prep-retractilado5"), option)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
this.espiral = new DatePicker(this.otForm.find("#ot-espiral"), option)
|
||||
this.embalaje = new DatePicker(this.otForm.find("#ot-embalaje"), option)
|
||||
this.envio = new DatePicker(this.otForm.find("#ot-envio"), option)
|
||||
@ -225,7 +234,7 @@ class OrdenTrabajo {
|
||||
if (element.presupuesto_preimpresion_id) this.createSelectMaquinaAll(selectItem)
|
||||
if (element.presupuesto_extra_id) this.createSelectMaquinaAll(selectItem)
|
||||
if (this.summaryData.impresion_interior_bn) {
|
||||
let isTareaImpresionInteriorBN = this.summaryData.impresion_interior_bn?.presupuesto_linea_id == element.presupuesto_linea_id
|
||||
let isTareaImpresionInteriorBN = this.summaryData.impresion_interior_bn?.presupuesto_linea_id == element.presupuesto_linea_id && element.is_corte == false
|
||||
if (isTareaImpresionInteriorBN) {
|
||||
let selectItemImposicion = this.item.find("#select-imposicion-tarea-" + element.id);
|
||||
this.createSelectImposicion(selectItemImposicion)
|
||||
@ -235,7 +244,7 @@ class OrdenTrabajo {
|
||||
}
|
||||
}
|
||||
if (this.summaryData.impresion_interior_color) {
|
||||
let isTareaImpresionInteriorColor = this.summaryData.impresion_interior_color?.presupuesto_linea_id == element.presupuesto_linea_id
|
||||
let isTareaImpresionInteriorColor = this.summaryData.impresion_interior_color?.presupuesto_linea_id == element.presupuesto_linea_id && element.is_corte == false
|
||||
if (isTareaImpresionInteriorColor) {
|
||||
let selectItemImposicion = this.item.find("#select-imposicion-tarea-" + element.id);
|
||||
this.createSelectImposicion(selectItemImposicion)
|
||||
@ -397,6 +406,11 @@ class OrdenTrabajo {
|
||||
this.prepSolapa.setDate(this.summaryData.dates.solapa_at)
|
||||
this.prepGrapado.setDate(this.summaryData.dates.grapado_at)
|
||||
|
||||
this.prepPrototipo.setDate(this.summaryData.dates.prototipo_at)
|
||||
this.prepMarcapaginas.setDate(this.summaryData.dates.marcapaginas_at)
|
||||
this.prepRetractilado.setDate(this.summaryData.dates.retractilado_at)
|
||||
this.prepRetractilado5.setDate(this.summaryData.dates.retractilado5_at)
|
||||
|
||||
this.espiral.setDate(this.summaryData.dates.fecha_impresion_at)
|
||||
this.embalaje.setDate(this.summaryData.dates.embalaje_at)
|
||||
this.envio.setDate(this.summaryData.dates.envio_at)
|
||||
|
||||
@ -39,7 +39,7 @@ body{
|
||||
align-content : center;
|
||||
justify-content: center;
|
||||
font-weight: bold;
|
||||
font-size : 20px;
|
||||
font-size : 14px;
|
||||
|
||||
}
|
||||
.esquema{
|
||||
|
||||
Reference in New Issue
Block a user