diff --git a/ci4/app/Models/Pedidos/PedidoModel.php b/ci4/app/Models/Pedidos/PedidoModel.php index 7f267388..d5957dce 100644 --- a/ci4/app/Models/Pedidos/PedidoModel.php +++ b/ci4/app/Models/Pedidos/PedidoModel.php @@ -2,7 +2,7 @@ namespace App\Models\Pedidos; -use App\Entities\Presupuestos\OrdenTrabajoEntity; +use App\Entities\Produccion\OrdenTrabajoEntity; use App\Models\OrdenTrabajo\OrdenTrabajoModel; use function PHPSTORM_META\map; diff --git a/ci4/app/Views/themes/vuexy/form/tarifas/encuadernacion/viewTarifaEncuadernacionForm.php b/ci4/app/Views/themes/vuexy/form/tarifas/encuadernacion/viewTarifaEncuadernacionForm.php index a8c1bd81..235d92d3 100644 --- a/ci4/app/Views/themes/vuexy/form/tarifas/encuadernacion/viewTarifaEncuadernacionForm.php +++ b/ci4/app/Views/themes/vuexy/form/tarifas/encuadernacion/viewTarifaEncuadernacionForm.php @@ -157,135 +157,135 @@ const url = window.location.href; const url_parts = url.split('/'); var id = -1; -if(url_parts[url_parts.length-2] == 'edit'){ -id = url_parts[url_parts.length-1]; +if (url_parts[url_parts.length - 2] == 'edit') { + id = url_parts[url_parts.length - 1]; } -else{ -id = -1; +else { + id = -1; } - const actionBtns = function(data) { - return ` - - - - `; - }; + const actionBtns = function (data) { + return ` + + + + `; +}; - // Delete row - $(document).on('click', '.btn-delete', function(e) { +// Delete row +$(document).on('click', '.btn-delete', function (e) { $(".btn-remove").attr('data-id', $(this).attr('data-id')); - if($(this).closest('table').attr('id').includes('tiradas')){ - $(".btn-remove").attr('table', "tiradas"); + if ($(this).closest('table').attr('id').includes('tiradas')) { + $(".btn-remove").attr('table', "tiradas"); } - else if($(this).closest('table').attr('id').includes('lineas')){ - $(".btn-remove").attr('table', "lineas"); + else if ($(this).closest('table').attr('id').includes('lineas')) { + $(".btn-remove").attr('table', "lineas"); } - else{ - $(".btn-remove").attr('table', ); + else { + $(".btn-remove").attr('table',); } - }); +}); - var selected_tirada_id = -1; +var selected_tirada_id = -1; - $(document).on('click', '.btn-remove', function(e) { +$(document).on('click', '.btn-remove', function (e) { const dataId = $(this).attr('data-id'); const row = $(this).closest('tr'); if ($.isNumeric(dataId)) { - if($(this).attr('table').includes('tiradas')){ - remove_tiradas(dataId, row); + if ($(this).attr('table').includes('tiradas')) { + remove_tiradas(dataId, row); + } + else if ($(this).attr('table').includes('lineasHoras')) { + remove_lineas_horas(dataId, row); + } + else { + remove_lineas(dataId, row); + } } - else if ($(this).attr('table').includes('lineasHoras')){ - remove_lineas_horas(dataId, row); - } - else{ - remove_lineas(dataId, row); - } - } - }); +}); - function check_por_horas(){ - if($('#por_horas').is(':checked')){ - $('#accordionEncuadernacionLineasHoras').removeClass("d-none"); - $('#accordionEncuadernacionLineas').addClass("d-none"); +function check_por_horas() { + if ($('#por_horas').is(':checked')) { + $('#accordionEncuadernacionLineasHoras').removeClass("d-none"); + $('#accordionEncuadernacionLineas').addClass("d-none"); } - else{ - $('#accordionEncuadernacionLineasHoras').addClass("d-none"); - $('#accordionEncuadernacionLineas').removeClass("d-none"); + else { + $('#accordionEncuadernacionLineasHoras').addClass("d-none"); + $('#accordionEncuadernacionLineas').removeClass("d-none"); } - } - check_por_horas() +} +check_por_horas() - $("#por_horas").change(function() { +$("#por_horas").change(function () { asyncConfirmDialog('', - '', yesCallback, noCallback); - }); + '', yesCallback, noCallback); +}); - function yesCallback() { +function yesCallback() { check_por_horas() - if($('#por_horas').is(':checked')){ + if ($('#por_horas').is(':checked')) { - theTable.clearPipeline(); - theTable.draw(); + theTable.clearPipeline(); + theTable.draw(); - $.ajax({ - url: '', - data: { - cleandatatable: 1, - tarifa_encuadernacion_id: id, - : v, - }, - method: 'POST', - headers: {'X-Requested-With': 'XMLHttpRequest'}, - success:function(response){ - token = response.; - yeniden(token); + $.ajax({ + url: '', + data: { + cleandatatable: 1, + tarifa_encuadernacion_id: id, + : v, + }, + method: 'POST', + headers: { 'X-Requested-With': 'XMLHttpRequest' }, + success: function (response) { + token = response.; + yeniden(token); - theTable3.clearPipeline(); - theTable3.draw(); + theTable3.clearPipeline(); + theTable3.draw(); - theTable.clearPipeline(); - theTable.draw(); - } + theTable.clearPipeline(); + theTable.draw(); + } }); - }else{ + }else { - theTable3.clearPipeline(); - theTable3.draw(); + theTable3.clearPipeline(); + theTable3.draw(); - $.ajax({ - url: '', - data: { - cleandatatable: 1, - tarifa_encuadernacion_id: id, - : v, - }, - method: 'POST', - headers: {'X-Requested-With': 'XMLHttpRequest'}, - success:function(response){ + $.ajax({ + url: '', + data: { + cleandatatable: 1, + tarifa_encuadernacion_id: id, + : v, + }, + method: 'POST', + headers: { 'X-Requested-With': 'XMLHttpRequest' }, + success: function (response) { - token=response.; - yeniden(token); + token = response.; + yeniden(token); - theTable3.clearPipeline(); - theTable3.draw(); + theTable3.clearPipeline(); + theTable3.draw(); - theTable.clearPipeline(); - theTable.draw(); - } - }); - } + theTable.clearPipeline(); + theTable.draw(); + } + }); } +} - function noCallback() { +function noCallback() { // Toggle behaviour $('#por_horas').prop("checked", !$('#por_horas').prop("checked")); - } +} endSection() ?> @@ -303,7 +303,7 @@ var editor3 = new $.fn.dataTable.Editor({ ajax: { url: "", headers: { - : v, + : v, }, }, table : "#tableOfTarifaencuadernacionlineasHoras", @@ -550,7 +550,7 @@ var editor = new $.fn.dataTable.Editor({ ajax: { url: "", headers: { - : v, + : v, }, }, table : "#tableOfTarifaencuadernacionlineas", @@ -620,7 +620,7 @@ var editor = new $.fn.dataTable.Editor({ } ); // Generación de la lista de proveedores (id, nombre) para encuadernación -const dimensionesList = ; +const dimensionesList = ; editor.field('dimensiones_id').update(dimensionesList); editor.on('open', (event) => { $("input.autonumeric").each(function () { @@ -818,7 +818,7 @@ var editor2 = new $.fn.dataTable.Editor({ ajax: { url: "", headers: { - : v, + : v, }, }, table : "#tableOfTarifaencuadernaciontiradas", @@ -865,7 +865,7 @@ var editor2 = new $.fn.dataTable.Editor({ // Generación de la lista de proveedores (id, nombre) para encuadernación -const suppliersList = ; +const suppliersList = ; editor2.field('proveedor_id').update(suppliersList); editor2.on('open', (event) => {