= view("themes/_commonPartialsBs/_alertBoxes") ?>
= !empty($validation->getErrors()) ? $validation->listErrors("bootstrap_style") : "" ?>
+
+
+
= view("themes/vuexy/form/pedidos/_cabeceraItems") ?>
= view("themes/vuexy/form/pedidos/_lineasItems") ?>
user()->inGroup('cliente-admin') || auth()->user()->inGroup('cliente-editor'))) : ?>
@@ -29,7 +40,7 @@
- = anchor(route_to("listaPresupuestos"), lang("Basic.global.Cancel"), ["class" => "btn btn-secondary float-start"]) ?>
+ = anchor(route_to("listaPedidos"), lang("Basic.global.Cancel"), ["class" => "btn btn-secondary float-start"]) ?>
diff --git a/ci4/app/Views/themes/vuexy/form/pedidos/viewPedidosList.php b/ci4/app/Views/themes/vuexy/form/pedidos/viewPedidosList.php
index 1bbb709e..971dc8dd 100644
--- a/ci4/app/Views/themes/vuexy/form/pedidos/viewPedidosList.php
+++ b/ci4/app/Views/themes/vuexy/form/pedidos/viewPedidosList.php
@@ -72,10 +72,10 @@ $('#tableOfPedidos thead tr:eq(1) th').each(function (i) {
var title = $(this).text();
if($(this).hasClass("totalizador")){
if(i==9){
- $(this).html('
');
+ $(this).html('
');
}
else if(i==10){
- $(this).html('
');
+ $(this).html('
€
€');
}
}
else{
@@ -125,25 +125,31 @@ $('#tableOfPedidos thead tr:eq(1) th').each(function (i) {
}
else if (i == 11) {
- // Agregar un selector en la tercera columna
- $(this).html('
');
- // Agregar opciones al selector
- var selector = $('select', this);
+ if("= $estadoPedidos ?>" == "" || "= $estadoPedidos ?>" == "todos"){
- selector.append('
'); // Opción vacía
- selector.append('
');
- selector.append('
');
- selector.append('
');
- selector.append('
');
- selector.append('
');
-
- selector.on('change', function () {
- var val = $.fn.dataTable.util.escapeRegex(
- $(this).val()
- );
- theTable.column(i).search(val).draw();
- });
+ $(this).html('
');
+
+ // Agregar opciones al selector
+ var selector = $('select', this);
+
+ selector.append('
'); // Opción vacía
+ selector.append('
');
+ selector.append('
');
+ selector.append('
');
+ selector.append('
');
+ selector.append('
');
+
+ selector.on('change', function () {
+ var val = $.fn.dataTable.util.escapeRegex(
+ $(this).val()
+ );
+ theTable.column(i).search(val).draw();
+ });
+ }
+ else{
+ $(this).html('
');
+ }
}
else{
$(this).html('
');
@@ -189,7 +195,7 @@ $('#tableOfPedidos thead tr:eq(1) th').each(function (i) {
}
],
stateSave: false,
- order: [[0, 'asc']],
+ order: [[0, 'desc']],
language: {
url: "/themes/vuexy/vendor/libs/datatables-sk/plugins/i18n/es-ES.json"
},
@@ -256,38 +262,53 @@ $('#tableOfPedidos thead tr:eq(1) th').each(function (i) {
{ 'data': actionBtns }
],
drawCallback: function (settings) {
- $('#total_tirada').text(settings.json.extra.total_tirada);
- $('#total_aceptado').text(settings.json.extra.total);
- }
- });
- theTable.on( 'draw.dt', function () {
- const dateCols = [1,2];
- const priceCols = [10];
+ var api = this.api();
+
+ $('#total_tirada').text(settings.json.extra.total_tirada??0);
+ $('#total_tirada_2').text(settings.json.extra.total_tirada2??0);
+ $('#total_aceptado').text(settings.json.extra.total??0);
+ $('#total_aceptado_2').text(settings.json.extra.total2??0);
+ AutoNumeric.multiple('.autonumeric', { decimalPlaces: 2 });
+ AutoNumeric.multiple('.autonumeric-int', { decimalPlaces: 0 });
- for (let coln of dateCols) {
- theTable.column(coln, { page: 'current' }).nodes().each( function (cell, i) {
- const datestr = cell.innerHTML;
- const dateStrLen = datestr.toString().trim().length;
- if (dateStrLen > 0) {
- let dateTimeParts= datestr.split(/[- :]/); // regular expression split that creates array with: year, month, day, hour, minutes, seconds values
- dateTimeParts[1]--; // monthIndex begins with 0 for January and ends with 11 for December so we need to decrement by one
- const d = new Date(...dateTimeParts); // new Date(datestr);
- cell.innerHTML = d.toLocaleDateString();
+ const dateCols = [1,2];
+ const priceCols = [10];
+
+ for (let coln of dateCols) {
+ api.column(coln, { page: 'current' }).nodes().each( function (cell, i) {
+ const datestr = cell.innerHTML;
+ const dateStrLen = datestr.toString().trim().length;
+ if (dateStrLen > 0) {
+ let dateTimeParts= datestr.split(/[- :]/); // regular expression split that creates array with: year, month, day, hour, minutes, seconds values
+ dateTimeParts[1]--; // monthIndex begins with 0 for January and ends with 11 for December so we need to decrement by one
+ const d = new Date(...dateTimeParts); // new Date(datestr);
+ cell.innerHTML = d.toLocaleDateString();
+ }
+ });
+ }
+ if(= $cliente_id ?> != -1){
+ api.column(3).visible(false);
+ }
+ else{
+ api.column(3).visible(true);
+ }
+ },
+ "rowCallback": function(row, data, index) {
+ if('= $estadoPedidos ?>' == 'todos'){
+ if (data['estado'] === "cancelado") {
+ $(row).css('background-color', '#ffcccc'); // Rojo claro
+ } else if (data['estado'] === "validacion") {
+ $(row).css('background-color', '#fff5cc'); // Amarillo claro
+ } else if (data['estado'] === "finalizado") {
+ $(row).css('background-color', '#ccffcc'); // Verde claro
}
- });
- }
-
-
- if(= $cliente_id ?> != -1){
- // Se oculta la columna de cliente (3)
- theTable.column(3).visible(false);
- }
- else{
- theTable.column(3).visible(true);
+ }
}
});
+
+
$(document).on('click', '.btn-edit', function(e) {
@@ -301,6 +322,12 @@ $('#tableOfPedidos thead tr:eq(1) th').each(function (i) {
});
$('#showTotal').on('change', function() {
+ if($('#showTotal').is(':checked')){
+ $('.mostrar-totales').removeClass('d-none');
+ }
+ else{
+ $('.mostrar-totales').addClass('d-none');
+ }
theTable.clearPipeline();
theTable.ajax.reload(null, false);
//theTable.draw();
diff --git a/ci4/app/Views/themes/vuexy/form/presupuestos/admin/viewPresupuestoadminForm.php b/ci4/app/Views/themes/vuexy/form/presupuestos/admin/viewPresupuestoadminForm.php
index 5a2e0ec7..26988708 100644
--- a/ci4/app/Views/themes/vuexy/form/presupuestos/admin/viewPresupuestoadminForm.php
+++ b/ci4/app/Views/themes/vuexy/form/presupuestos/admin/viewPresupuestoadminForm.php
@@ -30,7 +30,29 @@
-
+
+
+
+
+
+
'" >
+ = lang('Pedidos.pedido') ?>
+
+
+
+
+
+
+
+
+
= view("themes/vuexy/form/presupuestos/admin/_datosPresupuestoItems") ?>
= view("themes/vuexy/form/presupuestos/admin/_datosLibroItems") ?>
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 1a9ddab1..a8c1bd81 100644
--- a/ci4/app/Views/themes/vuexy/form/tarifas/encuadernacion/viewTarifaEncuadernacionForm.php
+++ b/ci4/app/Views/themes/vuexy/form/tarifas/encuadernacion/viewTarifaEncuadernacionForm.php
@@ -292,792 +292,797 @@ id = -1;
-
-
-
- = $this->section("additionalInlineJs") ?>
+
+
+
+= $this->section("additionalInlineJs") ?>
- const lastColNr3 = $('#tableOfTarifaencuadernacionlineasHoras').find("tr:first th").length - 1;
+const lastColNr3 = $('#tableOfTarifaencuadernacionlineasHoras').find("tr:first th").length - 1;
- var editor3 = new $.fn.dataTable.Editor( {
+var editor3 = new $.fn.dataTable.Editor({
ajax: {
- url: "= route_to('editorOfTarifaEncuadernacionLineasHoras') ?>",
- headers: {
- = csrf_token() ?? "token" ?> : = csrf_token() ?>v,
- },
+ url: "= route_to('editorOfTarifaEncuadernacionLineasHoras') ?>",
+ headers: {
+ = csrf_token() ?? "token" ?> : = csrf_token() ?> v,
+ },
},
table : "#tableOfTarifaencuadernacionlineasHoras",
idSrc: 'id',
- fields: [
- {name: "id",
- "type": "readonly"},
- {
- name: "tiempo_min",
- attr: {
- type: "text",
- name : "tiempo_min",
- class :"autonumeric"
- }
- }, {
- name: "tiempo_max",
- attr: {
- type: "text",
- name : "tiempo_max",
- class :"autonumeric"
- }
- }, {
- name: "precio_hora",
- attr: {
- type: "text",
- name : "precio_hora",
- class :"autonumeric"
- }
- }, {
- name: "total_min",
- attr: {
- type: "text",
- name : "total_min",
- class :"autonumeric"
- }
- }, {
- name: "margen",
- attr: {
- type: "text",
- name : "margen",
- class :"autonumeric"
- }
- }, {
- "name": "tirada_encuadernacion_id",
- "type": "hidden"
- },{
- "name": "deleted_at",
- "type": "hidden"
- },{
- "name": "is_deleted",
- "type": "hidden"
- },
+ fields: [
+ {
+ name: "id",
+ "type": "readonly"
+ },
+ {
+ name: "tiempo_min",
+ attr: {
+ type: "text",
+ name: "tiempo_min",
+ class: "autonumeric"
+ }
+ }, {
+ name: "tiempo_max",
+ attr: {
+ type: "text",
+ name: "tiempo_max",
+ class: "autonumeric"
+ }
+ }, {
+ name: "precio_hora",
+ attr: {
+ type: "text",
+ name: "precio_hora",
+ class: "autonumeric"
+ }
+ }, {
+ name: "total_min",
+ attr: {
+ type: "text",
+ name: "total_min",
+ class: "autonumeric"
+ }
+ }, {
+ name: "margen",
+ attr: {
+ type: "text",
+ name: "margen",
+ class: "autonumeric"
+ }
+ }, {
+ "name": "tirada_encuadernacion_id",
+ "type": "hidden"
+ }, {
+ "name": "deleted_at",
+ "type": "hidden"
+ }, {
+ "name": "is_deleted",
+ "type": "hidden"
+ },
]
- } );
- editor3.on('open', (event) => {
- $("input.autonumeric").each(function () {
- let autoNumericInstance = AutoNumeric.getAutoNumericElement(this)
- if (autoNumericInstance) {
- autoNumericInstance.remove()
+});
- }
- new AutoNumeric(this, {
- decimalCharacter: ",",
- digitGroupSeparator: ".",
- allowDecimalPadding : 'floats',
- decimalPlaces: 2,
- unformatOnSubmit: true,
- });
- })
+editor3.on('open', (event) => {
+ $("input.autonumeric").each(function () {
+ let autoNumericInstance = AutoNumeric.getAutoNumericElement(this)
+ if (autoNumericInstance) {
+ autoNumericInstance.remove()
+
+ }
+ new AutoNumeric(this, {
+ decimalCharacter: ",",
+ digitGroupSeparator: ".",
+ allowDecimalPadding: 'floats',
+ decimalPlaces: 2,
+ unformatOnSubmit: true,
+ });
})
- editor3.on('preSubmit', (e, d, type) => {
- if (d.data) {
- Object.keys(d.data).forEach(function (key) {
- // Find all elements with class .autonumeric
- $("input.autonumeric").each(function () {
- let autoNumericInstance = AutoNumeric.getAutoNumericElement(this)
- if (autoNumericInstance) {
- // Get raw value and update the corresponding field
- let rawValue = autoNumericInstance.getNumericString();
- d.data[key][this.name] = rawValue; // Ensure the correct name attribute is used
- }
- });
- });
- }
- })
- editor3.on( 'preSubmit', function ( e, d, type ) {
- if ( type === 'create'){
- d.data[0]['tirada_encuadernacion_id'] = selected_tirada_id;
+})
+
+editor3.on('preSubmit', (e, d, type) => {
+ if (d.data) {
+ Object.keys(d.data).forEach(function (key) {
+ // Find all elements with class .autonumeric
+ $("input.autonumeric").each(function () {
+ let autoNumericInstance = AutoNumeric.getAutoNumericElement(this)
+ if (autoNumericInstance) {
+ // Get raw value and update the corresponding field
+ let rawValue = autoNumericInstance.getNumericString();
+ d.data[key][this.name] = rawValue; // Ensure the correct name attribute is used
+ }
+ });
+ });
}
- else if(type === 'edit' ) {
- for (v in d.data){
- d.data[v]['tirada_encuadernacion_id'] = selected_tirada_id;
+})
+
+editor3.on('preSubmit', function (e, d, type) {
+ if (type === 'create') {
+ d.data[0]['tirada_encuadernacion_id'] = selected_tirada_id;
}
+ else if (type === 'edit') {
+ for (v in d.data) {
+ d.data[v]['tirada_encuadernacion_id'] = selected_tirada_id;
+ }
}
- });
+});
- editor3.on( 'postSubmit', function ( e, json, data, action ) {
+editor3.on('postSubmit', function (e, json, data, action) {
yeniden(json.= csrf_token() ?>);
- });
+});
- editor3.on( 'submitSuccess', function ( e, json, data, action ) {
+editor3.on('submitSuccess', function (e, json, data, action) {
theTable3.clearPipeline();
theTable3.draw();
- });
+});
- var theTable3 = $('#tableOfTarifaencuadernacionlineasHoras').DataTable( {
- draw:3,
+var theTable3 = $('#tableOfTarifaencuadernacionlineasHoras').DataTable({
+ draw: 3,
serverSide: true,
processing: true,
autoWidth: true,
responsive: true,
- lengthMenu: [ 5, 10, 25],
- order: [[ 0, "asc" ], [ 1, "asc" ]],
+ lengthMenu: [5, 10, 25],
+ order: [[0, "asc"], [1, "asc"]],
pageLength: 10,
lengthChange: true,
searching: false,
paging: true,
info: false,
dom: '<"mt-4"><"float-end"B><"float-start"l>
<"mt-4 mb-3"p>',
- ajax : $.fn.dataTable.pipeline( {
- url: '= route_to('dataTableOfTarifaEncuadernacionLineasHoras') ?>',
- data: function ( d ) {
- d.tirada_id = selected_tirada_id;
- },
- method: 'POST',
- headers: {'X-Requested-With': 'XMLHttpRequest'},
- async: true,
- }),
- columns: [
- { 'data': 'id' },
- { 'data': 'tiempo_min',render : (d) => `${d}` },
- { 'data': 'tiempo_max',render : (d) => `${d}` },
- { 'data': 'precio_hora',render : (d) => `${d}` },
- { 'data': 'total_min',render : (d) => `${d}` },
- { 'data': 'margen',render : (d) => `${d}` },
- {
- data: actionBtns,
- className: 'row-edit dt-center'
- }
- ],
- columnDefs: [
- {
- orderable: false,
- searchable: false,
- targets: [lastColNr3]
- },
- {"orderData": [ 0, 1 ], "targets": 0 },
+ ajax: $.fn.dataTable.pipeline({
+ url: '= route_to('dataTableOfTarifaEncuadernacionLineasHoras') ?>',
+ data: function (d) {
+ d.tirada_id = selected_tirada_id;
+ },
+ method: 'POST',
+ headers: { 'X-Requested-With': 'XMLHttpRequest' },
+ async: true,
+ }),
+ columns: [
+ { 'data': 'id' },
+ { 'data': 'tiempo_min', render: (d) => `${d}` },
+ { 'data': 'tiempo_max', render: (d) => `${d}` },
+ { 'data': 'precio_hora', render: (d) => `${d}` },
+ { 'data': 'total_min', render: (d) => `${d}` },
+ { 'data': 'margen', render: (d) => `${d}` },
+ {
+ data: actionBtns,
+ className: 'row-edit dt-center'
+ }
+ ],
+ columnDefs: [
+ {
+ orderable: false,
+ searchable: false,
+ targets: [lastColNr3]
+ },
+ { "orderData": [0, 1], "targets": 0 },
- ],
- language: {
- url: "/themes/vuexy/vendor/libs/datatables-sk/plugins/i18n/es-ES.json"
- },
- buttons: [
- {
- extend: 'collection',
- text: 'Exportar',
- buttons:[
- 'copy', 'csv', 'excel', 'print', {
- extend: 'pdfHtml5',
- orientation: 'landscape',
- pageSize: 'A4'
- }
- ]
- },
- {
- className: 'btn btn-primary float-end me-sm-3 me-1',
- extend: "createInline",
- editor: editor3,
- formOptions: {
+ ],
+ language: {
+ url: "/themes/vuexy/vendor/libs/datatables-sk/plugins/i18n/es-ES.json"
+ },
+ buttons: [
+ {
+ extend: 'collection',
+ text: 'Exportar',
+ buttons: [
+ 'copy', 'csv', 'excel', 'print', {
+ extend: 'pdfHtml5',
+ orientation: 'landscape',
+ pageSize: 'A4'
+ }
+ ]
+ },
+ {
+ className: 'btn btn-primary float-end me-sm-3 me-1',
+ extend: "createInline",
+ editor: editor3,
+ formOptions: {
+ submitTrigger: -1,
+ submitHtml: ''
+
+ },
+ action: function (e, dt, node, config) {
+ if (selected_tirada_id == -1) {
+ popErrorAlert("= lang('TarifaEncuadernacionLineas.validation.error_seleccion_tiradas') ?>");
+ }
+ else {
+ formOptions = {
submitTrigger: -1,
submitHtml: ''
- },
- action: function ( e, dt, node, config ) {
- if(selected_tirada_id == -1){
- popErrorAlert("= lang('TarifaEncuadernacionLineas.validation.error_seleccion_tiradas') ?>");
- }
- else{
- formOptions= {
+ };
+ editor3.inlineCreate(config.position, formOptions);
+ }
+ },
+ }
+ ]
+});
+
+
+// Activate an inline edit on click of a table cell
+$('#tableOfTarifaencuadernacionlineasHoras').on('click', 'tbody span.edit', function (e) {
+ editor3.inline(
+ theTable3.cells(this.parentNode.parentNode, '*').nodes(),
+ {
+ cancelHtml: '',
+ cancelTrigger: 'span.cancel',
+ submitHtml: '',
+ submitTrigger: 'span.edit',
+ submit: 'allIfChanged'
+ }
+ );
+});
+
+// Delete row
+function remove_lineas_horas(dataId, row) {
+
+ $.ajax({
+ url: `/tarifas/tarifaencuadernacionlineashoras/delete/${dataId}`,
+ method: 'GET',
+ }).done((data, textStatus, jqXHR) => {
+ $('#confirm2delete').modal('toggle');
+ theTable3.clearPipeline();
+ theTable3.row($(row)).invalidate().draw();
+ popSuccessAlert(data.msg ?? jqXHR.statusText);
+ }).fail((jqXHR, textStatus, errorThrown) => {
+ popErrorAlert(jqXHR.responseJSON.messages.error)
+ });
+
+}
+
+= $this->endSection() ?>
+
+
+
+
+
+= $this->section("additionalInlineJs") ?>
+
+const lastColNr = $('#tableOfTarifaencuadernacionlineas').find("tr:first th").length - 1;
+
+var editor = new $.fn.dataTable.Editor({
+ ajax: {
+ url: "= route_to('editorOfTarifaEncuadernacionLineas') ?>",
+ headers: {
+ = csrf_token() ?? "token" ?> : = csrf_token() ?> v,
+ },
+ },
+ table : "#tableOfTarifaencuadernacionlineas",
+ idSrc: 'id',
+ fields: [
+ {
+ name: "id",
+ "type": "readonly"
+ },
+ {
+ name: "dimensiones_id",
+ "type": "select"
+ },
+ {
+ name: "paginas_libro_min",
+ attr: {
+ type: "text",
+ name: "paginas_libro_min",
+ class: "autonumeric"
+ }
+ }, {
+ name: "precio_min",
+ attr: {
+ type: "text",
+ name: "precio_min",
+ class: "autonumeric"
+ }
+ }, {
+ name: "paginas_libro_max",
+ attr: {
+ type: "text",
+ name: "paginas_libro_max",
+ class: "autonumeric"
+ }
+ }, {
+ name: "precio_max",
+ attr: {
+ type: "text",
+ name: "precio_min",
+ class: "autonumeric"
+ }
+ }, {
+ name: "total_min",
+ attr: {
+ type: "text",
+ name: "total_min",
+ class: "autonumeric"
+ }
+ }, {
+ name: "margen",
+ attr: {
+ type: "text",
+ name: "margen",
+ class: "autonumeric"
+ }
+ }, {
+ "name": "tirada_encuadernacion_id",
+ "type": "hidden"
+ }, {
+ "name": "deleted_at",
+ "type": "hidden"
+ }, {
+ "name": "is_deleted",
+ "type": "hidden"
+ },
+]
+ } );
+
+// Generación de la lista de proveedores (id, nombre) para encuadernación
+const dimensionesList = php echo json_encode($dimensiones); ?>;
+editor.field('dimensiones_id').update(dimensionesList);
+editor.on('open', (event) => {
+ $("input.autonumeric").each(function () {
+ let autoNumericInstance = AutoNumeric.getAutoNumericElement(this)
+ if (autoNumericInstance) {
+ autoNumericInstance.remove()
+
+ }
+ new AutoNumeric(this, {
+ alwaysAllowDecimalCharacter: true,
+ decimalCharacter: ",",
+ decimalPlaces: 2,
+ allowDecimalPadding: 'floats',
+ digitGroupSeparator: ".",
+ unformatOnSubmit: true,
+ });
+ })
+})
+editor.on('preSubmit', function (e, d, type) {
+ if (d.data) {
+ Object.keys(d.data).forEach(function (key) {
+ // Find all elements with class .autonumeric
+ $("input.autonumeric").each(function () {
+ let autoNumericInstance = AutoNumeric.getAutoNumericElement(this)
+ if (autoNumericInstance) {
+ // Get raw value and update the corresponding field
+ let rawValue = autoNumericInstance.getNumericString();
+ d.data[key][this.name] = rawValue; // Ensure the correct name attribute is used
+ }
+ });
+ });
+ }
+ if (type === 'create') {
+ d.data[0]['tirada_encuadernacion_id'] = selected_tirada_id;
+ }
+ else if (type === 'edit') {
+ for (v in d.data) {
+ d.data[v]['tirada_encuadernacion_id'] = selected_tirada_id;
+ }
+ }
+});
+
+
+editor.on('postSubmit', function (e, json, data, action) {
+
+ yeniden(json.= csrf_token() ?>);
+});
+
+
+editor.on('submitSuccess', function (e, json, data, action) {
+
+ theTable.clearPipeline();
+ theTable.draw();
+});
+
+
+var theTable = $('#tableOfTarifaencuadernacionlineas').DataTable({
+ draw: 2,
+ serverSide: true,
+ processing: true,
+ autoWidth: true,
+ responsive: true,
+ lengthMenu: [5, 10, 25],
+ order: [[0, "asc"], [1, "asc"]],
+ pageLength: 10,
+ lengthChange: true,
+ searching: false,
+ paging: true,
+ info: false,
+ dom: '<"mt-4"><"float-end"B><"float-start"l><"mt-4 mb-3"p>',
+ ajax: $.fn.dataTable.pipeline({
+ url: '= route_to('dataTableOfTarifaEncuadernacionLineas') ?>',
+ data: function (d) {
+ d.tirada_id = selected_tirada_id;
+ },
+ method: 'POST',
+ headers: { 'X-Requested-With': 'XMLHttpRequest' },
+ async: true,
+ }),
+ columns: [
+ { 'data': 'id' },
+ {
+ 'data': 'dimensiones_id',
+ render: function (data, type, row, meta) {
+ var value = dimensionesList.find(element => element.value === data);
+ return value['label'];
+ },
+ },
+ { 'data': 'paginas_libro_min', render: (d) => `${d}` },
+ { 'data': 'precio_max', render: (d) => `${d}` },
+ { 'data': 'paginas_libro_max', render: (d) => `${d}` },
+ { 'data': 'precio_min', render: (d) => `${d}` },
+ { 'data': 'total_min', render: (d) => `${d}` },
+ { 'data': 'margen', render: (d) => `${d}` },
+ {
+ data: actionBtns,
+ className: 'row-edit dt-center'
+ }
+ ],
+ columnDefs: [
+ {
+ orderable: false,
+ searchable: false,
+ targets: [lastColNr]
+ },
+ { "orderData": [0, 1], "targets": 0 },
+
+ ],
+ language: {
+ url: "/themes/vuexy/vendor/libs/datatables-sk/plugins/i18n/es-ES.json"
+ },
+ buttons: [
+ {
+ extend: 'collection',
+ text: 'Exportar',
+ buttons: [
+ 'copy', 'csv', 'excel', 'print', {
+ extend: 'pdfHtml5',
+ orientation: 'landscape',
+ pageSize: 'A4'
+ }
+ ]
+ },
+ {
+ className: 'btn btn-primary float-end me-sm-3 me-1',
+ extend: "createInline",
+ editor: editor,
+ formOptions: {
+ submitTrigger: -1,
+ submitHtml: ''
+
+ },
+ action: function (e, dt, node, config) {
+ if (selected_tirada_id == -1) {
+ popErrorAlert("= lang('TarifaEncuadernacionLineas.validation.error_seleccion_tiradas') ?>");
+ }
+ else {
+ formOptions = {
submitTrigger: -1,
submitHtml: ''
- };
- editor3.inlineCreate(config.position, formOptions);
- }
- },
- }
- ]
- } );
+ };
+ editor.inlineCreate(config.position, formOptions);
+ }
+ },
+ }
+ ]
+});
- // Activate an inline edit on click of a table cell
- $('#tableOfTarifaencuadernacionlineasHoras').on( 'click', 'tbody span.edit', function (e) {
- editor3.inline(
- theTable3.cells(this.parentNode.parentNode, '*').nodes(),
- {
- cancelHtml: '',
- cancelTrigger: 'span.cancel',
- submitHtml: '',
- submitTrigger: 'span.edit',
- submit: 'allIfChanged'
- }
- );
- } );
+// Activate an inline edit on click of a table cell
+$('#tableOfTarifaencuadernacionlineas').on('click', 'tbody span.edit', function (e) {
+ editor.inline(
+ theTable.cells(this.parentNode.parentNode, '*').nodes(),
+ {
+ cancelHtml: '',
+ cancelTrigger: 'span.cancel',
+ submitHtml: '',
+ submitTrigger: 'span.edit',
+ submit: 'allIfChanged'
+ }
+ );
+});
- // Delete row
- function remove_lineas_horas(dataId, row){
+// Delete row
+function remove_lineas(dataId, row) {
- $.ajax({
- url: `/tarifas/tarifaencuadernacionlineashoras/delete/${dataId}`,
- method: 'GET',
- }).done((data, textStatus, jqXHR) => {
- $('#confirm2delete').modal('toggle');
- theTable3.clearPipeline();
- theTable3.row($(row)).invalidate().draw();
- popSuccessAlert(data.msg ?? jqXHR.statusText);
- }).fail((jqXHR, textStatus, errorThrown) => {
- popErrorAlert(jqXHR.responseJSON.messages.error)
- });
+ $.ajax({
+ url: `/tarifas/tarifaencuadernacionlineas/delete/${dataId}`,
+ method: 'GET',
+ }).done((data, textStatus, jqXHR) => {
+ $('#confirm2delete').modal('toggle');
+ theTable.clearPipeline();
+ theTable.row($(row)).invalidate().draw();
+ popSuccessAlert(data.msg ?? jqXHR.statusText);
+ }).fail((jqXHR, textStatus, errorThrown) => {
+ popErrorAlert(jqXHR.responseJSON.messages.error)
+ });
- }
+}
+= $this->endSection() ?>
- = $this->endSection() ?>
+
+
+
+= $this->section("additionalInlineJs") ?>
+// Definicion de la ultima columna de la tabla
+const lastColNr2 = $('#tableOfTarifaencuadernaciontiradas').find("tr:first th").length - 1;
-
-
-
- = $this->section("additionalInlineJs") ?>
-
- const lastColNr = $('#tableOfTarifaencuadernacionlineas').find("tr:first th").length - 1;
-
- var editor = new $.fn.dataTable.Editor( {
- ajax: {
- url: "= route_to('editorOfTarifaEncuadernacionLineas') ?>",
- headers: {
- = csrf_token() ?? "token" ?> : = csrf_token() ?>v,
- },
- },
- table : "#tableOfTarifaencuadernacionlineas",
- idSrc: 'id',
- fields: [
- {name: "id",
- "type": "readonly"},
- {
- name: "dimensiones_id",
- "type": "select"
- },
- {
- name: "paginas_libro_min",
- attr: {
- type: "text",
- name : "paginas_libro_min",
- class :"autonumeric"
- }
- }, {
- name: "precio_min",
- attr: {
- type: "text",
- name : "precio_min",
- class :"autonumeric"
- }
- }, {
- name: "paginas_libro_max",
- attr: {
- type: "text",
- name : "paginas_libro_max",
- class :"autonumeric"
- }
- }, {
- name: "precio_max",
- attr: {
- type: "text",
- name : "precio_min",
- class :"autonumeric"
- }
- }, {
- name: "total_min",
- attr: {
- type: "text",
- name : "total_min",
- class :"autonumeric"
- }
- }, {
- name: "margen",
- attr: {
- type: "text",
- name : "margen",
- class :"autonumeric"
- }
- }, {
- "name": "tirada_encuadernacion_id",
- "type": "hidden"
- },{
- "name": "deleted_at",
- "type": "hidden"
- },{
- "name": "is_deleted",
- "type": "hidden"
- },
- ]
- } );
-
- // Generación de la lista de proveedores (id, nombre) para encuadernación
- const dimensionesList = ;
- editor.field( 'dimensiones_id' ).update( dimensionesList );
- editor.on('open',(event)=>{
- $("input.autonumeric").each(function () {
- let autoNumericInstance = AutoNumeric.getAutoNumericElement(this)
- if(autoNumericInstance){
- autoNumericInstance.remove()
-
- }
- new AutoNumeric(this, {
- alwaysAllowDecimalCharacter: true,
- decimalCharacter: ",",
- decimalPlaces : 2,
- allowDecimalPadding : 'floats',
- digitGroupSeparator: ".",
- unformatOnSubmit : true,
- });
- })
- })
- editor.on( 'preSubmit', function ( e, d, type ) {
- if (d.data) {
- Object.keys(d.data).forEach(function (key) {
- // Find all elements with class .autonumeric
- $("input.autonumeric").each(function () {
- let autoNumericInstance = AutoNumeric.getAutoNumericElement(this)
- if (autoNumericInstance) {
- // Get raw value and update the corresponding field
- let rawValue = autoNumericInstance.getNumericString();
- d.data[key][this.name] = rawValue; // Ensure the correct name attribute is used
- }
- });
- });
- }
- if ( type === 'create'){
- d.data[0]['tirada_encuadernacion_id'] = selected_tirada_id;
- }
- else if(type === 'edit' ) {
- for (v in d.data){
- d.data[v]['tirada_encuadernacion_id'] = selected_tirada_id;
- }
- }
- });
-
-
- editor.on( 'postSubmit', function ( e, json, data, action ) {
-
- yeniden(json.= csrf_token() ?>);
- });
-
-
- editor.on( 'submitSuccess', function ( e, json, data, action ) {
-
- theTable.clearPipeline();
- theTable.draw();
- });
-
-
- var theTable = $('#tableOfTarifaencuadernacionlineas').DataTable( {
- draw:2,
- serverSide: true,
- processing: true,
- autoWidth: true,
- responsive: true,
- lengthMenu: [ 5, 10, 25],
- order: [[ 0, "asc" ], [ 1, "asc" ]],
- pageLength: 10,
- lengthChange: true,
- searching: false,
- paging: true,
- info: false,
- dom: '<"mt-4"><"float-end"B><"float-start"l><"mt-4 mb-3"p>',
- ajax : $.fn.dataTable.pipeline( {
- url: '= route_to('dataTableOfTarifaEncuadernacionLineas') ?>',
- data: function ( d ) {
- d.tirada_id = selected_tirada_id;
- },
- method: 'POST',
- headers: {'X-Requested-With': 'XMLHttpRequest'},
- async: true,
- }),
- columns: [
- { 'data': 'id' },
- { 'data': 'dimensiones_id',
- render: function(data, type, row, meta) {
- var value = dimensionesList.find(element => element.value === data);
- return value['label'];
- },
- },
- { 'data': 'paginas_libro_min',render : (d) => `${d}` },
- { 'data': 'precio_max',render : (d) => `${d}` },
- { 'data': 'paginas_libro_max',render : (d) => `${d}` },
- { 'data': 'precio_min',render : (d) => `${d}` },
- { 'data': 'total_min',render : (d) => `${d}` },
- { 'data': 'margen' ,render : (d) => `${d}`},
- {
- data: actionBtns,
- className: 'row-edit dt-center'
- }
- ],
- columnDefs: [
- {
- orderable: false,
- searchable: false,
- targets: [lastColNr]
- },
- {"orderData": [ 0, 1 ], "targets": 0 },
-
- ],
- language: {
- url: "/themes/vuexy/vendor/libs/datatables-sk/plugins/i18n/es-ES.json"
- },
- buttons: [
- {
- extend: 'collection',
- text: 'Exportar',
- buttons:[
- 'copy', 'csv', 'excel', 'print', {
- extend: 'pdfHtml5',
- orientation: 'landscape',
- pageSize: 'A4'
- }
- ]
- },
- {
- className: 'btn btn-primary float-end me-sm-3 me-1',
- extend: "createInline",
- editor: editor,
- formOptions: {
- submitTrigger: -1,
- submitHtml: ''
-
- },
- action: function ( e, dt, node, config ) {
- if(selected_tirada_id == -1){
- popErrorAlert("= lang('TarifaEncuadernacionLineas.validation.error_seleccion_tiradas') ?>");
- }
- else{
- formOptions= {
- submitTrigger: -1,
- submitHtml: ''
-
- };
- editor.inlineCreate(config.position, formOptions);
- }
- },
- }
- ]
+// Datatables Editor
+var editor2 = new $.fn.dataTable.Editor({
+ ajax: {
+ url: "= route_to('editorOfTarifaEncuadernacionTiradas') ?>",
+ headers: {
+ = csrf_token() ?? "token" ?> : = csrf_token() ?> v,
+ },
+ },
+ table : "#tableOfTarifaencuadernaciontiradas",
+ idSrc: 'id',
+ fields: [{
+ name: "proveedor_id",
+ "type": "select"
+ }, {
+ name: "tirada_min",
+ attr: {
+ type: "text",
+ name: "tirada_min",
+ class: "autonumeric"
+ }
+ }, {
+ name: "tirada_max",
+ attr: {
+ type: "text",
+ name: "tirada_max",
+ class: "autonumeric"
+ }
+ }, {
+ name: "importe_fijo",
+ attr: {
+ type: "text",
+ name: "importe_fijo",
+ class: "autonumeric"
+ }
+ }, {
+ "name": "tarifa_encuadernacion_id",
+ "type": "hidden"
+ }, {
+ name: "proveedor",
+ "type": "hidden"
+ }, {
+ "name": "deleted_at",
+ "type": "hidden"
+ }, {
+ "name": "is_deleted",
+ "type": "hidden"
+ },
+]
} );
- // Activate an inline edit on click of a table cell
- $('#tableOfTarifaencuadernacionlineas').on( 'click', 'tbody span.edit', function (e) {
- editor.inline(
- theTable.cells(this.parentNode.parentNode, '*').nodes(),
- {
- cancelHtml: '',
- cancelTrigger: 'span.cancel',
- submitHtml: '',
- submitTrigger: 'span.edit',
- submit: 'allIfChanged'
- }
- );
- } );
-
- // Delete row
- function remove_lineas(dataId, row){
+// Generación de la lista de proveedores (id, nombre) para encuadernación
+const suppliersList = php echo json_encode($proveedores); ?>;
+editor2.field('proveedor_id').update(suppliersList);
- $.ajax({
- url: `/tarifas/tarifaencuadernacionlineas/delete/${dataId}`,
- method: 'GET',
- }).done((data, textStatus, jqXHR) => {
- $('#confirm2delete').modal('toggle');
- theTable.clearPipeline();
- theTable.row($(row)).invalidate().draw();
- popSuccessAlert(data.msg ?? jqXHR.statusText);
- }).fail((jqXHR, textStatus, errorThrown) => {
- popErrorAlert(jqXHR.responseJSON.messages.error)
- });
+editor2.on('open', (event) => {
+ $("input.autonumeric").each(function () {
+ let autoNumericInstance = AutoNumeric.getAutoNumericElement(this)
+ if (autoNumericInstance) {
+ autoNumericInstance.remove()
- }
+ }
+ new AutoNumeric(this, {
+ decimalCharacter: ",",
+ digitGroupSeparator: ".",
+ allowDecimalPadding: 'floats',
+ decimalPlaces: 2,
+ unformatOnSubmit: true,
+ });
+ })
+})
+editor2.on('preSubmit', (e, d, type) => {
+ if (d.data) {
+ Object.keys(d.data).forEach(function (key) {
+ // Find all elements with class .autonumeric
+ $("input.autonumeric").each(function () {
+ let autoNumericInstance = AutoNumeric.getAutoNumericElement(this)
+ if (autoNumericInstance) {
+ // Get raw value and update the corresponding field
+ let rawValue = autoNumericInstance.getNumericString();
+ d.data[key][this.name] = rawValue; // Ensure the correct name attribute is used
+ }
+ });
+ });
+ }
+})
+editor2.on('preSubmit', function (e, d, type) {
+ if (type === 'create') {
+ d.data[0]['tarifa_encuadernacion_id'] = id;
+ }
+ else if (type === 'edit') {
+ for (v in d.data) {
+ d.data[v]['tarifa_encuadernacion_id'] = id;
+ }
+ }
+});
+editor2.on('postSubmit', function (e, json, data, action) {
- = $this->endSection() ?>
-
-
-
-
- = $this->section("additionalInlineJs") ?>
-
- // Definicion de la ultima columna de la tabla
- const lastColNr2 = $('#tableOfTarifaencuadernaciontiradas').find("tr:first th").length - 1;
+ yeniden(json.= csrf_token() ?>);
+});
- // Datatables Editor
- var editor2 = new $.fn.dataTable.Editor( {
- ajax: {
- url: "= route_to('editorOfTarifaEncuadernacionTiradas') ?>",
- headers: {
- = csrf_token() ?? "token" ?> : = csrf_token() ?>v,
- },
- },
- table : "#tableOfTarifaencuadernaciontiradas",
- idSrc: 'id',
- fields: [ {
- name: "proveedor_id",
- "type": "select"
- }, {
- name: "tirada_min",
- attr: {
- type: "text",
- name : "tirada_min",
- class :"autonumeric"
- }
- }, {
- name: "tirada_max",
- attr: {
- type: "text",
- name : "tirada_max",
- class :"autonumeric"
- }
- }, {
- name: "importe_fijo",
- attr: {
- type: "text",
- name : "importe_fijo",
- class :"autonumeric"
- }
- }, {
- "name": "tarifa_encuadernacion_id",
- "type": "hidden"
- },{
- name: "proveedor",
- "type": "hidden"
- }, {
- "name": "deleted_at",
- "type": "hidden"
- },{
- "name": "is_deleted",
- "type": "hidden"
- },
- ]
- } );
+editor2.on('submitSuccess', function (e, json, data, action) {
+
+ theTable2.clearPipeline();
+ theTable2.draw();
+});
- // Generación de la lista de proveedores (id, nombre) para encuadernación
- const suppliersList = ;
- editor2.field( 'proveedor_id' ).update( suppliersList );
+// Tabla de tiradas
+var theTable2 = $('#tableOfTarifaencuadernaciontiradas').DataTable({
+ draw: 1,
+ serverSide: true,
+ processing: true,
+ autoWidth: true,
+ responsive: true,
+ lengthMenu: [5, 10, 25],
+ order: [0, "asc"],
+ pageLength: 10,
+ lengthChange: true,
+ searching: false,
+ paging: true,
+ select: true,
+ info: false,
+ dom: '<"mt-4"><"float-end"B><"float-start"l><"mt-4 mb-3"p>',
+ ajax: $.fn.dataTable.pipeline({
+ url: '= route_to('dataTableOfTarifaEncuadernacionTiradas') ?>',
+ data: {
+ id_tarifaencuadernacion: id,
+ },
+ method: 'POST',
+ headers: { 'X-Requested-With': 'XMLHttpRequest' },
+ async: true,
+ }),
+ columns: [
+ {
+ 'data': 'proveedor_id',
+ render: function (data, type, row, meta) {
+ var value = suppliersList.find(element => element.value === data);
+ return value['label'];
+ },
+ },
+ { 'data': 'tirada_min', render: (d) => `${d}` },
+ { 'data': 'tirada_max', render: (d) => `${d}` },
+ { 'data': 'importe_fijo', render: (d) => `${d}` },
+ {
+ data: actionBtns,
+ className: 'row-edit dt-center'
+ }
+ ],
+ columnDefs: [
+ {
+ orderable: false,
+ searchable: false,
+ targets: [lastColNr2]
+ },
- editor2.on('open', (event) => {
- $("input.autonumeric").each(function () {
- let autoNumericInstance = AutoNumeric.getAutoNumericElement(this)
- if (autoNumericInstance) {
- autoNumericInstance.remove()
-
- }
- new AutoNumeric(this, {
- decimalCharacter: ",",
- digitGroupSeparator: ".",
- allowDecimalPadding : 'floats',
- decimalPlaces: 2,
- unformatOnSubmit: true,
- });
- })
- })
- editor2.on('preSubmit', (e, d, type) => {
- if (d.data) {
- Object.keys(d.data).forEach(function (key) {
- // Find all elements with class .autonumeric
- $("input.autonumeric").each(function () {
- let autoNumericInstance = AutoNumeric.getAutoNumericElement(this)
- if (autoNumericInstance) {
- // Get raw value and update the corresponding field
- let rawValue = autoNumericInstance.getNumericString();
- d.data[key][this.name] = rawValue; // Ensure the correct name attribute is used
- }
- });
- });
- }
- })
- editor2.on( 'preSubmit', function ( e, d, type ) {
- if ( type === 'create'){
- d.data[0]['tarifa_encuadernacion_id'] = id;
- }
- else if(type === 'edit' ) {
- for (v in d.data){
- d.data[v]['tarifa_encuadernacion_id'] = id;
- }
- }
- });
+ ],
+ language: {
+ url: "/themes/vuexy/vendor/libs/datatables-sk/plugins/i18n/es-ES.json"
+ },
+ buttons: [
+ {
+ extend: 'collection',
+ text: 'Exportar',
+ buttons: [
+ 'copy', 'csv', 'excel', 'print', {
+ extend: 'pdfHtml5',
+ orientation: 'landscape',
+ pageSize: 'A4'
+ }
+ ]
+ },
+ {
+ className: 'btn btn-primary float-end me-sm-3 me-1',
+ extend: "createInline",
+ editor: editor2,
+ formOptions: {
+ submitTrigger: -1,
+ submitHtml: ''
+ }
+ }]
+});
- editor2.on( 'postSubmit', function ( e, json, data, action ) {
+// Obtener la id de la fila seleccionada o ponerla a -1 cuando no haya ninguna seleccionada
+var selected_tirada_id = -1;
+theTable2.on('select', function (e, dt, type, indexes) {
+ if (type === 'row') {
- yeniden(json.= csrf_token() ?>);
- });
+ selected_tirada_id = parseInt(theTable2.rows(indexes).data().pluck('id')[0]);
+ if ($('#por_horas').is(':checked')) {
+ theTable3.clearPipeline();
+ theTable3.draw();
+ }
+ else {
+ theTable.clearPipeline();
+ theTable.draw();
+ }
+ }
+});
+
+theTable2.on('deselect', function (e, dt, type, indexes) {
+ if (theTable2.rows('.selected').count() == 0) {
+ selected_tirada_id = -1;
+ if ($('#por_horas').is(':checked')) {
+ theTable3.clearPipeline();
+ theTable3.draw();
+ }
+ else {
+ theTable.clearPipeline();
+ theTable.draw();
+ }
+ }
+});
- editor2.on( 'submitSuccess', function ( e, json, data, action ) {
-
- theTable2.clearPipeline();
- theTable2.draw();
- });
+// Activate an inline edit on click of a table cell
+$('#tableOfTarifaencuadernaciontiradas').on('click', 'tbody span.edit', function (e) {
+ editor2.inline(
+ theTable2.cells(this.parentNode.parentNode, '*').nodes(),
+ {
+ cancelHtml: '',
+ cancelTrigger: 'span.cancel',
+ submitHtml: '',
+ submitTrigger: 'span.edit',
+ submit: 'allIfChanged'
+ }
+ );
+});
- // Tabla de tiradas
- var theTable2 = $('#tableOfTarifaencuadernaciontiradas').DataTable( {
- draw:1,
- serverSide: true,
- processing: true,
- autoWidth: true,
- responsive: true,
- lengthMenu: [ 5, 10, 25],
- order: [ 0, "asc" ],
- pageLength: 10,
- lengthChange: true,
- searching: false,
- paging: true,
- select: true,
- info: false,
- dom: '<"mt-4"><"float-end"B><"float-start"l><"mt-4 mb-3"p>',
- ajax : $.fn.dataTable.pipeline( {
- url: '= route_to('dataTableOfTarifaEncuadernacionTiradas') ?>',
- data: {
- id_tarifaencuadernacion: id,
- },
- method: 'POST',
- headers: {'X-Requested-With': 'XMLHttpRequest'},
- async: true,
- }),
- columns: [
- { 'data': 'proveedor_id',
- render: function(data, type, row, meta) {
- var value = suppliersList.find(element => element.value === data);
- return value['label'];
- },
- },
- { 'data': 'tirada_min',render : (d) => `${d}` },
- { 'data': 'tirada_max',render : (d) => `${d}` },
- { 'data': 'importe_fijo',render : (d) => `${d}` },
- {
- data: actionBtns,
- className: 'row-edit dt-center'
- }
- ],
- columnDefs: [
- {
- orderable: false,
- searchable: false,
- targets: [lastColNr2]
- },
+// Delete row
+function remove_tiradas(dataId, row) {
- ],
- language: {
- url: "/themes/vuexy/vendor/libs/datatables-sk/plugins/i18n/es-ES.json"
- },
- buttons: [
- {
- extend: 'collection',
- text: 'Exportar',
- buttons:[
- 'copy', 'csv', 'excel', 'print', {
- extend: 'pdfHtml5',
- orientation: 'landscape',
- pageSize: 'A4'
- }
- ]
- },
- {
- className: 'btn btn-primary float-end me-sm-3 me-1',
- extend: "createInline",
- editor: editor2,
- formOptions: {
- submitTrigger: -1,
- submitHtml: ''
- }
- } ]
- } );
+ $.ajax({
+ url: `/tarifas/tarifaencuadernaciontiradas/delete/${dataId}`,
+ method: 'GET',
+ }).done((data, textStatus, jqXHR) => {
+ $('#confirm2delete').modal('toggle');
+ theTable2.clearPipeline();
+ theTable2.row($(row)).invalidate().draw();
+ theTable.clearPipeline();
+ theTable.draw();
+ popSuccessAlert(data.msg ?? jqXHR.statusText);
+ }).fail((jqXHR, textStatus, errorThrown) => {
+ popErrorAlert(jqXHR.statusText)
+ });
+}
+
+= $this->endSection() ?>
+
+
+
+= $this->section('css') ?>
+
+">
+= $this->endSection() ?>
- // Obtener la id de la fila seleccionada o ponerla a -1 cuando no haya ninguna seleccionada
- var selected_tirada_id = -1;
- theTable2.on( 'select', function ( e, dt, type, indexes ) {
- if ( type === 'row' ) {
-
- selected_tirada_id = parseInt(theTable2.rows( indexes ).data().pluck( 'id' )[0]);
- if($('#por_horas').is(':checked')){
- theTable3.clearPipeline();
- theTable3.draw();
- }
- else{
- theTable.clearPipeline();
- theTable.draw();
- }
- }
- } );
-
- theTable2.on( 'deselect', function ( e, dt, type, indexes ) {
- if ( theTable2.rows( '.selected' ).count() == 0 ) {
- selected_tirada_id = -1;
- if($('#por_horas').is(':checked')){
- theTable3.clearPipeline();
- theTable3.draw();
- }
- else{
- theTable.clearPipeline();
- theTable.draw();
- }
- }
- } );
-
-
- // Activate an inline edit on click of a table cell
- $('#tableOfTarifaencuadernaciontiradas').on( 'click', 'tbody span.edit', function (e) {
- editor2.inline(
- theTable2.cells(this.parentNode.parentNode, '*').nodes(),
- {
- cancelHtml: '',
- cancelTrigger: 'span.cancel',
- submitHtml: '',
- submitTrigger: 'span.edit',
- submit: 'allIfChanged'
- }
- );
- } );
-
-
- // Delete row
- function remove_tiradas(dataId, row){
-
- $.ajax({
- url: `/tarifas/tarifaencuadernaciontiradas/delete/${dataId}`,
- method: 'GET',
- }).done((data, textStatus, jqXHR) => {
- $('#confirm2delete').modal('toggle');
- theTable2.clearPipeline();
- theTable2.row($(row)).invalidate().draw();
- theTable.clearPipeline();
- theTable.draw();
- popSuccessAlert(data.msg ?? jqXHR.statusText);
- }).fail((jqXHR, textStatus, errorThrown) => {
- popErrorAlert(jqXHR.statusText)
- });
- }
-
- = $this->endSection() ?>
-
-
-
- = $this->section('css') ?>
-
- ">
- = $this->endSection() ?>
-
-
- = $this->section('additionalExternalJs') ?>
-
-
-
-
-
-
-
-
-
- = $this->endSection() ?>
\ No newline at end of file
+= $this->section('additionalExternalJs') ?>
+
+
+
+
+
+
+
+
+
+= $this->endSection() ?>
\ No newline at end of file
diff --git a/ci4/app/Views/themes/vuexy/main/menus/pedidos_menu.php b/ci4/app/Views/themes/vuexy/main/menus/pedidos_menu.php
index 7601ec50..e3960862 100644
--- a/ci4/app/Views/themes/vuexy/main/menus/pedidos_menu.php
+++ b/ci4/app/Views/themes/vuexy/main/menus/pedidos_menu.php
@@ -16,6 +16,13 @@ if (
= lang("App.menu_pedidos") ?>