Merge branch 'main' into 'dev/delete-ui'

# Conflicts:
#   ci4/app/Controllers/Tarifas/Tarifaacabado.php
#   ci4/app/Views/themes/backend/vuexy/form/configuracion/maquinas/viewMaquinaList.php
#   ci4/app/Views/themes/backend/vuexy/form/tarifas/acabado/viewTarifaAcabadoList.php
#   ci4/app/Views/themes/backend/vuexy/form/tarifas/preimpresion/viewTarifapreimpresionList.php
This commit is contained in:
Ignacio Martinez Navajas
2023-07-24 12:59:19 +00:00
67 changed files with 2210 additions and 355 deletions

View File

@ -69,7 +69,7 @@
<div class="card accordion-item active">
<h2 class="accordion-header" id="headingOne">
<button type="button" class="accordion-button" data-bs-toggle="collapse" data-bs-target="#accordionTip2" aria-expanded="false" aria-controls="accordionTip2">
<h3><?= lang("MaquinasTarifasImpresions.moduleTitle") ?></h3>
<h3><?= lang("MaquinasPapelImpresion.papel_impresion_maquinas") ?></h3>
</button>
</h2>

View File

@ -19,15 +19,9 @@
<thead>
<tr>
<th><?= lang('Maquinas.nombre') ?></th>
<th><?= lang('Maquinas.padreId') ?></th>
<th><?= lang('Maquinas.tipo') ?></th>
<th><?= lang('Maquinas.velocidad') ?></th>
<th><?= lang('Maquinas.duracionJornada') ?></th>
<th><?= lang('Maquinas.ancho') ?></th>
<th><?= lang('Maquinas.alto') ?></th>
<th><?= lang('Maquinas.anchoImpresion') ?></th>
<th><?= lang('Maquinas.anchoImpresion') ?></th>
<th><?= lang('Maquinas.altoImpresion') ?></th>
<th><?= lang('Maquinas.ordenPlanning') ?></th>
<th><?= lang('Maquinas.min') ?></th>
<th><?= lang('Maquinas.max') ?></th>
<th class="text-nowrap"><?= lang('Basic.global.Action') ?></th>
@ -77,40 +71,34 @@
pageSize: 'A4'
}
],
stateSave: true,
order: [[0, 'asc']],
language: {
url: "//cdn.datatables.net/plug-ins/1.13.4/i18n/<?= config('Basics')->i18n ?>.json"
},
ajax : $.fn.dataTable.pipeline( {
url: '<?= route_to('dataTableOfMaquinas') ?>',
method: 'POST',
headers: {'X-Requested-With': 'XMLHttpRequest'},
async: true,
}),
columnDefs: [
{
orderable: false,
searchable: false,
targets: [lastColNr]
}
],
columns : [
{ 'data': 'nombre' },
{ 'data': 'padre' },
{ 'data': 'tipo' },
{ 'data': 'velocidad' },
{ 'data': 'duracion_jornada' },
{ 'data': 'ancho' },
{ 'data': 'alto' },
{ 'data': 'ancho_impresion' },
{ 'data': 'alto_impresion' },
{ 'data': 'orden_planning' },
{ 'data': 'min' },
{ 'data': 'max' },
{ 'data': actionBtns }
]
});
stateSave: true,
order: [[0, 'asc']],
language: {
url: "//cdn.datatables.net/plug-ins/1.13.4/i18n/<?= config('Basics')->i18n ?>.json"
},
ajax : $.fn.dataTable.pipeline( {
url: '<?= route_to('dataTableOfMaquinas') ?>',
method: 'POST',
headers: {'X-Requested-With': 'XMLHttpRequest'},
async: true,
}),
columnDefs: [
{
orderable: false,
searchable: false,
targets: [lastColNr]
}
],
columns : [
{ 'data': 'nombre' },
{ 'data': 'tipo' },
{ 'data': 'ancho_impresion' },
{ 'data': 'alto_impresion' },
{ 'data': 'min' },
{ 'data': 'max' },
{ 'data': actionBtns }
]
});
theTable.on( 'draw.dt', function () {

View File

@ -118,7 +118,7 @@
});
$(document).on('click', '.btn-edit', function(e) {
window.location.href = `configuracion/maquinasdefecto/edit/${$(this).attr('data-id')}`;
window.location.href = `/configuracion/maquinasdefecto/edit/${$(this).attr('data-id')}`;
});
$(document).on('click', '.btn-delete', function(e) {

View File

@ -44,11 +44,11 @@
<table id="tableOfTarifaacabadolineas" class="table table-striped table-hover" style="width: 100%;">
<thead>
<tr>
<th><?= lang('TarifaAcabadoLineas.tiradaMin') ?></th>
<th><?= lang('TarifaAcabadoLineas.tiradaMax') ?></th>
<th><?= lang('TarifaAcabadoLineas.precioMin') ?></th>
<th><?= lang('TarifaAcabadoLineas.paginasMin') ?></th>
<th><?= lang('TarifaAcabadoLineas.precioMax') ?></th>
<th><?= lang('TarifaAcabadoLineas.precioUnidad') ?></th>
<th><?= lang('TarifaAcabadoLineas.paginasMax') ?></th>
<th><?= lang('TarifaAcabadoLineas.precioMin') ?></th>
<th><?= lang('TarifaAcabadoLineas.margen') ?></th>
<th></th>
</tr>
</thead>
@ -96,16 +96,16 @@
table : "#tableOfTarifaacabadolineas",
idSrc: 'id',
fields: [ {
name: "tirada_min"
}, {
name: "tirada_max"
}, {
name: "precio_min"
name: "paginas_min"
}, {
name: "precio_max"
}, {
name: "precio_unidad"
name: "paginas_max"
}, {
name: "precio_min"
},{
name: "margen"
}, {
"name": "tarifa_acabado_id",
"type": "hidden"
},{
@ -165,11 +165,11 @@
async: true,
}),
columns: [
{ 'data': 'tirada_min' },
{ 'data': 'tirada_max' },
{ 'data': 'precio_min' },
{ 'data': 'paginas_min' },
{ 'data': 'precio_max' },
{ 'data': 'precio_unidad' },
{ 'data': 'paginas_max' },
{ 'data': 'precio_min' },
{ 'data': 'margen' },
{
data: actionBtns,
className: 'row-edit dt-center'

View File

@ -17,6 +17,8 @@
<thead>
<tr>
<th><?= lang('Tarifaacabado.nombre') ?></th>
<th><?= lang('Tarifaacabado.precioMin') ?></th>
<th><?= lang('Tarifaacabado.importeFijo') ?></th>
<th class="text-nowrap"><?= lang('Basic.global.Action') ?></th>
</tr>
</thead>
@ -32,6 +34,7 @@
</div><!--//.col -->
</div><!--//.row -->
<?= $this->endSection() ?>
@ -85,6 +88,8 @@ const lastColNr = $('#tableOfTarifasacabado').find("tr:first th").length - 1;
],
columns : [
{ 'data': 'nombre' },
{ 'data': 'precio_min' },
{ 'data': 'importe_fijo' },
{ 'data': actionBtns }
]
});

View File

@ -0,0 +1,26 @@
<div class="row">
<div class="col-md-12 col-lg-12 px-4">
<div class="mb-3">
<label for="nombre" class="form-label">
<?=lang('Tarifaencuadernacion.nombre') ?>*
</label>
<input type="text" id="nombre" name="nombre" required maxLength="255" class="form-control" value="<?=old('nombre', $tarifaEncuadernacionEntity->nombre) ?>">
</div><!--//.mb-3 -->
<div class="mb-3">
<label for="nombre" class="form-label">
<?=lang('Tarifaencuadernacion.precioMin') ?>*
</label>
<input type="text" id="precio_min" name="precio_min" required class="form-control" value="<?=old('precio_min', $tarifaEncuadernacionEntity->precio_min) ?>">
</div><!--//.mb-3 -->
<div class="mb-3">
<label for="nombre" class="form-label">
<?=lang('Tarifaencuadernacion.importeFijo') ?>*
</label>
<input type="text" id="importe_fijo" name="importe_fijo" required class="form-control" value="<?=old('importe_fijo', $tarifaEncuadernacionEntity->importe_fijo) ?>">
</div><!--//.mb-3 -->
</div><!--//.col -->
</div><!-- //.row -->

View File

@ -0,0 +1,263 @@
<?= $this->include("themes/_commonPartialsBs/datatables") ?>
<?= $this->include("themes/_commonPartialsBs/select2bs5") ?>
<?= $this->include("themes/_commonPartialsBs/sweetalert") ?>
<?= $this->extend('themes/backend/vuexy/main/defaultlayout') ?>
<?= $this->section("content") ?>
<div class="row">
<div class="col-12">
<div class="card card-info">
<div class="card-header">
<h3 class="card-title"><?= $boxTitle ?? $pageTitle ?></h3>
</div><!--//.card-header -->
<form id="tarifaEncuadernacionForm" class="card-body" method="post" action="<?= $formAction ?>">
<?= csrf_field() ?>
<?= view("themes/_commonPartialsBs/_alertBoxes") ?>
<?= !empty($validation->getErrors()) ? $validation->listErrors("bootstrap_style") : "" ?>
<?= view("themes/backend/vuexy/form/tarifas/encuadernacion/_tarifaEncuadernacionFormItems") ?>
<div class="pt-4">
<input type="submit"
class="btn btn-primary float-start me-sm-3 me-1"
name="save"
value="<?= lang("Basic.global.Save") ?>"
/>
<?= anchor(route_to("tarifaEncuadernacionList"), lang("Basic.global.Cancel"), ["class" => "btn btn-secondary float-start",]) ?>
</div><!-- /.card-footer -->
</form>
</div><!-- //.card -->
</div><!--//.col -->
<?php if($formAction == site_url('tarifas/tarifasencuadernacion/add')): ?>
<div class="accordion mt-3" id="accordionEncuadernacionLineas" style="visibility:hidden" >
<?php else: ?>
<div class="accordion mt-3" id="accordionEncuadernacionLineas" style="visibility:visible" >
<?php endif; ?>
<div class="card accordion-item active">
<h2 class="accordion-header" id="headingOne">
<button type="button" class="accordion-button" data-bs-toggle="collapse" data-bs-target="#accordionTip1" aria-expanded="false" aria-controls="accordionTip1">
<h3><?= lang("TarifaEncuadernacionLineas.moduleTitle") ?></h3>
</button>
</h2>
<div id="accordionTip1" class="accordion-collapse collapse show" data-bs-parent="#accordionEncuadernacionLineas">
<div class="accordion-body">
<table id="tableOfTarifaencuadernacionlineas" class="table table-striped table-hover" style="width: 100%;">
<thead>
<tr>
<th><?= lang('TarifaEncuadernacionLineas.paginasMin') ?></th>
<th><?= lang('TarifaEncuadernacionLineas.precioMax') ?></th>
<th><?= lang('TarifaEncuadernacionLineas.paginasMax') ?></th>
<th><?= lang('TarifaEncuadernacionLineas.precioMin') ?></th>
<th><?= lang('TarifaEncuadernacionLineas.margen') ?></th>
<th></th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
</div>
</div>
</div> <!-- //.accordion -->
</div><!--//.row -->
<?= $this->endSection() ?>
<?= $this->section("additionalInlineJs") ?>
const lastColNr = $('#tableOfTarifaencuadernacionlineas').find("tr:first th").length - 1;
const url = window.location.href;
const url_parts = url.split('/');
if(url_parts[url_parts.length-2] == 'edit'){
id = url_parts[url_parts.length-1];
}
else{
id = -1;
}
const actionBtns = function(data) {
return `
<span class="edit"><i class="ti ti-pencil ti-sm btn-edit mx-2" data-id="${data.id}"></i></span>
<span class="cancel"></span>
<span class="remove"><i class="ti ti-trash ti-sm btn-delete mx-2" data-id="${data.id}"></i></span>
`;
};
editor = new $.fn.dataTable.Editor( {
ajax: {
url: "<?= route_to('editorOfTarifaEncuadernacionLineas') ?>",
headers: {
<?= csrf_token() ?? "token" ?> : <?= csrf_token() ?>v,
},
},
table : "#tableOfTarifaencuadernacionlineas",
idSrc: 'id',
fields: [ {
name: "paginas_min"
}, {
name: "precio_max"
}, {
name: "paginas_max"
}, {
name: "precio_min"
}, {
name: "margen"
}, {
"name": "tarifa_encuadernacion_id",
"type": "hidden"
},{
"name": "deleted_at",
"type": "hidden"
},{
"name": "is_deleted",
"type": "hidden"
},
]
} );
editor.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;
}
}
});
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( {
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><t><"mt-4 mb-3"p>',
ajax : $.fn.dataTable.pipeline( {
url: '<?= route_to('dataTableOfTarifaEncuadernacionLineas') ?>',
data: {
id_tarifaencuadernacion: id,
},
method: 'POST',
headers: {'X-Requested-With': 'XMLHttpRequest'},
async: true,
}),
columns: [
{ 'data': 'paginas_min' },
{ 'data': 'precio_max' },
{ 'data': 'paginas_max' },
{ 'data': 'precio_min' },
{ 'data': 'margen' },
{
data: actionBtns,
className: 'row-edit dt-center'
}
],
columnDefs: [
{
orderable: false,
searchable: false,
targets: [lastColNr]
},
{"orderData": [ 0, 1 ], "targets": 0 },
],
language: {
url: "//cdn.datatables.net/plug-ins/1.13.4/i18n/<?= config('Basics')->i18n ?>.json"
},
buttons: [ {
className: 'btn btn-primary float-end me-sm-3 me-1',
extend: "createInline",
editor: editor,
formOptions: {
submitTrigger: -1,
submitHtml: '<i class="ti ti-device-floppy"/>'
}
} ]
} );
// 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: '<i class="ti ti-x"></i>',
cancelTrigger: 'span.cancel',
submitHtml: '<i class="ti ti-device-floppy"></i>',
submitTrigger: 'span.edit',
submit: 'allIfChanged'
}
);
} );
// Delete row
$('#tableOfTarifaencuadernacionlineas').on( 'click', 'tbody span.remove', function (e) {
Swal.fire({
title: '<?= lang('Basic.global.sweet.sureToDeleteTitle', [mb_strtolower(lang('Basic.global.sweet.line'))]) ?>',
text: '<?= lang('Basic.global.sweet.sureToDeleteText') ?>',
icon: 'warning',
showCancelButton: true,
confirmButtonColor: '#3085d6',
confirmButtonText: '<?= lang('Basic.global.sweet.deleteConfirmationButton') ?>',
cancelButtonText: '<?= lang('Basic.global.Cancel') ?>',
cancelButtonColor: '#d33'
})
.then((result) => {
const dataId = $(this).data('id');
const row = $(this).closest('tr');
if (result.value) {
editor
.create( false )
.edit( this.parentNode, false)
.set( 'deleted_at', new Date().toISOString().slice(0, 19).replace('T', ' ') )
.set( 'is_deleted', 1 )
.submit();
}
});
});
<?= $this->endSection() ?>
<?=$this->section('css') ?>
<link rel="stylesheet" href="https://cdn.datatables.net/buttons/2.2.3/css/buttons.bootstrap5.min.css">
<?=$this->endSection() ?>
<?= $this->section('additionalExternalJs') ?>
<script src="https://cdn.datatables.net/buttons/2.2.3/js/dataTables.buttons.min.js"></script>
<script src="https://cdn.datatables.net/buttons/2.2.3/js/buttons.bootstrap5.min.js"></script>
<script src="https://cdn.datatables.net/buttons/2.2.3/js/buttons.html5.min.js"></script>
<script src="https://cdn.datatables.net/buttons/2.2.3/js/buttons.print.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.10.0/jszip.min.js" integrity="sha512-xcHCGC5tQ0SHlRX8Anbz6oy/OullASJkEhb4gjkneVpGE3/QGYejf14CUO5n5q5paiHfRFTa9HKgByxzidw2Bw==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.2.5/pdfmake.min.js" integrity="sha512-rDbVu5s98lzXZsmJoMa0DjHNE+RwPJACogUCLyq3Xxm2kJO6qsQwjbE5NDk2DqmlKcxDirCnU1wAzVLe12IM3w==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.2.5/vfs_fonts.js" integrity="sha512-cktKDgjEiIkPVHYbn8bh/FEyYxmt4JDJJjOCu5/FQAkW4bc911XtKYValiyzBiJigjVEvrIAyQFEbRJZyDA1wQ==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<script src="<?= site_url('themes/vuexy/js/datatables-editor/dataTables.editor.min.js') ?>"></script>
<?=$this->endSection() ?>

View File

@ -0,0 +1,157 @@
<?=$this->include('themes/_commonPartialsBs/datatables') ?>
<?=$this->include('themes/_commonPartialsBs/sweetalert') ?>
<?=$this->extend('themes/backend/vuexy/main/defaultlayout') ?>
<?=$this->section('content'); ?>
<div class="row">
<div class="col-md-12">
<div class="card card-info">
<div class="card-header">
<h3 class="card-title"><?=lang('Tarifaencuadernacion.tarifaencuadernacionList') ?></h3>
<?=anchor(route_to('newTarifaEncuadernacion'), lang('Basic.global.addNew') . ' ' .lang('Tarifaencuadernacion.tarifaencuadernacion'), ['class'=>'btn btn-primary float-end']); ?>
</div><!--//.card-header -->
<div class="card-body">
<?= view('themes/_commonPartialsBs/_alertBoxes'); ?>
<table id="tableOfTarifasencuadernacion" class="table table-striped table-hover" style="width: 100%;">
<thead>
<tr>
<th><?= lang('Tarifaencuadernacion.nombre') ?></th>
<th><?= lang('Tarifaencuadernacion.precioMin') ?></th>
<th><?= lang('Tarifaencuadernacion.importeFijo') ?></th>
<th class="text-nowrap"><?= lang('Basic.global.Action') ?></th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div><!--//.card-body -->
<div class="card-footer">
</div><!--//.card-footer -->
</div><!--//.card -->
</div><!--//.col -->
</div><!--//.row -->
<?=$this->endSection() ?>
<?=$this->section('additionalInlineJs') ?>
const lastColNr = $('#tableOfTarifasencuadernacion').find("tr:first th").length - 1;
const actionBtns = function(data) {
return `<td class="text-right py-0 align-middle">
<div class="btn-group btn-group-sm">
<i class="ti ti-pencil ti-sm btn-edit mx-2" data-id="${data.id}"></i>
<i class="ti ti-trash ti-sm btn-delete mx-2" data-id="${data.id}"></i>
</div>
</td>`;
};
theTable = $('#tableOfTarifasencuadernacion').DataTable({
processing: true,
serverSide: true,
autoWidth: true,
responsive: true,
scrollX: true,
lengthMenu: [ 5, 10, 25, 50, 75, 100, 250, 500, 1000, 2500 ],
pageLength: 10,
lengthChange: true,
"dom": 'lfBrtip',
"buttons": [
'copy', 'csv', 'excel', 'print', {
extend: 'pdfHtml5',
orientation: 'landscape',
pageSize: 'A4'
}
],
stateSave: true,
order: [[0, 'asc']],
language: {
url: "//cdn.datatables.net/plug-ins/1.13.4/i18n/<?= config('Basics')->i18n ?>.json"
},
ajax : $.fn.dataTable.pipeline( {
url: '<?= route_to('dataTableOfTarifasEncuadernacion') ?>',
method: 'POST',
headers: {'X-Requested-With': 'XMLHttpRequest'},
async: true,
}),
columnDefs: [
{
orderable: false,
searchable: false,
targets: [lastColNr]
}
],
columns : [
{ 'data': 'nombre' },
{ 'data': 'precio_min' },
{ 'data': 'importe_fijo' },
{ 'data': actionBtns }
]
});
$(document).on('click', '.btn-edit', function(e) {
//window.location.href = `<?= route_to('tarifaEncuadernacionList') ?>/${$(this).attr('data-id')}/edit`;
window.location.href = `/tarifas/tarifasencuadernacion/edit/${$(this).attr('data-id')}`;
});
$(document).on('click', '.btn-delete', function(e) {
Swal.fire({
title: '<?= lang('Basic.global.sweet.sureToDeleteTitle', [mb_strtolower(lang('Tarifaencuadernacion.tarifa encuadernacion'))]) ?>',
text: '<?= lang('Basic.global.sweet.sureToDeleteText') ?>',
icon: 'warning',
showCancelButton: true,
confirmButtonColor: '#3085d6',
confirmButtonText: '<?= lang('Basic.global.sweet.deleteConfirmationButton') ?>',
cancelButtonText: '<?= lang('Basic.global.Cancel') ?>',
cancelButtonColor: '#d33'
})
.then((result) => {
const dataId = $(this).data('id');
const row = $(this).closest('tr');
if (result.value) {
$.ajax({
//url: `<?= route_to('tarifaEncuadernacionList') ?>/${dataId}`,
//method: 'DELETE',
url: `/tarifas/tarifasencuadernacion/delete/${dataId}`,
method: 'GET',
}).done((data, textStatus, jqXHR) => {
Toast.fire({
icon: 'success',
title: data.msg ?? jqXHR.statusText,
});
theTable.clearPipeline();
theTable.row($(row)).invalidate().draw();
}).fail((jqXHR, textStatus, errorThrown) => {
Toast.fire({
icon: 'error',
title: jqXHR.responseJSON.messages.error,
});
})
}
});
});
<?=$this->endSection() ?>
<?=$this->section('css') ?>
<link rel="stylesheet" href="https://cdn.datatables.net/buttons/2.2.3/css/buttons.bootstrap5.min.css">
<?=$this->endSection() ?>
<?= $this->section('additionalExternalJs') ?>
<script src="https://cdn.datatables.net/buttons/2.2.3/js/dataTables.buttons.min.js"></script>
<script src="https://cdn.datatables.net/buttons/2.2.3/js/buttons.bootstrap5.min.js"></script>
<script src="https://cdn.datatables.net/buttons/2.2.3/js/buttons.html5.min.js"></script>
<script src="https://cdn.datatables.net/buttons/2.2.3/js/buttons.print.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.10.0/jszip.min.js" integrity="sha512-xcHCGC5tQ0SHlRX8Anbz6oy/OullASJkEhb4gjkneVpGE3/QGYejf14CUO5n5q5paiHfRFTa9HKgByxzidw2Bw==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.2.5/pdfmake.min.js" integrity="sha512-rDbVu5s98lzXZsmJoMa0DjHNE+RwPJACogUCLyq3Xxm2kJO6qsQwjbE5NDk2DqmlKcxDirCnU1wAzVLe12IM3w==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.2.5/vfs_fonts.js" integrity="sha512-cktKDgjEiIkPVHYbn8bh/FEyYxmt4JDJJjOCu5/FQAkW4bc911XtKYValiyzBiJigjVEvrIAyQFEbRJZyDA1wQ==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<?=$this->endSection() ?>

View File

@ -28,7 +28,7 @@
</div><!-- //.card -->
</div><!--//.col -->
<?php if($formAction == route_to('createTarifaManipulado')): ?>
<?php if($formAction == site_url('tarifas/tarifasmanipulado/add')): ?>
<div class="accordion mt-3" id="accordionManipuladoLineas" style="visibility:hidden" >
<?php else: ?>
<div class="accordion mt-3" id="accordionManipuladoLineas" style="visibility:visible" >
@ -47,11 +47,11 @@
<table id="tableOfTarifamanipuladolineas" class="table table-striped table-hover" style="width: 100%;">
<thead>
<tr>
<th><?= lang('TarifaManipuladoLineas.tiradaMin') ?></th>
<th><?= lang('TarifaManipuladoLineas.tiradaMax') ?></th>
<th><?= lang('TarifaManipuladoLineas.precioMin') ?></th>
<th><?= lang('TarifaManipuladoLineas.paginasMin') ?></th>
<th><?= lang('TarifaManipuladoLineas.precioMax') ?></th>
<th><?= lang('TarifaManipuladoLineas.precioUnidad') ?></th>
<th><?= lang('TarifaManipuladoLineas.paginasMax') ?></th>
<th><?= lang('TarifaManipuladoLineas.precioMin') ?></th>
<th><?= lang('TarifaManipuladoLineas.margen') ?></th>
<th></th>
</tr>
</thead>
@ -97,16 +97,16 @@
table : "#tableOfTarifamanipuladolineas",
idSrc: 'id',
fields: [ {
name: "tirada_min"
}, {
name: "tirada_max"
}, {
name: "precio_min"
name: "paginas_min"
}, {
name: "precio_max"
}, {
name: "precio_unidad"
},{
name: "paginas_max"
}, {
name: "precio_min"
}, {
name: "margen"
}, {
"name": "tarifa_manipulado_id",
"type": "hidden"
},{
@ -166,11 +166,11 @@
async: true,
}),
columns: [
{ 'data': 'tirada_min' },
{ 'data': 'tirada_max' },
{ 'data': 'precio_min' },
{ 'data': 'paginas_min' },
{ 'data': 'precio_max' },
{ 'data': 'precio_unidad' },
{ 'data': 'paginas_max' },
{ 'data': 'precio_min' },
{ 'data': 'margen' },
{
data: actionBtns,
className: 'row-edit dt-center'

View File

@ -17,6 +17,8 @@
<thead>
<tr>
<th><?= lang('Tarifamanipulado.nombre') ?></th>
<th><?= lang('Tarifamanipulado.precioMin') ?></th>
<th><?= lang('Tarifamanipulado.importeFijo') ?></th>
<th class="text-nowrap"><?= lang('Basic.global.Action') ?></th>
</tr>
</thead>
@ -84,6 +86,8 @@
],
columns : [
{ 'data': 'nombre' },
{ 'data': 'precio_min' },
{ 'data': 'importe_fijo' },
{ 'data': actionBtns }
]
});

View File

@ -32,7 +32,7 @@
</div><!--//.mb-3 -->
<div class="mb-3">
<label for="nombre" class="form-label">
<label for="precio_min" class="form-label">
<?= lang('Tarifapreimpresion.precioMin') ?>*
</label>
<input
@ -46,7 +46,7 @@
</div><!--//.mb-3 -->
<div class="mb-3">
<label for="nombre" class="form-label">
<label for="importe_fijo" class="form-label">
<?= lang('Tarifapreimpresion.importeFijo') ?>*
</label>
<input
@ -59,6 +59,19 @@
>
</div><!--//.mb-3 -->
<div class="mb-3">
<label for="margen" class="form-label">
<?= lang('Tarifapreimpresion.margen') ?>*
</label>
<input
type="text"
id="margen"
name="margen"
required
class="form-control"
value="<?= old('margen', $tarifapreimpresionEntity->margen) ?>"
>
</div><!--//.mb-3 -->
</div><!--//.col -->
</div><!-- //.row -->

View File

@ -17,37 +17,30 @@
<tr>
<th><?= lang('Tarifapreimpresion.nombre') ?></th>
<th><?= lang('Tarifapreimpresion.precio') ?></th>
<th><?= lang('Tarifapreimpresion.precioMin') ?></th>
<th><?= lang('Tarifapreimpresion.importeFijo') ?></th>
<th><?= lang('Tarifapreimpresion.margen') ?></th>
<th class="text-nowrap"><?= lang('Basic.global.Action') ?></th>
</tr>
</thead>
<tbody>
<?php foreach ($tarifapreimpresionList as $item ) : ?>
<tr>
<?php /*
<td class="align-middle text-center">
<?=$item->id ?>
</td>
*/ ?>
<td class="align-middle">
<?= empty($item->nombre) || strlen($item->nombre) < 51 ? esc($item->nombre) : character_limiter(esc($item->nombre), 50) ?>
</td>
<td class="align-middle">
<?= esc($item->precio) ?>
</td>
<?php /*
<td class="align-middle">
<?= esc($item->user_created_id) ?>
<?= esc($item->precio_pagina) ?>
</td>
<td class="align-middle">
<?= esc($item->user_updated_id) ?>
<?= esc($item->precio_min) ?>
</td>
<td class="align-middle text-nowrap">
<?= empty($item->created_at) ? '' : date('d/m/Y H:m:s', strtotime($item->created_at)) ?>
<td class="align-middle">
<?= esc($item->importe_fijo) ?>
</td>
<td class="align-middle text-nowrap">
<?= empty($item->updated_at) ? '' : date('d/m/Y H:m:s', strtotime($item->updated_at)) ?>
<td class="align-middle">
<?= esc($item->margen) ?>
</td>
*/ ?>
<td class="align-middle text-center text-nowrap">
<?=anchor(route_to('editTarifapreimpresion', $item->id), "<i class='ti ti-pencil ti-sm mx-2'></i>", ['class'=>'text-body', 'data-id'=>$item->id,]); ?>
<?=anchor('#confirm2delete', "<i class='ti ti-trash ti-sm mx-2'></i>", ['class'=>'text-body', 'data-href'=>route_to('deleteTarifapreimpresion', $item->id), 'data-bs-toggle'=>'modal', 'data-bs-target'=>'#confirm2delete']); ?>

View File

@ -230,7 +230,7 @@ if (!empty($token) && $tfa == false) {
</div>
</div>
<div class="flex-grow-1">
<span class="fw-semibold d-block"><?= $session->get('first_name') . ' ' . $session->get('first_name') ?></span>
<span class="fw-semibold d-block"><?= $session->get('first_name') . ' ' . $session->get('last_name') ?></span>
<small class="text-muted">Admin</small>
</div>
</div>

View File

@ -463,7 +463,7 @@ if (!empty($token) && $tfa == false) {
</div>
</div>
<div class="flex-grow-1">
<span class="fw-semibold d-block"><?= $session->get('first_name') . ' ' . $session->get('first_name') ?></span>
<span class="fw-semibold d-block"><?= $session->get('first_name') . ' ' . $session->get('last_name') ?></span>
<small class="text-muted">Admin</small>
</div>
</div>

View File

@ -233,7 +233,7 @@ if (!empty($token) && $tfa == false) {
</div>
</div>
<div class="flex-grow-1">
<span class="fw-semibold d-block"><?= $session->get('first_name') . ' ' . $session->get('first_name') ?></span>
<span class="fw-semibold d-block"><?= $session->get('first_name') . ' ' . $session->get('last_name') ?></span>
<small class="text-muted">Admin</small>
</div>
</div>

View File

@ -178,7 +178,7 @@ if (!empty($token) && $tfa == false) {
</div>
</div>
<div class="flex-grow-1">
<span class="fw-semibold d-block"><?= $session->get('first_name') . ' ' . $session->get('first_name') ?></span>
<span class="fw-semibold d-block"><?= $session->get('first_name') . ' ' . $session->get('last_name') ?></span>
<small class="text-muted">Admin</small>
</div>
</div>

View File

@ -233,7 +233,7 @@ if (!empty($token) && $tfa == false) {
</div>
</div>
<div class="flex-grow-1">
<span class="fw-semibold d-block"><?= $session->get('first_name') . ' ' . $session->get('first_name') ?></span>
<span class="fw-semibold d-block"><?= $session->get('first_name') . ' ' . $session->get('last_name') ?></span>
<small class="text-muted">Admin</small>
</div>
</div>

View File

@ -403,7 +403,7 @@
* MENU TARIFAS
*/
if (allowMenuSection($menus,
['Tarifaacabado', 'Tarifaenvio', 'Tarifaimpresion', 'Tarifamanipulado',
['Tarifaacabado', 'Tarifaenvio', 'Tarifaimpresion', 'Tarifamanipulado', 'Tarifaencuadernacion',
'Tarifapapelcompra', 'Tarifapapeldefecto', 'Tarifapreimpresion'
], 'index')): ?>
<!-- Prices -->
@ -449,6 +449,15 @@
</li>
<?php endif; ?>
<?php endif; ?>
<?php if (count($temp = getArrayItem($menus, 'name', 'Tarifaencuadernacion')) > 0): ?>
<?php if (count(getArrayItem($temp, 'methods', 'index', true)) > 0): ?>
<li class="menu-item">
<a href="<?= site_url("tarifas/tarifaencuadernacion") ?>" class="menu-link">
<div data-i18n="<?= lang("App.menu_tarifaencuadernacion") ?>"><?= lang("App.menu_tarifaencuadernacion") ?></div>
</a>
</li>
<?php endif; ?>
<?php endif; ?>
<?php if (count($temp = getArrayItem($menus, 'name', 'Tarifapapelcompra')) > 0): ?>
<?php if (count(getArrayItem($temp, 'methods', 'index', true)) > 0): ?>
<li class="menu-item">

View File

@ -344,7 +344,7 @@
* MENU TARIFAS
*/
if (allowMenuSection($menus,
['Tarifapreimpresion', 'Tarifamanipulado', 'Tarifaacabado', 'Tarifaenvio'], 'index')): ?>
['Tarifapreimpresion', 'Tarifasmanipulado', 'Tarifaacabado', 'Tarifaenvio', 'Tarifasencuadernacion'], 'index')): ?>
<!-- Prices -->
<li class="menu-item">
<a href="javascript:void(0);" class="menu-link menu-toggle">
@ -379,6 +379,15 @@
</li>
<?php endif; ?>
<?php endif; ?>
<?php if (count($temp = getArrayItem($menus, 'name', 'Tarifasencuadernacion')) > 0): ?>
<?php if (count(getArrayItem($temp, 'methods', 'index', true)) > 0): ?>
<li class="menu-item">
<a href="<?= site_url("tarifas/tarifasencuadernacion") ?>" class="menu-link">
<div data-i18n="<?= lang("App.menu_encuadernacion") ?>"><?= lang("App.menu_encuadernacion") ?></div>
</a>
</li>
<?php endif; ?>
<?php endif; ?>
<?php if (count($temp = getArrayItem($menus, 'name', 'Tarifaenvio')) > 0): ?>
<?php if (count(getArrayItem($temp, 'methods', 'index', true)) > 0): ?>
<li class="menu-item">

View File

@ -234,7 +234,7 @@ if (!empty($token) && $tfa == false) {
</div>
</div>
<div class="flex-grow-1">
<span class="fw-semibold d-block"><?= $session->get('first_name') . ' ' . $session->get('first_name') ?></span>
<span class="fw-semibold d-block"><?= $session->get('first_name') . ' ' . $session->get('last_name') ?></span>
<small class="text-muted">Admin</small>
</div>
</div>