mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
Merge branch 'dev/tinta_extra_inkjet' into 'main'
Dev/tinta extra inkjet See merge request jjimenez/safekat!146
This commit is contained in:
@ -267,6 +267,13 @@ class Papelimpresiontipologias extends \App\Controllers\GoBaseResourceController
|
|||||||
->validator( 'Validate::notEmpty',array(
|
->validator( 'Validate::notEmpty',array(
|
||||||
'message' => lang('ImpresionTipologias.validation.amarillo.required') )
|
'message' => lang('ImpresionTipologias.validation.amarillo.required') )
|
||||||
),
|
),
|
||||||
|
Field::inst( 'cg' )
|
||||||
|
->validator( 'Validate::numeric', array(
|
||||||
|
'message' => lang('ImpresionTipologias.validation.amarillo.decimal') )
|
||||||
|
)
|
||||||
|
->validator( 'Validate::notEmpty',array(
|
||||||
|
'message' => lang('ImpresionTipologias.validation.amarillo.required') )
|
||||||
|
),
|
||||||
Field::inst( 'gota_negro' )
|
Field::inst( 'gota_negro' )
|
||||||
->validator( 'Validate::numeric', array(
|
->validator( 'Validate::numeric', array(
|
||||||
'message' => lang('ImpresionTipologias.validation.gota_negro.decimal') )
|
'message' => lang('ImpresionTipologias.validation.gota_negro.decimal') )
|
||||||
|
|||||||
@ -728,6 +728,7 @@ class Cosidotapablanda extends \App\Controllers\GoBaseResourceController
|
|||||||
$parametrosInkjet->rotativa_cyan = $datosTipologias[0]->cyan;
|
$parametrosInkjet->rotativa_cyan = $datosTipologias[0]->cyan;
|
||||||
$parametrosInkjet->rotativa_magenta = $datosTipologias[0]->magenta;
|
$parametrosInkjet->rotativa_magenta = $datosTipologias[0]->magenta;
|
||||||
$parametrosInkjet->rotativa_amarillo = $datosTipologias[0]->amarillo;
|
$parametrosInkjet->rotativa_amarillo = $datosTipologias[0]->amarillo;
|
||||||
|
$parametrosInkjet->rotativa_cg = $datosTipologias[0]->cg;
|
||||||
}
|
}
|
||||||
|
|
||||||
$tarifamodel = new MaquinasTarifasImpresionModel();
|
$tarifamodel = new MaquinasTarifasImpresionModel();
|
||||||
|
|||||||
@ -25,6 +25,7 @@ class Maquina extends \CodeIgniter\Entity\Entity
|
|||||||
"precio_tinta_negro" => 0.0,
|
"precio_tinta_negro" => 0.0,
|
||||||
"is_inkjet" => false,
|
"is_inkjet" => false,
|
||||||
"precio_tinta_color" => 0.0,
|
"precio_tinta_color" => 0.0,
|
||||||
|
"precio_tinta_cg" => 0.0,
|
||||||
"velocidad_corte" => 0.0,
|
"velocidad_corte" => 0.0,
|
||||||
"precio_hora_corte" => 0.0,
|
"precio_hora_corte" => 0.0,
|
||||||
"metrosxminuto" => 0.0,
|
"metrosxminuto" => 0.0,
|
||||||
@ -54,6 +55,7 @@ class Maquina extends \CodeIgniter\Entity\Entity
|
|||||||
"precio_tinta_negro" => "float",
|
"precio_tinta_negro" => "float",
|
||||||
"is_inkjet" => "boolean",
|
"is_inkjet" => "boolean",
|
||||||
"precio_tinta_color" => "float",
|
"precio_tinta_color" => "float",
|
||||||
|
"precio_tinta_cg" => "float",
|
||||||
"velocidad_corte" => "float",
|
"velocidad_corte" => "float",
|
||||||
"precio_hora_corte" => "float",
|
"precio_hora_corte" => "float",
|
||||||
"forzar_num_formas_horizontales_cubierta" => "?int",
|
"forzar_num_formas_horizontales_cubierta" => "?int",
|
||||||
|
|||||||
@ -13,6 +13,7 @@ class PapelImpresionTipologia extends \CodeIgniter\Entity\Entity
|
|||||||
"cyan" => 0.0,
|
"cyan" => 0.0,
|
||||||
"magenta" => 0.0,
|
"magenta" => 0.0,
|
||||||
"amarillo" => 0.0,
|
"amarillo" => 0.0,
|
||||||
|
"cg" => 0.0,
|
||||||
"gota_negro" => 0.0,
|
"gota_negro" => 0.0,
|
||||||
"gota_color" => 0.0,
|
"gota_color" => 0.0,
|
||||||
];
|
];
|
||||||
@ -22,6 +23,7 @@ class PapelImpresionTipologia extends \CodeIgniter\Entity\Entity
|
|||||||
"cyan" => "float",
|
"cyan" => "float",
|
||||||
"magenta" => "float",
|
"magenta" => "float",
|
||||||
"amarillo" => "float",
|
"amarillo" => "float",
|
||||||
|
"cg" => "float",
|
||||||
"gota_negro" => "float",
|
"gota_negro" => "float",
|
||||||
"gota_color" => "float",
|
"gota_color" => "float",
|
||||||
];
|
];
|
||||||
|
|||||||
@ -3,6 +3,7 @@
|
|||||||
|
|
||||||
|
|
||||||
return [
|
return [
|
||||||
|
'cg' => 'CG',
|
||||||
'amarillo' => 'Yellow',
|
'amarillo' => 'Yellow',
|
||||||
'bicolor' => 'Bicolor',
|
'bicolor' => 'Bicolor',
|
||||||
'color' => 'Color',
|
'color' => 'Color',
|
||||||
|
|||||||
@ -140,7 +140,7 @@ return [
|
|||||||
'gTintaCyan' => 'G. Cyan Ink',
|
'gTintaCyan' => 'G. Cyan Ink',
|
||||||
'gTintaMagenta' => 'G. Magenta Ink',
|
'gTintaMagenta' => 'G. Magenta Ink',
|
||||||
'gTintaAmarillo' => 'G. Yellow Ink',
|
'gTintaAmarillo' => 'G. Yellow Ink',
|
||||||
'clicksPedido' => 'Clicks Order',
|
'clicksPedido' => 'Clicks Order',
|
||||||
'totalClicks' => 'Total Clicks',
|
'totalClicks' => 'Total Clicks',
|
||||||
'totalTinta' => 'Total Ink',
|
'totalTinta' => 'Total Ink',
|
||||||
'totalCorte' => 'Total Cut',
|
'totalCorte' => 'Total Cut',
|
||||||
|
|||||||
@ -3,6 +3,7 @@
|
|||||||
|
|
||||||
|
|
||||||
return [
|
return [
|
||||||
|
'cg' => 'CG',
|
||||||
'amarillo' => 'Amarillo',
|
'amarillo' => 'Amarillo',
|
||||||
'bicolor' => 'Bicolor',
|
'bicolor' => 'Bicolor',
|
||||||
'color' => 'Color',
|
'color' => 'Color',
|
||||||
|
|||||||
@ -33,6 +33,7 @@ return [
|
|||||||
'ordenPlanning' => 'Orden Planning',
|
'ordenPlanning' => 'Orden Planning',
|
||||||
'padreId' => 'Variante',
|
'padreId' => 'Variante',
|
||||||
'precioHoraCorte' => 'Precio Hora Corte',
|
'precioHoraCorte' => 'Precio Hora Corte',
|
||||||
|
'precioTintaCG' => 'Precio Tinta CG',
|
||||||
'precioTintaColor' => 'Precio Tinta Color',
|
'precioTintaColor' => 'Precio Tinta Color',
|
||||||
'precioTintaNegro' => 'Precio Tinta Negro',
|
'precioTintaNegro' => 'Precio Tinta Negro',
|
||||||
'tipo' => 'Tipo',
|
'tipo' => 'Tipo',
|
||||||
@ -130,6 +131,12 @@ return [
|
|||||||
|
|
||||||
],
|
],
|
||||||
|
|
||||||
|
'precio_tinta_cg' => [
|
||||||
|
'decimal' => 'El campo {field} debe contener un número decimal.',
|
||||||
|
'required' => 'El campo {field} es obligatorio.',
|
||||||
|
|
||||||
|
],
|
||||||
|
|
||||||
'precio_tinta_color' => [
|
'precio_tinta_color' => [
|
||||||
'decimal' => 'El campo {field} debe contener un número decimal.',
|
'decimal' => 'El campo {field} debe contener un número decimal.',
|
||||||
'required' => 'El campo {field} es obligatorio.',
|
'required' => 'El campo {field} es obligatorio.',
|
||||||
|
|||||||
@ -116,6 +116,7 @@ return [
|
|||||||
'cobCyan' => 'Cob. % Cyan',
|
'cobCyan' => 'Cob. % Cyan',
|
||||||
'cobMagenta' => 'Cob. % Magenta',
|
'cobMagenta' => 'Cob. % Magenta',
|
||||||
'cobAmarillo' => 'Cob. % Amarillo',
|
'cobAmarillo' => 'Cob. % Amarillo',
|
||||||
|
'cobCG' => 'Cob. % CG',
|
||||||
'gotaNegro' => 'Gota negro',
|
'gotaNegro' => 'Gota negro',
|
||||||
'gotaColor' => 'Gota color',
|
'gotaColor' => 'Gota color',
|
||||||
'totalLinea' => 'TOTAL LÍNEA',
|
'totalLinea' => 'TOTAL LÍNEA',
|
||||||
@ -127,6 +128,7 @@ return [
|
|||||||
'gotasCyan' => 'Nº gotas cyan',
|
'gotasCyan' => 'Nº gotas cyan',
|
||||||
'gotasMagenta' => 'Nº gotas magenta',
|
'gotasMagenta' => 'Nº gotas magenta',
|
||||||
'gotasAmarillo' => 'Nº gotas amarillo',
|
'gotasAmarillo' => 'Nº gotas amarillo',
|
||||||
|
'gotasCG' => 'Nº gotas CG',
|
||||||
'precioPagNegro' => 'Precio pág. Negro',
|
'precioPagNegro' => 'Precio pág. Negro',
|
||||||
'precioPagColor' => 'Precio pág. Color',
|
'precioPagColor' => 'Precio pág. Color',
|
||||||
'factorAltura' => 'Factor altura',
|
'factorAltura' => 'Factor altura',
|
||||||
@ -139,6 +141,7 @@ return [
|
|||||||
'gTintaCyan' => 'G. tinta Cyan',
|
'gTintaCyan' => 'G. tinta Cyan',
|
||||||
'gTintaMagenta' => 'G. tinta Magenta',
|
'gTintaMagenta' => 'G. tinta Magenta',
|
||||||
'gTintaAmarillo' => 'G. tinta Amarillo',
|
'gTintaAmarillo' => 'G. tinta Amarillo',
|
||||||
|
'gTintaCG' => 'G. tinta CG',
|
||||||
'clicksPedido' => 'Clicks Pedido',
|
'clicksPedido' => 'Clicks Pedido',
|
||||||
'totalClicks' => 'Total Clicks',
|
'totalClicks' => 'Total Clicks',
|
||||||
'totalTinta' => 'Total Tinta',
|
'totalTinta' => 'Total Tinta',
|
||||||
@ -151,6 +154,7 @@ return [
|
|||||||
'gTintaCyanPed' => 'G.T. Cyan Ped.',
|
'gTintaCyanPed' => 'G.T. Cyan Ped.',
|
||||||
'gTintaMagentaPed' => 'G.T. Magenta Ped.',
|
'gTintaMagentaPed' => 'G.T. Magenta Ped.',
|
||||||
'gTintaAmarilloPed' => 'G.T. Amarillo Ped.',
|
'gTintaAmarilloPed' => 'G.T. Amarillo Ped.',
|
||||||
|
'gTintaCGPed' => 'G.T. CG Ped.',
|
||||||
|
|
||||||
'addLineaPresupuesto' => 'Añadir linea...',
|
'addLineaPresupuesto' => 'Añadir linea...',
|
||||||
|
|
||||||
|
|||||||
@ -50,6 +50,7 @@ class MaquinaModel extends \App\Models\GoBaseModel
|
|||||||
"precio_tinta_negro",
|
"precio_tinta_negro",
|
||||||
"is_inkjet",
|
"is_inkjet",
|
||||||
"precio_tinta_color",
|
"precio_tinta_color",
|
||||||
|
"precio_tinta_cg",
|
||||||
"velocidad_corte",
|
"velocidad_corte",
|
||||||
"precio_hora_corte",
|
"precio_hora_corte",
|
||||||
"metrosxminuto",
|
"metrosxminuto",
|
||||||
@ -131,6 +132,10 @@ class MaquinaModel extends \App\Models\GoBaseModel
|
|||||||
"label" => "Maquinas.precioHoraCorte",
|
"label" => "Maquinas.precioHoraCorte",
|
||||||
"rules" => "decimal",
|
"rules" => "decimal",
|
||||||
],
|
],
|
||||||
|
"precio_tinta_cg" => [
|
||||||
|
"label" => "Maquinas.precioTintaColor",
|
||||||
|
"rules" => "decimal",
|
||||||
|
],
|
||||||
"precio_tinta_color" => [
|
"precio_tinta_color" => [
|
||||||
"label" => "Maquinas.precioTintaColor",
|
"label" => "Maquinas.precioTintaColor",
|
||||||
"rules" => "decimal",
|
"rules" => "decimal",
|
||||||
@ -297,7 +302,7 @@ class MaquinaModel extends \App\Models\GoBaseModel
|
|||||||
->select(
|
->select(
|
||||||
"t1.id AS id, t1.nombre AS nombre, t1.is_padre AS is_padre, t1.tipo AS tipo, t1.velocidad AS velocidad, t1.ancho AS ancho, t1.alto AS alto, t1.ancho_impresion AS ancho_impresion, t1.alto_impresion AS alto_impresion, t1.alto_click AS alto_click, t1.min AS min, t1.max AS max, t1.duracion_jornada AS duracion_jornada,
|
"t1.id AS id, t1.nombre AS nombre, t1.is_padre AS is_padre, t1.tipo AS tipo, t1.velocidad AS velocidad, t1.ancho AS ancho, t1.alto AS alto, t1.ancho_impresion AS ancho_impresion, t1.alto_impresion AS alto_impresion, t1.alto_click AS alto_click, t1.min AS min, t1.max AS max, t1.duracion_jornada AS duracion_jornada,
|
||||||
t1.orden_planning AS orden_planning, t1.is_rotativa AS is_rotativa, t1.precio_tinta_negro AS precio_tinta_negro,
|
t1.orden_planning AS orden_planning, t1.is_rotativa AS is_rotativa, t1.precio_tinta_negro AS precio_tinta_negro,
|
||||||
t1.is_inkjet AS is_inkjet, t1.precio_tinta_color AS precio_tinta_color, t1.velocidad_corte AS velocidad_corte,
|
t1.is_inkjet AS is_inkjet, t1.precio_tinta_color AS precio_tinta_color, t1.precio_tinta_cg AS precio_tinta_cg, t1.velocidad_corte AS velocidad_corte,
|
||||||
t1.precio_hora_corte AS precio_hora_corte, t1.metrosxminuto AS metrosxminuto,
|
t1.precio_hora_corte AS precio_hora_corte, t1.metrosxminuto AS metrosxminuto,
|
||||||
t1.forzar_num_formas_horizontales_cubierta AS forzar_num_formas_horizontales_cubierta,
|
t1.forzar_num_formas_horizontales_cubierta AS forzar_num_formas_horizontales_cubierta,
|
||||||
t1.forzar_num_formas_verticales_cubierta AS forzar_num_formas_verticales_cubierta,
|
t1.forzar_num_formas_verticales_cubierta AS forzar_num_formas_verticales_cubierta,
|
||||||
@ -375,7 +380,7 @@ class MaquinaModel extends \App\Models\GoBaseModel
|
|||||||
"t1.id AS maquina_id, t1.nombre AS maquina, t1.ancho_impresion AS ancho_impresion,
|
"t1.id AS maquina_id, t1.nombre AS maquina, t1.ancho_impresion AS ancho_impresion,
|
||||||
t1.alto_impresion AS alto_impresion, t1.ancho AS ancho, t1.alto AS alto,
|
t1.alto_impresion AS alto_impresion, t1.ancho AS ancho, t1.alto AS alto,
|
||||||
t1.is_rotativa AS is_rotativa, t1.is_inkjet AS is_inkjet, t1.alto_click AS alto_click, t1.velocidad AS velocidad,
|
t1.is_rotativa AS is_rotativa, t1.is_inkjet AS is_inkjet, t1.alto_click AS alto_click, t1.velocidad AS velocidad,
|
||||||
t1.precio_tinta_negro AS precio_tinta_negro, t1.precio_tinta_color AS precio_tinta_color,
|
t1.precio_tinta_negro AS precio_tinta_negro, t1.precio_tinta_color AS precio_tinta_color, t1.precio_tinta_cg AS precio_tinta_cg,
|
||||||
t1.velocidad_corte AS velocidad_corte, t1.precio_hora_corte AS precio_hora_corte,
|
t1.velocidad_corte AS velocidad_corte, t1.precio_hora_corte AS precio_hora_corte,
|
||||||
t1.forzar_num_formas_horizontales_cubierta AS forzar_num_formas_horizontales_cubierta,
|
t1.forzar_num_formas_horizontales_cubierta AS forzar_num_formas_horizontales_cubierta,
|
||||||
t1.forzar_num_formas_verticales_cubierta AS forzar_num_formas_verticales_cubierta"
|
t1.forzar_num_formas_verticales_cubierta AS forzar_num_formas_verticales_cubierta"
|
||||||
|
|||||||
@ -19,6 +19,7 @@ class PapelImpresionTipologiaModel extends \App\Models\GoBaseModel
|
|||||||
"cyan",
|
"cyan",
|
||||||
"magenta",
|
"magenta",
|
||||||
"amarillo",
|
"amarillo",
|
||||||
|
"cg",
|
||||||
"gota_negro",
|
"gota_negro",
|
||||||
"gota_color",
|
"gota_color",
|
||||||
];
|
];
|
||||||
@ -27,6 +28,11 @@ class PapelImpresionTipologiaModel extends \App\Models\GoBaseModel
|
|||||||
public static $labelField = "tipo";
|
public static $labelField = "tipo";
|
||||||
|
|
||||||
protected $validationRules = [
|
protected $validationRules = [
|
||||||
|
"cg"=> [
|
||||||
|
"label" => "ImpresionTipologias.cg",
|
||||||
|
"rules" => "required|decimal",
|
||||||
|
],
|
||||||
|
|
||||||
"amarillo" => [
|
"amarillo" => [
|
||||||
"label" => "ImpresionTipologias.amarillo",
|
"label" => "ImpresionTipologias.amarillo",
|
||||||
"rules" => "required|decimal",
|
"rules" => "required|decimal",
|
||||||
|
|||||||
@ -286,6 +286,16 @@ class PresupuestoService extends BaseService
|
|||||||
round(($data['peso_gotas_amarillo_pedido'] / 1000.0) * $maquina->precio_tinta_color, 2)
|
round(($data['peso_gotas_amarillo_pedido'] / 1000.0) * $maquina->precio_tinta_color, 2)
|
||||||
, 2);
|
, 2);
|
||||||
|
|
||||||
|
// Esta calculado para color
|
||||||
|
if($maquina->is_inkjet){
|
||||||
|
$data['num_gotas_cg'] = round($data['superficie'] * $data['resolucion'] * $data['resolucion'] * ($parametros->rotativa_cg / 100.0), 0);
|
||||||
|
$data['peso_gotas_cg'] = round((($data['num_gotas_cg'] * $parametros->rotativa_gota_color * $data['pulgada']) / (17.65 / 20.0)) * $pag_color * 1000, 6) +
|
||||||
|
round((($data['num_gotas_cg'] * $parametros->rotativa_gota_negro * $data['pulgada']) / (17.65 / 20.0)) * $pag_negro * 1000, 6);
|
||||||
|
$data['peso_gotas_cg_pedido'] = round($data['peso_gotas_cg'], 2) * ($datosPedido->tirada + $datosPedido->merma);
|
||||||
|
|
||||||
|
$data['precio_tinta'] += round(($data['peso_gotas_cg_pedido'] / 1000.0) * $maquina->precio_tinta_cg, 2);
|
||||||
|
}
|
||||||
|
|
||||||
// precio pagina
|
// precio pagina
|
||||||
$data['precio_pagina_negro'] = round($pag_negro ? $data['precio_tinta'] / ($pag_negro * ($datosPedido->tirada + $datosPedido->merma)) : 0, 6);
|
$data['precio_pagina_negro'] = round($pag_negro ? $data['precio_tinta'] / ($pag_negro * ($datosPedido->tirada + $datosPedido->merma)) : 0, 6);
|
||||||
$data['precio_pagina_color'] = round($pag_color ? $data['precio_tinta'] / ($pag_color * ($datosPedido->tirada + $datosPedido->merma)) : 0, 6);
|
$data['precio_pagina_color'] = round($pag_color ? $data['precio_tinta'] / ($pag_color * ($datosPedido->tirada + $datosPedido->merma)) : 0, 6);
|
||||||
|
|||||||
@ -174,13 +174,9 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?php if ($maquina->is_rotativa == false && $maquina->is_inkjet == false): ?>
|
<div class="row">
|
||||||
<div class="row" id="datosRotativa" style="display:none">
|
|
||||||
<?php else: ?>
|
|
||||||
<div class="row" id="datosRotativa">
|
|
||||||
<?php endif; ?>
|
|
||||||
|
|
||||||
<div class="col-md-2">
|
<div class="col-md-2 datosRotativa datosInkjet" style="display: none;">
|
||||||
<label for="precioTintaNegro" class="form-label">
|
<label for="precioTintaNegro" class="form-label">
|
||||||
<?= lang('Maquinas.precioTintaNegro') ?>
|
<?= lang('Maquinas.precioTintaNegro') ?>
|
||||||
</label>
|
</label>
|
||||||
@ -188,7 +184,7 @@
|
|||||||
maxLength="8" step="0.01" class="form-control"
|
maxLength="8" step="0.01" class="form-control"
|
||||||
value="<?= old('precio_tinta_negro', $maquina->precio_tinta_negro) ?>">
|
value="<?= old('precio_tinta_negro', $maquina->precio_tinta_negro) ?>">
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-2">
|
<div class="col-md-2 datosRotativa datosInkjet" style="display: none;">
|
||||||
<label for="precioTintaColor" class="form-label">
|
<label for="precioTintaColor" class="form-label">
|
||||||
<?= lang('Maquinas.precioTintaColor') ?>
|
<?= lang('Maquinas.precioTintaColor') ?>
|
||||||
</label>
|
</label>
|
||||||
@ -197,7 +193,16 @@
|
|||||||
value="<?= old('precio_tinta_color', $maquina->precio_tinta_color) ?>">
|
value="<?= old('precio_tinta_color', $maquina->precio_tinta_color) ?>">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-md-2" <?= ($maquina->is_rotativa == false)?' style="display:none"':""; ?>>
|
<div class="col-md-2 datosInkjet" style="display: none;">
|
||||||
|
<label for="precioTintaCG" class="form-label">
|
||||||
|
<?= lang('Maquinas.precioTintaCG') ?>
|
||||||
|
</label>
|
||||||
|
<input type="number" id="precioTintaCG" name="precio_tinta_cg" placeholder="0.00"
|
||||||
|
maxLength="8" step="0.01" class="form-control"
|
||||||
|
value="<?= old('precio_tinta_cg', $maquina->precio_tinta_cg) ?>">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-md-2 datosRotativa" style="display: none;">
|
||||||
<label for="velocidadCorte" class="form-label">
|
<label for="velocidadCorte" class="form-label">
|
||||||
<?= lang('Maquinas.velocidadCorte') ?>
|
<?= lang('Maquinas.velocidadCorte') ?>
|
||||||
</label>
|
</label>
|
||||||
@ -205,7 +210,7 @@
|
|||||||
step="0.01" class="form-control"
|
step="0.01" class="form-control"
|
||||||
value="<?= old('velocidad_corte', $maquina->velocidad_corte) ?>">
|
value="<?= old('velocidad_corte', $maquina->velocidad_corte) ?>">
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-2" <?= ($maquina->is_rotativa == false)?' style="display:none"':""; ?>>
|
<div class="col-md-2 datosRotativa" style="display: none;">
|
||||||
<label for="precioHoraCorte" class="form-label">
|
<label for="precioHoraCorte" class="form-label">
|
||||||
<?= lang('Maquinas.precioHoraCorte') ?>
|
<?= lang('Maquinas.precioHoraCorte') ?>
|
||||||
</label>
|
</label>
|
||||||
@ -213,7 +218,7 @@
|
|||||||
maxLength="8" step="0.01" class="form-control"
|
maxLength="8" step="0.01" class="form-control"
|
||||||
value="<?= old('precio_hora_corte', $maquina->precio_hora_corte) ?>">
|
value="<?= old('precio_hora_corte', $maquina->precio_hora_corte) ?>">
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-2" <?= ($maquina->is_rotativa == false)?' style="display:none"':""; ?>>
|
<div class="col-md-2 datosRotativa" style="display: none;">
|
||||||
<label for="metrosxminuto" class="form-label">
|
<label for="metrosxminuto" class="form-label">
|
||||||
<?= lang('Maquinas.metrosxminuto') ?>
|
<?= lang('Maquinas.metrosxminuto') ?>
|
||||||
</label>
|
</label>
|
||||||
|
|||||||
@ -147,6 +147,20 @@
|
|||||||
|
|
||||||
<?= $this->section("additionalInlineJs") ?>
|
<?= $this->section("additionalInlineJs") ?>
|
||||||
|
|
||||||
|
|
||||||
|
<?php if($maquina->is_rotativa) { ?>
|
||||||
|
$(".datosInkjet").css('display', 'none');
|
||||||
|
$(".datosRotativa").css('display', 'inline');
|
||||||
|
<?php } ?>
|
||||||
|
<?php if($maquina->is_inkjet) { ?>
|
||||||
|
$(".datosRotativa").css('display', 'none');
|
||||||
|
$(".datosInkjet").css('display', 'inline');
|
||||||
|
<?php } ?>
|
||||||
|
<?php if(!$maquina->is_inkjet && !$maquina->is_rotativa){ ?>
|
||||||
|
$(".datosRotativa").css('display', 'none');
|
||||||
|
$(".datosInkjet").css('display', 'none');
|
||||||
|
<?php } ?>
|
||||||
|
|
||||||
const lastColNr2 = $('#tableOfPapelesImpresion').find("tr:first th").length - 1;
|
const lastColNr2 = $('#tableOfPapelesImpresion').find("tr:first th").length - 1;
|
||||||
const actionBtns2 = function(data) {
|
const actionBtns2 = function(data) {
|
||||||
return `
|
return `
|
||||||
@ -173,13 +187,6 @@
|
|||||||
isRotativa = watch(0);
|
isRotativa = watch(0);
|
||||||
|
|
||||||
|
|
||||||
$(document).ready(function () {
|
|
||||||
if($(this).is(':checked')){
|
|
||||||
|
|
||||||
$("#datosRotativa").show();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
$('#isRotativa').on("click",function(el){
|
$('#isRotativa').on("click",function(el){
|
||||||
asyncConfirmDialog('<?= lang('MaquinasPapelImpresion.sureToChangeRotativaTitle') ?>',
|
asyncConfirmDialog('<?= lang('MaquinasPapelImpresion.sureToChangeRotativaTitle') ?>',
|
||||||
'<?= lang('MaquinasPapelImpresion.sureToChangeRotativaText') ?>', yesCallback, noCallback);
|
'<?= lang('MaquinasPapelImpresion.sureToChangeRotativaText') ?>', yesCallback, noCallback);
|
||||||
@ -187,20 +194,19 @@
|
|||||||
|
|
||||||
function yesCallback() {
|
function yesCallback() {
|
||||||
if($('#isRotativa').is(':checked')){
|
if($('#isRotativa').is(':checked')){
|
||||||
isRotativa.watch = 1;
|
$(".datosInkjet").css('display', 'none');
|
||||||
$("#datosRotativa").show();
|
$('#isTinta').prop("checked", 0);
|
||||||
|
$(".datosRotativa").css('display', 'inline');
|
||||||
}else{
|
}else{
|
||||||
document.getElementById("precioTintaNegro").value = 0;
|
document.getElementById("precioTintaNegro").value = 0;
|
||||||
document.getElementById("precioTintaColor").value = 0;
|
document.getElementById("precioTintaColor").value = 0;
|
||||||
document.getElementById("velocidadCorte").value = 0;
|
document.getElementById("velocidadCorte").value = 0;
|
||||||
document.getElementById("precioHoraCorte").value = 0;
|
document.getElementById("precioHoraCorte").value = 0;
|
||||||
document.getElementById("metrosxminuto").value = 0;
|
document.getElementById("metrosxminuto").value = 0;
|
||||||
$("#datosRotativa").hide();
|
$(".datosRotativa").css('display', 'none');
|
||||||
isRotativa.watch = 0;
|
|
||||||
}
|
}
|
||||||
theTable2.clearPipeline();
|
|
||||||
theTable2.draw();
|
updatePapeles()
|
||||||
//yeniden(response.<?= csrf_token() ?>); esto da error JJO?
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function noCallback() {
|
function noCallback() {
|
||||||
@ -208,16 +214,38 @@
|
|||||||
$('#isRotativa').prop("checked", !$('#isRotativa').prop("checked"));
|
$('#isRotativa').prop("checked", !$('#isRotativa').prop("checked"));
|
||||||
}
|
}
|
||||||
|
|
||||||
$('#isRotativa').on('change', function(){
|
|
||||||
updatePapeles()
|
$('#isTinta').on('click', function(){
|
||||||
|
asyncConfirmDialog('<?= lang('MaquinasPapelImpresion.sureToChangeRotativaTitle') ?>',
|
||||||
|
'<?= lang('MaquinasPapelImpresion.sureToChangeRotativaText') ?>', yesCallbackInkjet, noCallbackInkjet);
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
$('#isTinta').on('change', function(){
|
function yesCallbackInkjet() {
|
||||||
|
if($('#isTinta').is(':checked')){
|
||||||
|
$(".datosRotativa").css('display', 'none');
|
||||||
|
$(".datosInkjet").css('display', 'inline');
|
||||||
|
$('#isRotativa').prop("checked", 0);
|
||||||
|
}else{
|
||||||
|
document.getElementById("precioTintaNegro").value = 0;
|
||||||
|
document.getElementById("precioTintaColor").value = 0;
|
||||||
|
document.getElementById("velocidadCorte").value = 0;
|
||||||
|
document.getElementById("precioHoraCorte").value = 0;
|
||||||
|
document.getElementById("metrosxminuto").value = 0;
|
||||||
|
$(".datosInkjet").css('display', 'inline');
|
||||||
|
}
|
||||||
updatePapeles()
|
updatePapeles()
|
||||||
})
|
}
|
||||||
|
|
||||||
|
function noCallbackInkjet() {
|
||||||
|
// Toggle behaviour
|
||||||
|
$('#isTinta').prop("checked", !$('#isTinta').prop("checked"));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function updatePapeles(){
|
function updatePapeles(){
|
||||||
yeniden(json.<?= csrf_token() ?>);
|
//yeniden(json.<?= csrf_token() ?>);
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: '<?= route_to('updateMaquinaPapelOnTarifasChange') ?>',
|
url: '<?= route_to('updateMaquinaPapelOnTarifasChange') ?>',
|
||||||
|
|||||||
@ -79,6 +79,7 @@
|
|||||||
<th><?= lang('ImpresionTipologias.cyan') ?></th>
|
<th><?= lang('ImpresionTipologias.cyan') ?></th>
|
||||||
<th><?= lang('ImpresionTipologias.magenta') ?></th>
|
<th><?= lang('ImpresionTipologias.magenta') ?></th>
|
||||||
<th><?= lang('ImpresionTipologias.amarillo') ?></th>
|
<th><?= lang('ImpresionTipologias.amarillo') ?></th>
|
||||||
|
<th><?= lang('ImpresionTipologias.cg') ?></th>
|
||||||
<th><?= lang('ImpresionTipologias.gotaNegro') ?></th>
|
<th><?= lang('ImpresionTipologias.gotaNegro') ?></th>
|
||||||
<th><?= lang('ImpresionTipologias.gotaColor') ?></th>
|
<th><?= lang('ImpresionTipologias.gotaColor') ?></th>
|
||||||
<th class="text-nowrap"><?= lang('Basic.global.Action') ?></th>
|
<th class="text-nowrap"><?= lang('Basic.global.Action') ?></th>
|
||||||
@ -449,6 +450,12 @@
|
|||||||
type: "number"
|
type: "number"
|
||||||
}
|
}
|
||||||
},{
|
},{
|
||||||
|
name: "cg",
|
||||||
|
attr: {
|
||||||
|
type: "number"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
name: "gota_negro",
|
name: "gota_negro",
|
||||||
attr: {
|
attr: {
|
||||||
type: "number"
|
type: "number"
|
||||||
@ -466,7 +473,6 @@
|
|||||||
} );
|
} );
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Definición de la tabla
|
// Definición de la tabla
|
||||||
theTable = $('#tableOfPapelimpresiontipologias').DataTable({
|
theTable = $('#tableOfPapelimpresiontipologias').DataTable({
|
||||||
processing: true,
|
processing: true,
|
||||||
@ -507,11 +513,18 @@
|
|||||||
{ 'data': 'cyan' },
|
{ 'data': 'cyan' },
|
||||||
{ 'data': 'magenta' },
|
{ 'data': 'magenta' },
|
||||||
{ 'data': 'amarillo' },
|
{ 'data': 'amarillo' },
|
||||||
|
{ 'data': 'cg' },
|
||||||
{ 'data': 'gota_negro' },
|
{ 'data': 'gota_negro' },
|
||||||
{ 'data': 'gota_color' },
|
{ 'data': 'gota_color' },
|
||||||
{ data: actionBtns,
|
{ data: actionBtns,
|
||||||
className: 'row-edit dt-center'}
|
className: 'row-edit dt-center'}
|
||||||
],
|
],
|
||||||
|
columnDefs: [
|
||||||
|
{
|
||||||
|
visible: false,
|
||||||
|
targets: [5]
|
||||||
|
}
|
||||||
|
],
|
||||||
buttons: [ {
|
buttons: [ {
|
||||||
className: 'btn btn-primary float-end me-sm-3 me-1',
|
className: 'btn btn-primary float-end me-sm-3 me-1',
|
||||||
extend: "createInline",
|
extend: "createInline",
|
||||||
@ -520,7 +533,12 @@
|
|||||||
submitTrigger: -1,
|
submitTrigger: -1,
|
||||||
submitHtml: '<a href="javascript:void(0);"><i class="ti ti-device-floppy"></i></a>'
|
submitHtml: '<a href="javascript:void(0);"><i class="ti ti-device-floppy"></i></a>'
|
||||||
}
|
}
|
||||||
} ]
|
} ],
|
||||||
|
initComplete: function () {
|
||||||
|
<?php if($papelImpresion->inkjet) { ?>
|
||||||
|
theTable.column(5).visible(true)
|
||||||
|
<?php } ?>
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -161,10 +161,10 @@ function format(d) {
|
|||||||
'<?= lang('Presupuestos.numPagColor') ?>' +
|
'<?= lang('Presupuestos.numPagColor') ?>' +
|
||||||
'<input type="text" id="' + d.row_id +'_numPagColor" name="' + d.row_id +'_numPagColor" class="lp-cell lp-input' + (d.row_id.includes('color')?'" ':' lp-cell-disabled" readonly ') + ' value="' + d.numPagColor +'">' +
|
'<input type="text" id="' + d.row_id +'_numPagColor" name="' + d.row_id +'_numPagColor" class="lp-cell lp-input' + (d.row_id.includes('color')?'" ':' lp-cell-disabled" readonly ') + ' value="' + d.numPagColor +'">' +
|
||||||
'</div>' +
|
'</div>' +
|
||||||
'<div class="col-md-12 col-lg-1">' +
|
((d.row_id.includes('rot'))?'<div class="col-md-12 col-lg-1">' +
|
||||||
'<?= lang('Presupuestos.saturacion') ?>' +
|
'<?= lang('Presupuestos.saturacion') ?>' +
|
||||||
'<input readonly type="text" id="' + d.row_id +'_saturacion" name="' + d.row_id +'_saturacion" class="lp-cell lp-input lp-cell-disabled" readonly value="100">' +
|
'<input readonly type="text" id="' + d.row_id +'_saturacion" name="' + d.row_id +'_saturacion" class="lp-cell lp-input lp-cell-disabled" readonly value="100">' +
|
||||||
'</div>' +
|
'</div>':'') +
|
||||||
'<div class="col-md-12 col-lg-1">' +
|
'<div class="col-md-12 col-lg-1">' +
|
||||||
'<?= lang('Presupuestos.cobNegro') ?>' +
|
'<?= lang('Presupuestos.cobNegro') ?>' +
|
||||||
'<input type="text" id="' + d.row_id +'_cobNegro" name="' + d.row_id +'_cobNegro" class="lp-cell lp-input ' + d.row_class +'-input ' + d.row_class +'-tipologia" value="' + d.cobNegro +'">' +
|
'<input type="text" id="' + d.row_id +'_cobNegro" name="' + d.row_id +'_cobNegro" class="lp-cell lp-input ' + d.row_class +'-input ' + d.row_class +'-tipologia" value="' + d.cobNegro +'">' +
|
||||||
@ -181,6 +181,11 @@ function format(d) {
|
|||||||
'<?= lang('Presupuestos.cobAmarillo') ?>' +
|
'<?= lang('Presupuestos.cobAmarillo') ?>' +
|
||||||
'<input type="text" id="' + d.row_id +'_cobAmarillo" name="' + d.row_id +'_cobAmarillo" class="lp-cell lp-input ' + d.row_class +'-input ' + d.row_class +'-tipologia" value="' + d.cobAmarillo +'">' +
|
'<input type="text" id="' + d.row_id +'_cobAmarillo" name="' + d.row_id +'_cobAmarillo" class="lp-cell lp-input ' + d.row_class +'-input ' + d.row_class +'-tipologia" value="' + d.cobAmarillo +'">' +
|
||||||
'</div>' +
|
'</div>' +
|
||||||
|
((!d.row_id.includes('rot'))?
|
||||||
|
'<div class="col-md-12 col-lg-1">' +
|
||||||
|
'<?= lang('Presupuestos.cobCG') ?>' +
|
||||||
|
'<input type="text" id="' + d.row_id +'_cobCG" name="' + d.row_id +'_cobCG" class="lp-cell lp-input ' + d.row_class +'-input ' + d.row_class +'-tipologia" value="' + d.cobCG +'">' +
|
||||||
|
'</div>':'') +
|
||||||
'<div class="col-md-12 col-lg-1">' +
|
'<div class="col-md-12 col-lg-1">' +
|
||||||
'<?= lang('Presupuestos.gotaNegro') ?>' +
|
'<?= lang('Presupuestos.gotaNegro') ?>' +
|
||||||
'<input type="text" id="' + d.row_id +'_gotaNegro" name="' + d.row_id +'_gotaNegro" class="lp-cell lp-input ' + d.row_class +'-input ' + d.row_class +'-tipologia" value="' + d.gotaNegro +'">' +
|
'<input type="text" id="' + d.row_id +'_gotaNegro" name="' + d.row_id +'_gotaNegro" class="lp-cell lp-input ' + d.row_class +'-input ' + d.row_class +'-tipologia" value="' + d.gotaNegro +'">' +
|
||||||
@ -205,18 +210,28 @@ function format(d) {
|
|||||||
'<td></td>'+
|
'<td></td>'+
|
||||||
'<td colspan="10">'+
|
'<td colspan="10">'+
|
||||||
'<div class="row flex-grow-1 d-flex align-items-end">' +
|
'<div class="row flex-grow-1 d-flex align-items-end">' +
|
||||||
|
((!d.row_id.includes('rot'))?
|
||||||
|
'<div class="col-md-12 col-lg-1">' +
|
||||||
|
'<?= lang('Presupuestos.factorAltura') ?>' +
|
||||||
|
'<input readonly type="text" id="' + d.row_id +'_factorAltura" name="' + d.row_id +'_factorAltura" class="lp-cell lp-cell-disabled lp-input ' + d.row_class +'-input" readonly value="' + d.factorAltura +'">' +
|
||||||
|
'</div>' +
|
||||||
|
'<div class="col-md-12 col-lg-1">' +
|
||||||
|
'<?= lang('Presupuestos.factorAnchura') ?>' +
|
||||||
|
'<input readonly type="text" id="' + d.row_id +'_factorAnchura" name="' + d.row_id +'_factorAnchura" class="lp-cell lp-cell-disabled lp-input ' + d.row_class +'-input" readonly value="' + d.factorAnchura +'">' +
|
||||||
|
'</div>':'') +
|
||||||
(d.row_id.includes('rot')?'<div class="col-md-12 col-lg-1">': '<div class="col-md-12 col-lg-1" style="display:none;">') +
|
(d.row_id.includes('rot')?'<div class="col-md-12 col-lg-1">': '<div class="col-md-12 col-lg-1" style="display:none;">') +
|
||||||
'<?= lang('Presupuestos.metrosMinuto') ?>' +
|
'<?= lang('Presupuestos.metrosMinuto') ?>' +
|
||||||
'<input readonly type="text" id="' + d.row_id +'_metrosMinuto" name="' + d.row_id +'_metrosMinuto" class="lp-cell lp-cell-disabled lp-input ' + d.row_class +'-input" readonly value="' + d.metrosMinuto +'">' +
|
'<input readonly type="text" id="' + d.row_id +'_metrosMinuto" name="' + d.row_id +'_metrosMinuto" class="lp-cell lp-cell-disabled lp-input ' + d.row_class +'-input" readonly value="' + d.metrosMinuto +'">' +
|
||||||
'</div>' +
|
'</div>' +
|
||||||
'<div class="col-md-12 col-lg-1">' +
|
|
||||||
|
(d.row_id.includes('rot')?'<div class="col-md-12 col-lg-1">' +
|
||||||
'<?= lang('Presupuestos.resolucion') ?>' +
|
'<?= lang('Presupuestos.resolucion') ?>' +
|
||||||
'<input readonly type="text" id="' + d.row_id +'_resolucion" name="' + d.row_id +'_resolucion" class="lp-cell lp-cell-disabled lp-input ' + d.row_class +'-input" readonly value="' + d.resolucion +'">' +
|
'<input readonly type="text" id="' + d.row_id +'_resolucion" name="' + d.row_id +'_resolucion" class="lp-cell lp-cell-disabled lp-input ' + d.row_class +'-input" readonly value="' + d.resolucion +'">' +
|
||||||
'</div>' +
|
'</div>':'') +
|
||||||
'<div class="col-md-12 col-lg-1">' +
|
(d.row_id.includes('rot')?'<div class="col-md-12 col-lg-1">' +
|
||||||
'<?= lang('Presupuestos.areaPaginas') ?>' +
|
'<?= lang('Presupuestos.areaPaginas') ?>' +
|
||||||
'<input readonly type="text" id="' + d.row_id +'_areaPaginas" name="' + d.row_id +'_areaPaginas" class="lp-cell lp-cell-disabled lp-input ' + d.row_class +'-input" readonly value="' + d.areaPaginas +'">' +
|
'<input readonly type="text" id="' + d.row_id +'_areaPaginas" name="' + d.row_id +'_areaPaginas" class="lp-cell lp-cell-disabled lp-input ' + d.row_class +'-input" readonly value="' + d.areaPaginas +'">' +
|
||||||
'</div>' +
|
'</div>':'') +
|
||||||
'<div class="col-md-12 col-lg-1">' +
|
'<div class="col-md-12 col-lg-1">' +
|
||||||
'<?= lang('Presupuestos.gotasNegro') ?>' +
|
'<?= lang('Presupuestos.gotasNegro') ?>' +
|
||||||
'<input readonly type="text" id="' + d.row_id +'_gotasNegro" name="' + d.row_id +'_gotasNegro" class="lp-cell lp-cell-disabled lp-input ' + d.row_class +'-input" readonly value="' + d.gotasNegro +'">' +
|
'<input readonly type="text" id="' + d.row_id +'_gotasNegro" name="' + d.row_id +'_gotasNegro" class="lp-cell lp-cell-disabled lp-input ' + d.row_class +'-input" readonly value="' + d.gotasNegro +'">' +
|
||||||
@ -233,6 +248,10 @@ function format(d) {
|
|||||||
'<?= lang('Presupuestos.gotasAmarillo') ?>' +
|
'<?= lang('Presupuestos.gotasAmarillo') ?>' +
|
||||||
'<input readonly type="text" id="' + d.row_id +'_gotasAmarillo" name="' + d.row_id +'_gotasAmarillo" class="lp-cell lp-cell-disabled lp-input ' + d.row_class +'-input" readonly value="' + d.gotasAmarillo +'">' +
|
'<input readonly type="text" id="' + d.row_id +'_gotasAmarillo" name="' + d.row_id +'_gotasAmarillo" class="lp-cell lp-cell-disabled lp-input ' + d.row_class +'-input" readonly value="' + d.gotasAmarillo +'">' +
|
||||||
'</div>' +
|
'</div>' +
|
||||||
|
(!(d.row_id.includes('rot'))?'<div class="col-md-12 col-lg-1">' +
|
||||||
|
'<?= lang('Presupuestos.gotasCG') ?>' +
|
||||||
|
'<input readonly type="text" id="' + d.row_id +'_gotasCG" name="' + d.row_id +'_gotasCG" class="lp-cell lp-cell-disabled lp-input ' + d.row_class +'-input" readonly value="' + d.gotasCG +'">' +
|
||||||
|
'</div>':'') +
|
||||||
'<div class="col-md-12 col-lg-1">' +
|
'<div class="col-md-12 col-lg-1">' +
|
||||||
'<?= lang('Presupuestos.precioPagNegro') ?>' +
|
'<?= lang('Presupuestos.precioPagNegro') ?>' +
|
||||||
'<input readonly type="text" id="' + d.row_id +'_precioPagNegro" name="' + d.row_id +'_precioPagNegro" class="lp-cell lp-cell-disabled lp-input ' + d.row_class +'-input" readonly value="' + d.precioPagNegro +'">' +
|
'<input readonly type="text" id="' + d.row_id +'_precioPagNegro" name="' + d.row_id +'_precioPagNegro" class="lp-cell lp-cell-disabled lp-input ' + d.row_class +'-input" readonly value="' + d.precioPagNegro +'">' +
|
||||||
@ -241,6 +260,7 @@ function format(d) {
|
|||||||
'<?= lang('Presupuestos.precioPagColor') ?>' +
|
'<?= lang('Presupuestos.precioPagColor') ?>' +
|
||||||
'<input readonly type="text" id="' + d.row_id +'_precioPagColor" name="' + d.row_id +'_precioPagColor" class="lp-cell lp-cell-disabled lp-input ' + d.row_class +'-input" readonly value="' + d.precioPagColor +'">' +
|
'<input readonly type="text" id="' + d.row_id +'_precioPagColor" name="' + d.row_id +'_precioPagColor" class="lp-cell lp-cell-disabled lp-input ' + d.row_class +'-input" readonly value="' + d.precioPagColor +'">' +
|
||||||
'</div>' +
|
'</div>' +
|
||||||
|
(d.row_id.includes('rot')?
|
||||||
'<div class="col-md-12 col-lg-1">' +
|
'<div class="col-md-12 col-lg-1">' +
|
||||||
'<?= lang('Presupuestos.factorAltura') ?>' +
|
'<?= lang('Presupuestos.factorAltura') ?>' +
|
||||||
'<input readonly type="text" id="' + d.row_id +'_factorAltura" name="' + d.row_id +'_factorAltura" class="lp-cell lp-cell-disabled lp-input ' + d.row_class +'-input" readonly value="' + d.factorAltura +'">' +
|
'<input readonly type="text" id="' + d.row_id +'_factorAltura" name="' + d.row_id +'_factorAltura" class="lp-cell lp-cell-disabled lp-input ' + d.row_class +'-input" readonly value="' + d.factorAltura +'">' +
|
||||||
@ -248,11 +268,11 @@ function format(d) {
|
|||||||
'<div class="col-md-12 col-lg-1">' +
|
'<div class="col-md-12 col-lg-1">' +
|
||||||
'<?= lang('Presupuestos.factorAnchura') ?>' +
|
'<?= lang('Presupuestos.factorAnchura') ?>' +
|
||||||
'<input readonly type="text" id="' + d.row_id +'_factorAnchura" name="' + d.row_id +'_factorAnchura" class="lp-cell lp-cell-disabled lp-input ' + d.row_class +'-input" readonly value="' + d.factorAnchura +'">' +
|
'<input readonly type="text" id="' + d.row_id +'_factorAnchura" name="' + d.row_id +'_factorAnchura" class="lp-cell lp-cell-disabled lp-input ' + d.row_class +'-input" readonly value="' + d.factorAnchura +'">' +
|
||||||
'</div>' +
|
'</div>':'') +
|
||||||
'<div class="col-md-12 col-lg-1">' +
|
(d.row_id.includes('rot')?'<div class="col-md-12 col-lg-1">' +
|
||||||
'<?= lang('Presupuestos.paginasPliego') ?>' +
|
'<?= lang('Presupuestos.paginasPliego') ?>' +
|
||||||
'<input readonly type="text" id="' + d.row_id +'_paginasPliego" name="' + d.row_id +'_paginasPliego" class="lp-cell lp-cell-disabled lp-input ' + d.row_class +'-input" readonly value="' + d.paginasPliego +'">' +
|
'<input readonly type="text" id="' + d.row_id +'_paginasPliego" name="' + d.row_id +'_paginasPliego" class="lp-cell lp-cell-disabled lp-input ' + d.row_class +'-input" readonly value="' + d.paginasPliego +'">' +
|
||||||
'</div>' +
|
'</div>':'') +
|
||||||
'</div>' +
|
'</div>' +
|
||||||
'</td>' +
|
'</td>' +
|
||||||
'</tr>' +
|
'</tr>' +
|
||||||
@ -269,10 +289,18 @@ function format(d) {
|
|||||||
'<?= lang('Presupuestos.metrosPapelTotal') ?>' +
|
'<?= lang('Presupuestos.metrosPapelTotal') ?>' +
|
||||||
'<input readonly type="text" id="' + d.row_id +'_metrosPapelTotal" name="' + d.row_id +'_metrosPapelTotal" class="lp-cell lp-cell-disabled lp-input ' + d.row_class +'-input" readonly value="' + d.metrosPapelTotal +'">' +
|
'<input readonly type="text" id="' + d.row_id +'_metrosPapelTotal" name="' + d.row_id +'_metrosPapelTotal" class="lp-cell lp-cell-disabled lp-input ' + d.row_class +'-input" readonly value="' + d.metrosPapelTotal +'">' +
|
||||||
'</div>' +
|
'</div>' +
|
||||||
'<div class="col-md-12 col-lg-1">' +
|
(d.row_id.includes('rot')?'<div class="col-md-12 col-lg-1">' +
|
||||||
'<?= lang('Presupuestos.clicksLibro') ?>' +
|
'<?= lang('Presupuestos.clicksLibro') ?>' +
|
||||||
'<input readonly type="text" id="' + d.row_id +'_clicksLibro" name="' + d.row_id +'_clicksLibro" class="lp-cell lp-cell-disabled lp-input ' + d.row_class +'-input" readonly value="' + d.clicksLibro +'">' +
|
'<input readonly type="text" id="' + d.row_id +'_clicksLibro" name="' + d.row_id +'_clicksLibro" class="lp-cell lp-cell-disabled lp-input ' + d.row_class +'-input" readonly value="' + d.clicksLibro +'">' +
|
||||||
'</div>' +
|
'</div>':'') +
|
||||||
|
((!d.row_id.includes('rot'))?'<div class="col-md-12 col-lg-1">' +
|
||||||
|
'<?= lang('Presupuestos.saturacion') ?>' +
|
||||||
|
'<input readonly type="text" id="' + d.row_id +'_saturacion" name="' + d.row_id +'_saturacion" class="lp-cell lp-input lp-cell-disabled" readonly value="100">' +
|
||||||
|
'</div>':'') +
|
||||||
|
((!d.row_id.includes('rot'))?'<div class="col-md-12 col-lg-1">' +
|
||||||
|
'<?= lang('Presupuestos.paginasPliego') ?>' +
|
||||||
|
'<input readonly type="text" id="' + d.row_id +'_paginasPliego" name="' + d.row_id +'_paginasPliego" class="lp-cell lp-cell-disabled lp-input ' + d.row_class +'-input" readonly value="' + d.paginasPliego +'">' +
|
||||||
|
'</div>':'') +
|
||||||
'<div class="col-md-12 col-lg-1">' +
|
'<div class="col-md-12 col-lg-1">' +
|
||||||
'<?= lang('Presupuestos.gTintaNegro') ?>' +
|
'<?= lang('Presupuestos.gTintaNegro') ?>' +
|
||||||
'<input readonly type="text" id="' + d.row_id +'_gTintaNegro" name="' + d.row_id +'_gTintaNegro" class="lp-cell lp-cell-disabled lp-input ' + d.row_class +'-input" readonly value="' + d.gTintaNegro +'">' +
|
'<input readonly type="text" id="' + d.row_id +'_gTintaNegro" name="' + d.row_id +'_gTintaNegro" class="lp-cell lp-cell-disabled lp-input ' + d.row_class +'-input" readonly value="' + d.gTintaNegro +'">' +
|
||||||
@ -289,6 +317,14 @@ function format(d) {
|
|||||||
'<?= lang('Presupuestos.gTintaAmarillo') ?>' +
|
'<?= lang('Presupuestos.gTintaAmarillo') ?>' +
|
||||||
'<input readonly type="text" id="' + d.row_id +'_gTintaAmarillo" name="' + d.row_id +'_gTintaAmarillo" class="lp-cell lp-cell-disabled lp-input ' + d.row_class +'-input" readonly value="' + d.gTintaAmarillo +'">' +
|
'<input readonly type="text" id="' + d.row_id +'_gTintaAmarillo" name="' + d.row_id +'_gTintaAmarillo" class="lp-cell lp-cell-disabled lp-input ' + d.row_class +'-input" readonly value="' + d.gTintaAmarillo +'">' +
|
||||||
'</div>' +
|
'</div>' +
|
||||||
|
(!(d.row_id.includes('rot'))?'<div class="col-md-12 col-lg-1">' +
|
||||||
|
'<?= lang('Presupuestos.gTintaCG') ?>' +
|
||||||
|
'<input readonly type="text" id="' + d.row_id +'_gTintaCG" name="' + d.row_id +'_gTintaCG" class="lp-cell lp-cell-disabled lp-input ' + d.row_class +'-input" readonly value="' + d.gTintaCG +'">' +
|
||||||
|
'</div>':'') +
|
||||||
|
((!d.row_id.includes('rot'))?'<div class="col-md-12 col-lg-1">' +
|
||||||
|
'<?= lang('Presupuestos.clicksLibro') ?>' +
|
||||||
|
'<input readonly type="text" id="' + d.row_id +'_clicksLibro" name="' + d.row_id +'_clicksLibro" class="lp-cell lp-cell-disabled lp-input ' + d.row_class +'-input" readonly value="' + d.clicksLibro +'">' +
|
||||||
|
'</div>':'') +
|
||||||
'<div class="col-md-12 col-lg-1">' +
|
'<div class="col-md-12 col-lg-1">' +
|
||||||
'<?= lang('Presupuestos.clicksPedido') ?>' +
|
'<?= lang('Presupuestos.clicksPedido') ?>' +
|
||||||
'<input readonly type="text" id="' + d.row_id +'_clicksPedido" name="' + d.row_id +'_clicksPedido" class="lp-cell lp-cell-disabled lp-input ' + d.row_class +'-input" readonly value="' + d.clicksPedido +'">' +
|
'<input readonly type="text" id="' + d.row_id +'_clicksPedido" name="' + d.row_id +'_clicksPedido" class="lp-cell lp-cell-disabled lp-input ' + d.row_class +'-input" readonly value="' + d.clicksPedido +'">' +
|
||||||
@ -317,6 +353,14 @@ function format(d) {
|
|||||||
'<td></td>'+
|
'<td></td>'+
|
||||||
'<td colspan="10">'+
|
'<td colspan="10">'+
|
||||||
'<div class="row flex-grow-1 d-flex align-items-end" >' +
|
'<div class="row flex-grow-1 d-flex align-items-end" >' +
|
||||||
|
((!d.row_id.includes('rot'))?'<div class="col-md-12 col-lg-1">' +
|
||||||
|
'<?= lang('Presupuestos.resolucion') ?>' +
|
||||||
|
'<input readonly type="text" id="' + d.row_id +'_resolucion" name="' + d.row_id +'_resolucion" class="lp-cell lp-cell-disabled lp-input ' + d.row_class +'-input" readonly value="' + d.resolucion +'">' +
|
||||||
|
'</div>':'') +
|
||||||
|
((!d.row_id.includes('rot'))?'<div class="col-md-12 col-lg-1">' +
|
||||||
|
'<?= lang('Presupuestos.areaPaginas') ?>' +
|
||||||
|
'<input readonly type="text" id="' + d.row_id +'_areaPaginas" name="' + d.row_id +'_areaPaginas" class="lp-cell lp-cell-disabled lp-input ' + d.row_class +'-input" readonly value="' + d.areaPaginas +'">' +
|
||||||
|
'</div>':'') +
|
||||||
(d.row_id.includes('rot')?'<div class="col-md-12 col-lg-1">': '<div class="col-md-12 col-lg-1" style="display:none;">') +
|
(d.row_id.includes('rot')?'<div class="col-md-12 col-lg-1">': '<div class="col-md-12 col-lg-1" style="display:none;">') +
|
||||||
'<?= lang('Presupuestos.velocidadCorte') ?>' +
|
'<?= lang('Presupuestos.velocidadCorte') ?>' +
|
||||||
'<input readonly type="text" id="' + d.row_id +'_velocidadCorte" name="' + d.row_id +'_velocidadCorte" class="lp-cell lp-input lp-cell-disabled" readonly value="' + d.velocidadCorte +'">' +
|
'<input readonly type="text" id="' + d.row_id +'_velocidadCorte" name="' + d.row_id +'_velocidadCorte" class="lp-cell lp-input lp-cell-disabled" readonly value="' + d.velocidadCorte +'">' +
|
||||||
@ -345,6 +389,10 @@ function format(d) {
|
|||||||
'<?= lang('Presupuestos.gTintaAmarilloPed') ?>' +
|
'<?= lang('Presupuestos.gTintaAmarilloPed') ?>' +
|
||||||
'<input readonly type="text" id="' + d.row_id +'_gTintaAmarilloPed" name="' + d.row_id +'_gTintaAmarilloPed" class="lp-cell lp-cell-disabled lp-input ' + d.row_class +'-input" readonly value="' + d.gTintaAmarilloPed +'">'+
|
'<input readonly type="text" id="' + d.row_id +'_gTintaAmarilloPed" name="' + d.row_id +'_gTintaAmarilloPed" class="lp-cell lp-cell-disabled lp-input ' + d.row_class +'-input" readonly value="' + d.gTintaAmarilloPed +'">'+
|
||||||
'</div>' +
|
'</div>' +
|
||||||
|
(!(d.row_id.includes('rot'))?'<div class="col-md-12 col-lg-1">' +
|
||||||
|
'<?= lang('Presupuestos.gTintaCGPed') ?>' +
|
||||||
|
'<input readonly type="text" id="' + d.row_id +'_gTintaCGPed" name="' + d.row_id +'_gTintaCGPed" class="lp-cell lp-cell-disabled lp-input ' + d.row_class +'-input" readonly value="' + d.gTintaCGPed +'">'+
|
||||||
|
'</div>':'') +
|
||||||
'</div>' +
|
'</div>' +
|
||||||
'</td>' +
|
'</td>' +
|
||||||
'</tr>'
|
'</tr>'
|
||||||
@ -743,6 +791,13 @@ function processRowData(row, rowId, rowClass){
|
|||||||
data.gTintaMagentaPed = isNaN(parseFloat(row.peso_gotas_magenta_pedido)) ? "" : parseFloat(row.peso_gotas_magenta_pedido).toFixed(2)
|
data.gTintaMagentaPed = isNaN(parseFloat(row.peso_gotas_magenta_pedido)) ? "" : parseFloat(row.peso_gotas_magenta_pedido).toFixed(2)
|
||||||
data.gTintaAmarilloPed = isNaN(parseFloat(row.peso_gotas_amarillo_pedido)) ? "" : parseFloat(row.peso_gotas_amarillo_pedido).toFixed(2)
|
data.gTintaAmarilloPed = isNaN(parseFloat(row.peso_gotas_amarillo_pedido)) ? "" : parseFloat(row.peso_gotas_amarillo_pedido).toFixed(2)
|
||||||
|
|
||||||
|
if(!rowId.includes('rot')){
|
||||||
|
data.cobCG = isNaN(parseFloat(row.datosTipologias.cg)) ? "" : parseFloat(row.datosTipologias.cg).toFixed(0)
|
||||||
|
data.gotasCG = isNaN(parseFloat(row.num_gotas_cg)) ? "" : parseFloat(row.num_gotas_cg).toFixed(0)
|
||||||
|
data.gTintaCG = isNaN(parseFloat(row.peso_gotas_cg)) ? "" : parseFloat(row.peso_gotas_cg).toFixed(2)
|
||||||
|
data.gTintaCGPed = isNaN(parseFloat(row.peso_gotas_cg_pedido)) ? "" : parseFloat(row.peso_gotas_cg_pedido).toFixed(2)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
data.alto_click = row.alto_click
|
data.alto_click = row.alto_click
|
||||||
}
|
}
|
||||||
@ -3352,6 +3407,7 @@ function fill_lp_from_bbdd(){
|
|||||||
cyan: lp.rotativa_cyan,
|
cyan: lp.rotativa_cyan,
|
||||||
magenta: lp.rotativa_magenta,
|
magenta: lp.rotativa_magenta,
|
||||||
amarillo: lp.rotativa_amarillo,
|
amarillo: lp.rotativa_amarillo,
|
||||||
|
cg: lp.rotativa_cg,
|
||||||
gota_negro: lp.rotativa_gota_negro,
|
gota_negro: lp.rotativa_gota_negro,
|
||||||
gota_color: lp.rotativa_gota_color,
|
gota_color: lp.rotativa_gota_color,
|
||||||
}
|
}
|
||||||
@ -3368,6 +3424,7 @@ function fill_lp_from_bbdd(){
|
|||||||
lp['num_gotas_cyan'] = lp['rotativa_num_gotas_cyan']
|
lp['num_gotas_cyan'] = lp['rotativa_num_gotas_cyan']
|
||||||
lp['num_gotas_magenta'] = lp['rotativa_num_gotas_magenta']
|
lp['num_gotas_magenta'] = lp['rotativa_num_gotas_magenta']
|
||||||
lp['num_gotas_amarillo'] = lp['rotativa_num_gotas_amarillo']
|
lp['num_gotas_amarillo'] = lp['rotativa_num_gotas_amarillo']
|
||||||
|
lp['num_gotas_cg'] = lp['rotativa_num_gotas_cg']
|
||||||
|
|
||||||
lp['precio_pagina_negro'] = lp['rotativa_precio_pag_negro']
|
lp['precio_pagina_negro'] = lp['rotativa_precio_pag_negro']
|
||||||
lp['precio_pagina_color'] = lp['rotativa_precio_pag_color']
|
lp['precio_pagina_color'] = lp['rotativa_precio_pag_color']
|
||||||
@ -3380,6 +3437,7 @@ function fill_lp_from_bbdd(){
|
|||||||
lp['peso_gotas_cyan'] = lp['rotativa_peso_gotas_cyan']
|
lp['peso_gotas_cyan'] = lp['rotativa_peso_gotas_cyan']
|
||||||
lp['peso_gotas_magenta'] = lp['rotativa_peso_gotas_magenta']
|
lp['peso_gotas_magenta'] = lp['rotativa_peso_gotas_magenta']
|
||||||
lp['peso_gotas_amarillo'] = lp['rotativa_peso_gotas_amarillo']
|
lp['peso_gotas_amarillo'] = lp['rotativa_peso_gotas_amarillo']
|
||||||
|
lp['peso_gotas_cg'] = lp['rotativa_peso_gotas_cg']
|
||||||
lp['clicks_pedido'] = lp['rotativa_clicks_total']
|
lp['clicks_pedido'] = lp['rotativa_clicks_total']
|
||||||
lp['precio_click_pedido'] = lp['precio_click_pedido']
|
lp['precio_click_pedido'] = lp['precio_click_pedido']
|
||||||
lp['precio_tinta'] = lp['rotativa_precio_tinta']
|
lp['precio_tinta'] = lp['rotativa_precio_tinta']
|
||||||
@ -3389,6 +3447,7 @@ function fill_lp_from_bbdd(){
|
|||||||
lp['peso_gotas_cyan_pedido'] = lp['rotativa_peso_gotas_cyan_pedido']
|
lp['peso_gotas_cyan_pedido'] = lp['rotativa_peso_gotas_cyan_pedido']
|
||||||
lp['peso_gotas_magenta_pedido'] = lp['rotativa_peso_gotas_magenta_pedido']
|
lp['peso_gotas_magenta_pedido'] = lp['rotativa_peso_gotas_magenta_pedido']
|
||||||
lp['peso_gotas_amarillo_pedido'] = lp['rotativa_peso_gotas_amarillo_pedido']
|
lp['peso_gotas_amarillo_pedido'] = lp['rotativa_peso_gotas_amarillo_pedido']
|
||||||
|
lp['peso_gotas_cg_pedido'] = lp['rotativa_peso_gotas_cg_pedido']
|
||||||
|
|
||||||
}
|
}
|
||||||
if(lp.tipo.includes('rot')){
|
if(lp.tipo.includes('rot')){
|
||||||
@ -3509,6 +3568,7 @@ async function fill_bbdd_from_lp(presupuesto_id){
|
|||||||
linea_data.rotativa_cyan = rowData.cobCyan
|
linea_data.rotativa_cyan = rowData.cobCyan
|
||||||
linea_data.rotativa_magenta = rowData.cobMagenta
|
linea_data.rotativa_magenta = rowData.cobMagenta
|
||||||
linea_data.rotativa_amarillo = rowData.cobAmarillo
|
linea_data.rotativa_amarillo = rowData.cobAmarillo
|
||||||
|
linea_data.rotativa_cg = rowData.cobCG
|
||||||
linea_data.rotativa_gota_negro = rowData.gotaNegro
|
linea_data.rotativa_gota_negro = rowData.gotaNegro
|
||||||
linea_data.rotativa_gota_color = rowData.gotaColor
|
linea_data.rotativa_gota_color = rowData.gotaColor
|
||||||
|
|
||||||
@ -3520,6 +3580,7 @@ async function fill_bbdd_from_lp(presupuesto_id){
|
|||||||
linea_data.rotativa_num_gotas_cyan = rowData.gotasCyan
|
linea_data.rotativa_num_gotas_cyan = rowData.gotasCyan
|
||||||
linea_data.rotativa_num_gotas_magenta = rowData.gotasMagenta
|
linea_data.rotativa_num_gotas_magenta = rowData.gotasMagenta
|
||||||
linea_data.rotativa_num_gotas_amarillo = rowData.gotasAmarillo
|
linea_data.rotativa_num_gotas_amarillo = rowData.gotasAmarillo
|
||||||
|
linea_data.rotativa_num_gotas_cg = rowData.gotasCG
|
||||||
|
|
||||||
linea_data.rotativa_precio_pag_negro = rowData.precioPagNegro
|
linea_data.rotativa_precio_pag_negro = rowData.precioPagNegro
|
||||||
linea_data.rotativa_precio_pag_color = rowData.precioPagColor
|
linea_data.rotativa_precio_pag_color = rowData.precioPagColor
|
||||||
@ -3532,6 +3593,7 @@ async function fill_bbdd_from_lp(presupuesto_id){
|
|||||||
linea_data.rotativa_peso_gotas_cyan = rowData.gTintaCyan
|
linea_data.rotativa_peso_gotas_cyan = rowData.gTintaCyan
|
||||||
linea_data.rotativa_peso_gotas_magenta = rowData.gTintaMagenta
|
linea_data.rotativa_peso_gotas_magenta = rowData.gTintaMagenta
|
||||||
linea_data.rotativa_peso_gotas_amarillo = rowData.gTintaAmarillo
|
linea_data.rotativa_peso_gotas_amarillo = rowData.gTintaAmarillo
|
||||||
|
linea_data.rotativa_peso_gotas_cg = rowData.gTintaCG
|
||||||
linea_data.rotativa_clicks_total = rowData.clicksPedido
|
linea_data.rotativa_clicks_total = rowData.clicksPedido
|
||||||
linea_data.precio_click_pedido = rowData.totalClicksPedido
|
linea_data.precio_click_pedido = rowData.totalClicksPedido
|
||||||
linea_data.rotativa_precio_tinta = rowData.totalTinta
|
linea_data.rotativa_precio_tinta = rowData.totalTinta
|
||||||
@ -3541,6 +3603,7 @@ async function fill_bbdd_from_lp(presupuesto_id){
|
|||||||
linea_data.rotativa_peso_gotas_cyan_pedido = rowData.gTintaCyanPed
|
linea_data.rotativa_peso_gotas_cyan_pedido = rowData.gTintaCyanPed
|
||||||
linea_data.rotativa_peso_gotas_magenta_pedido = rowData.gTintaMagentaPed
|
linea_data.rotativa_peso_gotas_magenta_pedido = rowData.gTintaMagentaPed
|
||||||
linea_data.rotativa_peso_gotas_amarillo_pedido = rowData.gTintaAmarilloPed
|
linea_data.rotativa_peso_gotas_amarillo_pedido = rowData.gTintaAmarilloPed
|
||||||
|
linea_data.rotativa_peso_gotas_cg_pedido = rowData.gTintaCGPed
|
||||||
|
|
||||||
}
|
}
|
||||||
if(linea_data.tipo.includes('rot')){
|
if(linea_data.tipo.includes('rot')){
|
||||||
|
|||||||
Reference in New Issue
Block a user