diff --git a/ci4/app/Language/en/Presupuestos.php b/ci4/app/Language/en/Presupuestos.php index 8935ec9e..6c0b3f2a 100755 --- a/ci4/app/Language/en/Presupuestos.php +++ b/ci4/app/Language/en/Presupuestos.php @@ -140,7 +140,7 @@ return [ 'gTintaCyan' => 'G. Cyan Ink', 'gTintaMagenta' => 'G. Magenta Ink', 'gTintaAmarillo' => 'G. Yellow Ink', - 'clicksPedido' => 'Clicks Order', + 'clicksPedido' => 'Clicks Order', 'totalClicks' => 'Total Clicks', 'totalTinta' => 'Total Ink', 'totalCorte' => 'Total Cut', diff --git a/ci4/app/Language/es/Presupuestos.php b/ci4/app/Language/es/Presupuestos.php index b6b876fa..ccbff1ef 100755 --- a/ci4/app/Language/es/Presupuestos.php +++ b/ci4/app/Language/es/Presupuestos.php @@ -116,6 +116,7 @@ return [ 'cobCyan' => 'Cob. % Cyan', 'cobMagenta' => 'Cob. % Magenta', 'cobAmarillo' => 'Cob. % Amarillo', + 'cobCG' => 'Cob. % CG', 'gotaNegro' => 'Gota negro', 'gotaColor' => 'Gota color', 'totalLinea' => 'TOTAL LÍNEA', @@ -127,6 +128,7 @@ return [ 'gotasCyan' => 'Nº gotas cyan', 'gotasMagenta' => 'Nº gotas magenta', 'gotasAmarillo' => 'Nº gotas amarillo', + 'gotasCG' => 'Nº gotas CG', 'precioPagNegro' => 'Precio pág. Negro', 'precioPagColor' => 'Precio pág. Color', 'factorAltura' => 'Factor altura', @@ -139,6 +141,7 @@ return [ 'gTintaCyan' => 'G. tinta Cyan', 'gTintaMagenta' => 'G. tinta Magenta', 'gTintaAmarillo' => 'G. tinta Amarillo', + 'gTintaCG' => 'G. tinta CG', 'clicksPedido' => 'Clicks Pedido', 'totalClicks' => 'Total Clicks', 'totalTinta' => 'Total Tinta', @@ -151,6 +154,7 @@ return [ 'gTintaCyanPed' => 'G.T. Cyan Ped.', 'gTintaMagentaPed' => 'G.T. Magenta Ped.', 'gTintaAmarilloPed' => 'G.T. Amarillo Ped.', + 'gTintaCGPed' => 'G.T. CG Ped.', 'addLineaPresupuesto' => 'Añadir linea...', diff --git a/ci4/app/Models/Configuracion/MaquinaModel.php b/ci4/app/Models/Configuracion/MaquinaModel.php index e59f6f9b..4b7a6734 100755 --- a/ci4/app/Models/Configuracion/MaquinaModel.php +++ b/ci4/app/Models/Configuracion/MaquinaModel.php @@ -380,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.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.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.forzar_num_formas_horizontales_cubierta AS forzar_num_formas_horizontales_cubierta, t1.forzar_num_formas_verticales_cubierta AS forzar_num_formas_verticales_cubierta" diff --git a/ci4/app/Services/PresupuestoService.php b/ci4/app/Services/PresupuestoService.php index c8416175..f99972af 100755 --- a/ci4/app/Services/PresupuestoService.php +++ b/ci4/app/Services/PresupuestoService.php @@ -284,12 +284,13 @@ class PresupuestoService extends BaseService round(($data['peso_gotas_cyan_pedido'] / 1000.0) * $maquina->precio_tinta_color, 2) + round(($data['peso_gotas_magenta_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); + $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); diff --git a/ci4/app/Views/themes/backend/vuexy/form/presupuestos/cosidotapablanda/_lineasPresupuestoItems.php b/ci4/app/Views/themes/backend/vuexy/form/presupuestos/cosidotapablanda/_lineasPresupuestoItems.php index 89d64a82..2590a733 100755 --- a/ci4/app/Views/themes/backend/vuexy/form/presupuestos/cosidotapablanda/_lineasPresupuestoItems.php +++ b/ci4/app/Views/themes/backend/vuexy/form/presupuestos/cosidotapablanda/_lineasPresupuestoItems.php @@ -161,10 +161,10 @@ function format(d) { '' + '' + '' + - '
' + + ((d.row_id.includes('rot'))?'
' + '' + '' + - '
' + + '
':'') + '
' + '' + '' + @@ -181,6 +181,11 @@ function format(d) { '' + '' + '
' + + ((!d.row_id.includes('rot'))? + '
' + + '' + + '' + + '
':'') + '
' + '' + '' + @@ -205,18 +210,28 @@ function format(d) { ''+ ''+ '
' + + ((!d.row_id.includes('rot'))? + '
' + + '' + + '' + + '
' + + '
' + + '' + + '' + + '
':'') + (d.row_id.includes('rot')?'
': '' + - '
' + + + (d.row_id.includes('rot')?'
' + '' + '' + - '
' + - '
' + + '
':'') + + (d.row_id.includes('rot')?'
' + '' + '' + - '
' + + '
':'') + '
' + '' + '' + @@ -233,6 +248,10 @@ function format(d) { '' + '' + '
' + + (!(d.row_id.includes('rot'))?'
' + + '' + + '' + + '
':'') + '
' + '' + '' + @@ -241,6 +260,7 @@ function format(d) { '' + '' + '
' + + (d.row_id.includes('rot')? '
' + '' + '' + @@ -248,11 +268,11 @@ function format(d) { '
' + '' + '' + - '
' + - '
' + + '
':'') + + (d.row_id.includes('rot')?'
' + '' + '' + - '
' + + '
':'') + '
' + '' + '' + @@ -269,10 +289,18 @@ function format(d) { '' + '' + '
' + - '
' + + (d.row_id.includes('rot')?'
' + '' + '' + - '
' + + '
':'') + + ((!d.row_id.includes('rot'))?'
' + + '' + + '' + + '
':'') + + ((!d.row_id.includes('rot'))?'
' + + '' + + '' + + '
':'') + '
' + '' + '' + @@ -289,6 +317,14 @@ function format(d) { '' + '' + '
' + + (!(d.row_id.includes('rot'))?'
' + + '' + + '' + + '
':'') + + ((!d.row_id.includes('rot'))?'
' + + '' + + '' + + '
':'') + '
' + '' + '' + @@ -317,6 +353,14 @@ function format(d) { ''+ ''+ '
' + + ((!d.row_id.includes('rot'))?'
' + + '' + + '' + + '
':'') + + ((!d.row_id.includes('rot'))?'
' + + '' + + '' + + '
':'') + (d.row_id.includes('rot')?'
': '' + + (!(d.row_id.includes('rot'))?'
' + + '' + + ''+ + '
':'') + '
' + '' + '' @@ -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.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 } @@ -3352,6 +3407,7 @@ function fill_lp_from_bbdd(){ cyan: lp.rotativa_cyan, magenta: lp.rotativa_magenta, amarillo: lp.rotativa_amarillo, + cg: lp.rotativa_cg, gota_negro: lp.rotativa_gota_negro, 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_magenta'] = lp['rotativa_num_gotas_magenta'] 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_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_magenta'] = lp['rotativa_peso_gotas_magenta'] 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['precio_click_pedido'] = lp['precio_click_pedido'] 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_magenta_pedido'] = lp['rotativa_peso_gotas_magenta_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')){ @@ -3509,6 +3568,7 @@ async function fill_bbdd_from_lp(presupuesto_id){ linea_data.rotativa_cyan = rowData.cobCyan linea_data.rotativa_magenta = rowData.cobMagenta linea_data.rotativa_amarillo = rowData.cobAmarillo + linea_data.rotativa_cg = rowData.cobCG linea_data.rotativa_gota_negro = rowData.gotaNegro 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_magenta = rowData.gotasMagenta 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_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_magenta = rowData.gTintaMagenta 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.precio_click_pedido = rowData.totalClicksPedido 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_magenta_pedido = rowData.gTintaMagentaPed linea_data.rotativa_peso_gotas_amarillo_pedido = rowData.gTintaAmarilloPed + linea_data.rotativa_peso_gotas_cg_pedido = rowData.gTintaCGPed } if(linea_data.tipo.includes('rot')){