diff --git a/ci4/app/Controllers/Presupuestos/Cosidotapablanda.php b/ci4/app/Controllers/Presupuestos/Cosidotapablanda.php
index 2d654e69..ce26e620 100755
--- a/ci4/app/Controllers/Presupuestos/Cosidotapablanda.php
+++ b/ci4/app/Controllers/Presupuestos/Cosidotapablanda.php
@@ -189,6 +189,28 @@ class Cosidotapablanda extends \App\Controllers\GoBaseResourceController
// JJO
$sanitizedData['user_updated_id'] = $session->id_user;
+ if ($this->request->getPost('retractilado') == null) {
+ $sanitizedData['retractilado'] = false;
+ }
+ if ($this->request->getPost('retractilado5') == null) {
+ $sanitizedData['retractilado5'] = false;
+ }
+ if ($this->request->getPost('ferro') == null) {
+ $sanitizedData['ferro'] = false;
+ }
+ if ($this->request->getPost('ferro_digital') == null) {
+ $sanitizedData['ferro_digital'] = false;
+ }
+ if ($this->request->getPost('prototipo') == null) {
+ $sanitizedData['prototipo'] = false;
+ }
+ if ($this->request->getPost('marcapaginas') == null) {
+ $sanitizedData['marcapaginas'] = false;
+ }
+ if ($this->request->getPost('faja_color') == null) {
+ $sanitizedData['faja_color'] = false;
+ }
+
$noException = true;
if ($successfulResult = $this->canValidate()) : // if ($successfulResult = $this->validate($this->formValidationRules) ) :
@@ -295,6 +317,14 @@ class Cosidotapablanda extends \App\Controllers\GoBaseResourceController
$this->viewData['POD'] = $this->getPOD();
+ $this->viewData['serviciosCheckboxes'] = [
+ 'retractilado' => 3,
+ 'retractilado5' => 5,
+ 'ferro' => 24,
+ 'prototipo' => 9,
+ 'fajaColor' => 16,
+ ];
+
$this->viewData['tipo_impresion_id'] = 4; // Cosido tapa blanda JJO
$this->viewData['formAction'] = route_to('updateCosidotapablanda', $id);
diff --git a/ci4/app/Controllers/Test.php b/ci4/app/Controllers/Test.php
index e27c9841..441a6b9c 100755
--- a/ci4/app/Controllers/Test.php
+++ b/ci4/app/Controllers/Test.php
@@ -17,9 +17,9 @@ class Test extends BaseController
public function index()
{
- $model = model('App\Models\Tarifas\TarifaEnvioPrecioModel');
+
echo '
';
- var_dump($model->getEnvioPrecio(2, 1.5, "cajas"));
+ var_dump($this->get_tarifa_enc(18, 150, 100, 98,148));
echo '';
}
diff --git a/ci4/app/Entities/Presupuestos/PresupuestoEntity.php b/ci4/app/Entities/Presupuestos/PresupuestoEntity.php
index 9d29fe8d..579aca2c 100755
--- a/ci4/app/Entities/Presupuestos/PresupuestoEntity.php
+++ b/ci4/app/Entities/Presupuestos/PresupuestoEntity.php
@@ -49,7 +49,6 @@ class PresupuestoEntity extends \CodeIgniter\Entity\Entity
"sobrecubiertas_ancho" => 0.0,
"merma" => null,
"merma_portada" => 6.0,
- "imagenes_bn_interior" => false,
"comentarios_cliente" => null,
"comentarios_safekat" => null,
"comentarios_pdf" => null,
@@ -215,7 +214,6 @@ class PresupuestoEntity extends \CodeIgniter\Entity\Entity
"sobrecubiertas_ancho" => "float",
"merma" => "float",
"merma_portada" => "float",
- "imagenes_bn_interior" => "boolean",
"en_produccion" => "boolean",
"en_espera" => "boolean",
"modo_comparador" => "boolean",
diff --git a/ci4/app/Language/en/Presupuestos.php b/ci4/app/Language/en/Presupuestos.php
index c9acb767..c3115c84 100755
--- a/ci4/app/Language/en/Presupuestos.php
+++ b/ci4/app/Language/en/Presupuestos.php
@@ -159,6 +159,7 @@ return [
'errores' => [
'paginas' => 'The field pages must be greater than zero',
+ 'paginasLP' => 'The number of pages does not match the total',
'tiradas' => 'The field print must be greater than zero',
'dimension' => 'The book dimension must be greater than 60mm',
'lineaDuplicada' => 'That type of line already exists in the budget.',
diff --git a/ci4/app/Language/en/PresupuestosDirecciones.php b/ci4/app/Language/en/PresupuestosDirecciones.php
index 6c80ae4e..5ea2abfe 100755
--- a/ci4/app/Language/en/PresupuestosDirecciones.php
+++ b/ci4/app/Language/en/PresupuestosDirecciones.php
@@ -18,7 +18,7 @@ return [
'precio' => 'Price',
'saveDirection' => 'Save to client addresses (shipped on pallets)',
'validation' => [
- 'ejemplares_envio' => 'The number of copies sent does not match the print run'
+ 'ejemplares_envio' => 'The number of copies sent does not match the print run',
'max_length' => 'Max. length ',
'required' => 'Field required',
'valid_email' => 'The email is not valid',
diff --git a/ci4/app/Language/es/Presupuestos.php b/ci4/app/Language/es/Presupuestos.php
index c616b0af..0cddaa2d 100755
--- a/ci4/app/Language/es/Presupuestos.php
+++ b/ci4/app/Language/es/Presupuestos.php
@@ -218,6 +218,7 @@ return [
'errores' => [
'paginas' => 'El campo páginas tiene que ser mayor que cero',
+ 'paginasLP' => 'El número de páginas no coincide con el total',
'tiradas' => 'El campo tiradas tiene que ser mayor que cero',
'dimension' => 'La dimensión del libro tiene que ser mayor que 60mm',
'lineaDuplicada' => 'Ya existe ese tipo de linea en el presupuesto',
diff --git a/ci4/app/Models/Presupuestos/PresupuestoEncuadernacionesModel.php b/ci4/app/Models/Presupuestos/PresupuestoEncuadernacionesModel.php
index ae47dd9e..10d4d387 100755
--- a/ci4/app/Models/Presupuestos/PresupuestoEncuadernacionesModel.php
+++ b/ci4/app/Models/Presupuestos/PresupuestoEncuadernacionesModel.php
@@ -158,10 +158,12 @@ class PresupuestoEncuadernacionesModel extends \App\Models\GoBaseModel
public function getPrecioTarifa($tarifa_encuadernacion_id, $paginas, $tirada, $ancho, $alto, $proveedor_id, $POD){
$modelTarifa = model('App\Models\Tarifas\TarifaEncuadernacionModel');
- if($proveedor_id != -1)
+ if($proveedor_id != -1){
$tarifa_value = $modelTarifa->getTarifaPresupuestoEncuadernacion($tarifa_encuadernacion_id, $paginas, $tirada, $ancho, $alto, $proveedor_id);
- else
+ }
+ else{
$tarifa_value = $modelTarifa->getTarifaPresupuestoEncuadernacion($tarifa_encuadernacion_id, $paginas, $tirada, $ancho, $alto);
+ }
if (count($tarifa_value)>0) {
$result_data = $this->calcularTarifa($tarifa_value[0], $paginas, $POD<$tirada?false:true);
diff --git a/ci4/app/Models/Presupuestos/PresupuestoModel.php b/ci4/app/Models/Presupuestos/PresupuestoModel.php
index d0dcc543..19e50f1f 100755
--- a/ci4/app/Models/Presupuestos/PresupuestoModel.php
+++ b/ci4/app/Models/Presupuestos/PresupuestoModel.php
@@ -69,7 +69,6 @@ class PresupuestoModel extends \App\Models\GoBaseModel
"sobrecubiertas_ancho",
"merma",
"merma_portada",
- "imagenes_bn_interior",
"comentarios_cliente",
"comentarios_safekat",
"comentarios_pdf",
diff --git a/ci4/app/Models/Tarifas/TarifaEncuadernacionModel.php b/ci4/app/Models/Tarifas/TarifaEncuadernacionModel.php
index 84a60339..c4eb90e9 100755
--- a/ci4/app/Models/Tarifas/TarifaEncuadernacionModel.php
+++ b/ci4/app/Models/Tarifas/TarifaEncuadernacionModel.php
@@ -158,11 +158,11 @@ class TarifaEncuadernacionModel extends \App\Models\GoBaseModel
$builder->where('t2.tirada_min <=', $tirada);
$builder->where('t2.tirada_max >=', $tirada);
$builder->where('t3.paginas_libro_min <=', $paginas);
- $builder->where('t3.paginas_libro_max >', $paginas);
+ $builder->where('t3.paginas_libro_max >=', $paginas);
$builder->where('t4.ancho_min <=', $ancho);
- $builder->where('t4.ancho_max >', $ancho);
+ $builder->where('t4.ancho_max >=', $ancho);
$builder->where('t4.alto_min <=', $alto);
- $builder->where('t4.alto_max >', $alto);
+ $builder->where('t4.alto_max >=', $alto);
if($proveedor_id != -1){
$builder->where('t2.proveedor_id', $proveedor_id);
diff --git a/ci4/app/Views/themes/backend/vuexy/form/presupuestos/cosidotapablanda/_datosLibroItems.php b/ci4/app/Views/themes/backend/vuexy/form/presupuestos/cosidotapablanda/_datosLibroItems.php
index d65f2e5b..280f83c2 100755
--- a/ci4/app/Views/themes/backend/vuexy/form/presupuestos/cosidotapablanda/_datosLibroItems.php
+++ b/ci4/app/Views/themes/backend/vuexy/form/presupuestos/cosidotapablanda/_datosLibroItems.php
@@ -95,7 +95,7 @@
-
+
@@ -104,7 +104,7 @@
-
+
@@ -233,33 +233,8 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -273,17 +248,20 @@
= $this->section("additionalInlineJs") ?>
$('#paginas').on("change", function () {
+ checkPaginasPresupuesto()
+ updateLineasPresupuesto()
+
// Si es negro o color
if ($('#tipoImpresion').select2('data')[0].id == 'negro' ||
$('#tipoImpresion').select2('data')[0].id == 'color') {
- document.getElementById('compPaginasNegro').value = document.getElementById('paginas').value;
- document.getElementById('compPaginasColor').value = 0;
+ $('#compPaginasNegro').val(parseInt($('#paginas').val())-parseInt($('#compPaginasColor').val()));
+ $('#compPaginasNegro').trigger('change')
}
// Si es negrohq o colorhq
if ($('#tipoImpresion').select2('data')[0].id == 'negrohq' ||
$('#tipoImpresion').select2('data')[0].id == 'colorhq') {
- document.getElementById('compPaginasNegrohq').value = document.getElementById('paginas').value;
- document.getElementById('compPaginasColorhq').value = 0;
+ $('#compPaginasNegrohq').val(parseInt($('#paginas').val())-parseInt($('#compPaginasColorhq').val()));
+ $('#compPaginasNegrohq').trigger('change');
}
update_servicios(false)
@@ -292,9 +270,40 @@ $('#paginas').on("change", function () {
$('#tirada').on("change", function () {
update_servicios(false)
+ calcular_mermas()
+ updateLineasPresupuesto()
checkInsertar()
})
+function calcular_mermas(){
+
+ const tirada = parseInt($('#tirada').val())
+ var merma = 0
+
+ if(tirada>POD){
+ merma = tirada*0.1<=30 ? tirada*0.1 : 30
+ }
+ else{
+ merma_lineas = []
+ $('#tableLineasPresupuesto tbody tr:visible ').each(function(){
+ if(!this.id.includes('_data') && !this.id.endsWith('_cubierta') && !this.id.endsWith('_sobrecubierta')){
+ const formas_linea = parseInt($('#' + this.id + '_formas').val())
+ if(formas_linea > tirada)
+ merma_lineas.push(formas_linea-tirada)
+ else
+ merma_lineas.push(tirada%formas_linea)
+ }
+ })
+ if(merma_lineas.length>0)
+ merma = Math.max(...merma_lineas)
+ else
+ merma = 0
+ }
+ $('#mermacubierta').val(parseInt(merma))
+ $('#merma').val(parseInt(merma))
+}
+
+
$('#papelFormatoId').select2({
allowClear: false,
});
@@ -324,11 +333,37 @@ $('#papelFormatoPersonalizado').on("click",function(){
var ancho_libro = getDimensionLibro().ancho;
var alto_libro = getDimensionLibro().alto;
+
+ $('#retractilado').on("change", function () {
+ checkRetractiladoComparador(this);
+ servicioRetractilado()
+ });
+
+
+ $('#retractilado5').on("change", function () {
+ checkRetractiladoComparador(this);
+ servicioRetractilado5()
+ });
+
+ $('#fajaColor').on("change", function () {
+ servicioFajaColor()
+ });
+
+ $('#ferro').on("change", function () {
+ servicioFerro()
+ });
+
+ $('#prototipo').on("change", function () {
+ servicioPrototipo()
+ servicioFerro()
+ });
+
$('#papelFormatoId').on('select2:select', function (e){
ancho_libro = getDimensionLibro().ancho;
alto_libro = getDimensionLibro().alto;
+ update_servicios(false)
})
$('#papelFormatoAncho').on('change', function (e){
diff --git a/ci4/app/Views/themes/backend/vuexy/form/presupuestos/cosidotapablanda/_datosPresupuestoClienteItems.php b/ci4/app/Views/themes/backend/vuexy/form/presupuestos/cosidotapablanda/_datosPresupuestoClienteItems.php
index 3442a4d1..5babbed0 100755
--- a/ci4/app/Views/themes/backend/vuexy/form/presupuestos/cosidotapablanda/_datosPresupuestoClienteItems.php
+++ b/ci4/app/Views/themes/backend/vuexy/form/presupuestos/cosidotapablanda/_datosPresupuestoClienteItems.php
@@ -829,7 +829,7 @@
- async function getLineasIntPlana(is_color, is_hq){
+ async function getLineasIntPlana(is_color, is_hq, actualizarLinea){
const dimension = getDimensionLibro();
@@ -862,6 +862,28 @@
selectIntLineas();
$('#title_int_plana').html('= lang("Presupuestos.compInteriorPlana") ?>' + ' (' + tableCompIntPlana.rows().count() + ')');
$('#insertarPlanaBtn').removeClass('d-none')
+ if(actualizarLinea){
+ var rows = $("#tableCompIntPlana").DataTable().rows( '.selected' ).data().toArray();
+ for(row of rows){
+
+ if(row['tipo'] =='bn' && !is_color && !is_hq){
+ if($('#lp_bn').css('display')!='none')
+ fill_lp_bn(row, true);
+ }
+ else if(row['tipo'] =='bnhq' && !is_color && is_hq){
+ if($('#lp_bnhq').css('display')!='none')
+ fill_lp_bnhq(row, true);
+ }
+ else if(row['tipo'] =='color' && is_color && !is_hq){
+ if($('#lp_color').css('display')!='none')
+ fill_lp_color(row, true);
+ }
+ else if(row['tipo'] =='colorhq' && is_color && is_hq){
+ if($('#lp_colorhq').css('display')!='none')
+ fill_lp_colorhq(row, true);
+ }
+ }
+ }
}
else{
$('#title_int_plana').html('= lang("Presupuestos.compInteriorPlana") ?>');
@@ -878,7 +900,7 @@
return false;
}
- async function getLineasIntRot(is_hq){
+ async function getLineasIntRot(is_hq, actualizarLinea=false){
const dimension = getDimensionLibro();
@@ -917,6 +939,19 @@
selectIntRotLineas();
$('#title_int_rot').html('= lang("Presupuestos.compInteriorRotativa") ?>' + ' (' + tableCompIntRotativa.rows().count() + ')');
$('#insertarRotativaBtn').removeClass('d-none')
+ if(actualizarLinea){
+ var rows = $("#tableCompIntRotativa").DataTable().rows( '.selected' ).data().toArray();
+ for(row of rows){
+ if(row['paginasColor'] ==0){
+ if($('#lp_rot_bn').css('display')!='none')
+ fill_lp_rot_bn(row, true);
+ }
+ else if(row['paginasColor'] >0){
+ if($('#lp_rot_color').css('display')!='none')
+ fill_lp_rot_color(row, true);
+ }
+ }
+ }
}
else{
$('#title_int_rot').html('= lang("Presupuestos.compInteriorRotativa") ?>');
@@ -938,6 +973,12 @@
$('.comp_cubierta_items').on('change', function (){
+ checkComparadorCubierta()
+ });
+
+
+ function checkComparadorCubierta(actualizarLinea = false){
+
if ($('#compCarasCubierta').select2('data').length > 0 &&
$('#compPapelCubierta').select2('data').length > 0 &&
$('#compGramajeCubierta').select2('data').length > 0 ){
@@ -974,7 +1015,12 @@
selectCubiertaLineas();
$('#title_cubierta').html('= lang("Presupuestos.cubierta") ?>' + ' (' + tableCompCubierta.rows().count() + ')');
$('#insertarCubiertaBtn').removeClass('d-none')
-
+ if(actualizarLinea){
+ var rows = $("#tableCompCubierta").DataTable().rows( '.selected' ).data().toArray();
+ for(row of rows){
+ fill_lp_cubierta(row, true);
+ }
+ }
}
else{
$('#title_cubierta').html('= lang("Presupuestos.cubierta") ?>');
@@ -994,8 +1040,7 @@
else{
clearCubierta();
}
- });
-
+ }
$('.comp_negro_items').on('change', function (e) {
@@ -1055,7 +1100,7 @@
});
- function checkComparadorInt(is_color, is_hq) {
+ function checkComparadorInt(is_color, is_hq, actualizarLinea=false) {
try{
@@ -1072,11 +1117,11 @@
checkDatosPedidoForComp()) {
- getLineasIntPlana(is_color, is_hq).then((result) =>{
+ getLineasIntPlana(is_color, is_hq, actualizarLinea).then((result) =>{
// Para rotativa, si es color el papel y el gramaje tiene que ser igual
if(!is_color)
{
- getLineasIntRot(is_hq);
+ getLineasIntRot(is_hq, actualizarLinea);
}
else
{
@@ -1087,7 +1132,7 @@
if(($('#compPapelNegro').select2('data')[0].id == $('#compPapelColor').select2('data')[0].id &&
$('#compGramajeNegro').select2('data')[0].text.trim() == $('#compGramajeColor').select2('data')[0].text.trim()))
{
- getLineasIntRot(is_hq);
+ getLineasIntRot(is_hq, actualizarLinea);
}
else
{
@@ -1286,6 +1331,7 @@
else{
$('#insertarCubiertaBtn').addClass('d-none')
$('#total_comp_cubierta').html('0.00')
+ $('#compGramajeCubierta').empty().trigger("change");
$('#compGramajeCubierta').val('').trigger('change');
$('#compGramajeCubierta').prop('disabled', false);
$('#compPapelCubierta').find('option[value="0"]').remove();
diff --git a/ci4/app/Views/themes/backend/vuexy/form/presupuestos/cosidotapablanda/_datosServiciosItems.php b/ci4/app/Views/themes/backend/vuexy/form/presupuestos/cosidotapablanda/_datosServiciosItems.php
index 94d8b148..7f23f7a1 100755
--- a/ci4/app/Views/themes/backend/vuexy/form/presupuestos/cosidotapablanda/_datosServiciosItems.php
+++ b/ci4/app/Views/themes/backend/vuexy/form/presupuestos/cosidotapablanda/_datosServiciosItems.php
@@ -404,6 +404,7 @@
$('#precio_total_acabado_' + line[0].tarifa_id).val(parseFloat(line[0].total).toFixed(2))
$('#acabado_margen_' + line[0].tarifa_id).text(parseFloat(line[0].margen).toFixed(2))
});
+ check_serv_acabado_error()
yeniden(data.= csrf_token() ?>);
}).then(
fetch(domain + "/presupuestos/presupuestoencuadernaciones/update/" + id , {
@@ -424,10 +425,12 @@
.then(response => response.json())
.then(data => {
data.lines.forEach((line) => {
-
+
$('#proveedor_enc_' + line[0].tarifa_id).off('change')
- if(line[0].hasOwnProperty('proveedor_id'))
- $('#proveedor_enc_' + line[0].tarifa_id).val(line[0].proveedor_id)
+ if(line[0].hasOwnProperty('proveedor_id')){
+ $('#proveedor_enc_' + line[0].tarifa_id)
+ .append('')
+ }
else{
$('#proveedor_enc_' + line[0].tarifa_id).empty()
.append('')
@@ -437,6 +440,7 @@
$('#enc_margen_' + line[0].tarifa_id).val(parseFloat(line[0].margen).toFixed(2))
$('#proveedor_enc_' + line[0].tarifa_id).on('change', proveedor_enc_event)
});
+ check_serv_enc_error()
yeniden(data.= csrf_token() ?>);
}).then(
fetch(domain + "/presupuestos/presupuestomanipulados/update/" + id , {
@@ -458,6 +462,7 @@
$('#precio_total_manipulado_' + line[0].tarifa_id).val(parseFloat(line[0].total).toFixed(2))
$('#manipulado_margen_' + line[0].tarifa_id).val(parseFloat(line[0].margen).toFixed(2))
});
+ check_serv_manipulado_error()
yeniden(data.= csrf_token() ?>);
}).then(function(){
if(update_preimpresion){
@@ -478,7 +483,7 @@
$('#precio_preimpresion_' + line[0].tarifa_id).val(parseFloat(line[0].total).toFixed(2))
$('#preimpresion_margen_' + line[0].tarifa_id).val(parseFloat(line[0].margen).toFixed(2))
});
-
+ check_serv_preimpresion_error()
yeniden(data.= csrf_token() ?>);
})
}
@@ -604,6 +609,54 @@
return false;
}
+ function servicioRetractilado(){
+ if($('#retractilado').prop('checked')){
+ $('#add_servicio_acabado_list').val()
+ $('#insertar_serv_acabado').click()
+ }
+ else{
+ var row_indexes = tableServiciosAcabado.rows().eq( 0 ).filter( function (rowIdx) {
+ return tableServiciosAcabado.cell( rowIdx, 0 ).data() == ? true : false;
+ } );
+ if(row_indexes.length > 0){
+ tableServiciosAcabado.row(row_indexes[0]).remove().draw()
+ check_serv_acabado_error()
+ }
+ }
+ }
+
+ function servicioRetractilado5(){
+ if($('#retractilado5').prop('checked')){
+ $('#add_servicio_acabado_list').val()
+ $('#insertar_serv_acabado').click()
+ }
+ else{
+ var row_indexes = tableServiciosAcabado.rows().eq( 0 ).filter( function (rowIdx) {
+ return tableServiciosAcabado.cell( rowIdx, 0 ).data() == ? true : false;
+ } );
+ if(row_indexes.length > 0){
+ tableServiciosAcabado.row(row_indexes[0]).remove().draw()
+ check_serv_acabado_error()
+ }
+ }
+ }
+
+ function servicioFajaColor(){
+ if($('#fajaColor').prop('checked')){
+ $('#add_servicio_acabado_list').val()
+ $('#insertar_serv_acabado').click()
+ }
+ else{
+ var row_indexes = tableServiciosAcabado.rows().eq( 0 ).filter( function (rowIdx) {
+ return tableServiciosAcabado.cell( rowIdx, 0 ).data() == ? true : false;
+ } );
+ if(row_indexes.length > 0){
+ tableServiciosAcabado.row(row_indexes[0]).remove().draw()
+ check_serv_acabado_error()
+ }
+ }
+ }
+
$('#insertar_serv_acabado').on('click', function(){
const tarifa_text = $('#add_servicio_acabado_list').select2('data')[0].text.trim()
@@ -788,8 +841,9 @@
var htmlString = '';
- if($('#tableOfServiciosEncuadernacion tr > td:contains(' + '= lang("Presupuestos.no_disponible") ?>' + ')').length > 0){
- htmlString = `
+ $('#tableOfServiciosEncuadernacion tr').each(function(){
+ if($(this).find('td').eq(3).text() == '0.00'){
+ htmlString = `
@@ -798,7 +852,8 @@
= lang("Presupuestos.errores.error_servicios_anadidos") ?>
`;
- }
+ }
+ })
$('#serv-enc-error').html(htmlString)
}
@@ -1231,6 +1286,41 @@
return false;
}
+
+ function servicioPrototipo(){
+ if($('#prototipo').prop('checked')){
+ $('#add_servicio_preimpresion_list').val()
+ $('#insertar_serv_preimpresion').click()
+ }
+ else{
+ var row_indexes = tableServiciosPreimpresion.rows().eq( 0 ).filter( function (rowIdx) {
+ return tableServiciosPreimpresion.cell( rowIdx, 0 ).data() == ? true : false;
+ } );
+ if(row_indexes.length > 0){
+ tableServiciosPreimpresion.row(row_indexes[0]).remove().draw()
+ check_serv_preimpresion_error()
+ }
+ }
+ }
+
+ function servicioFerro(){
+ var row_indexes = tableServiciosPreimpresion.rows().eq( 0 ).filter( function (rowIdx) {
+ return tableServiciosPreimpresion.cell( rowIdx, 0 ).data() == ? true : false;
+ } );
+ if($('#ferro').prop('checked')){
+ if(row_indexes.length == 0){
+ $('#add_servicio_preimpresion_list').val()
+ $('#insertar_serv_preimpresion').click()
+ }
+ }
+ else{
+ if(row_indexes.length > 0){
+ tableServiciosPreimpresion.row(row_indexes[0]).remove().draw()
+ check_serv_preimpresion_error()
+ }
+ }
+ }
+
$('#insertar_serv_preimpresion').on('click', function(){
const tarifa_text = $('#add_servicio_preimpresion_list').select2('data')[0].text.trim()
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 dde34e34..8e3fbfe5 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
@@ -51,7 +51,7 @@
 ?>) |
- |
+ |
|