mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
Merge branch 'feat/presupuestos' into 'main'
Feat/presupuestos See merge request jjimenez/safekat!63
This commit is contained in:
@ -0,0 +1,19 @@
|
||||
<div class="row">
|
||||
<div class="col-md-12 col-lg-12 px-4">
|
||||
<div class="mb-3">
|
||||
<label for="ancho" class="form-label">
|
||||
<?=lang('LgPapelFormatoes.ancho') ?>*
|
||||
</label>
|
||||
<input type="number" id="ancho" name="ancho" required maxLength="8" step="0.01" class="form-control" value="<?=old('ancho', $papelFormatoEntity->ancho) ?>">
|
||||
</div><!--//.mb-3 -->
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="alto" class="form-label">
|
||||
<?=lang('LgPapelFormatoes.alto') ?>*
|
||||
</label>
|
||||
<input type="number" id="alto" name="alto" required maxLength="8" step="0.01" class="form-control" value="<?=old('alto', $papelFormatoEntity->alto) ?>">
|
||||
</div><!--//.mb-3 -->
|
||||
|
||||
</div><!--//.col -->
|
||||
|
||||
</div><!-- //.row -->
|
||||
@ -0,0 +1,26 @@
|
||||
<?= $this->include("Themes/_commonPartialsBs/select2bs5") ?>
|
||||
<?= $this->include("Themes/_commonPartialsBs/sweetalert") ?>
|
||||
<?= $this->extend("Themes/" . config("Basics")->theme["name"] . "/AdminLayout/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="papelFormatoForm" method="post" action="<?= $formAction ?>">
|
||||
<?= csrf_field() ?>
|
||||
<div class="card-body">
|
||||
<?= view("Themes/_commonPartialsBs/_alertBoxes") ?>
|
||||
<?= !empty($validation->getErrors()) ? $validation->listErrors("bootstrap_style") : "" ?>
|
||||
<?= view("themes/backend/vuexy/form/configuracion/papelformato/_papelFormatoFormItems") ?>
|
||||
</div><!-- /.card-body -->
|
||||
<div class="card-footer">
|
||||
<?= anchor(route_to("papelFormatoList"), lang("Basic.global.Cancel"), ["class" => "btn btn-secondary float-start"]) ?>
|
||||
<input type="submit" class="btn btn-primary float-end" name="save" value="<?= lang("Basic.global.Save") ?>">
|
||||
</div><!-- /.card-footer -->
|
||||
</form>
|
||||
</div><!-- //.card -->
|
||||
</div><!--//.col -->
|
||||
</div><!--//.row -->
|
||||
<?= $this->endSection() ?>
|
||||
@ -0,0 +1,187 @@
|
||||
<?=$this->include('Themes/_commonPartialsBs/datatables') ?>
|
||||
<?=$this->include('Themes/_commonPartialsBs/sweetalert') ?>
|
||||
<?=$this->extend('Themes/'.config('Basics')->theme['name'].'/AdminLayout/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('LgPapelFormatoes.papelFormatoList') ?></h3>
|
||||
</div><!--//.card-header -->
|
||||
<div class="card-body">
|
||||
<?= view('Themes/_commonPartialsBs/_alertBoxes'); ?>
|
||||
|
||||
<table id="tableOfPapelesformatos" class="table table-striped table-hover" style="width: 100%;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="text-nowrap"><?= lang('Basic.global.Action') ?></th>
|
||||
<th><?=lang('LgPapelFormatoes.id')?></th>
|
||||
<th><?= lang('LgPapelFormatoes.ancho') ?></th>
|
||||
<th><?= lang('LgPapelFormatoes.alto') ?></th>
|
||||
<th><?= lang('LgPapelFormatoes.createdAt') ?></th>
|
||||
<th><?= lang('LgPapelFormatoes.updatedAt') ?></th>
|
||||
<th class="text-nowrap"><?= lang('Basic.global.Action') ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div><!--//.card-body -->
|
||||
<div class="card-footer">
|
||||
<?=anchor(route_to('newPapelFormato'), lang('Basic.global.addNew').' '.lang('LgPapelFormatoes.papelFormato'), ['class'=>'btn btn-primary float-end']); ?>
|
||||
</div><!--//.card-footer -->
|
||||
</div><!--//.card -->
|
||||
</div><!--//.col -->
|
||||
</div><!--//.row -->
|
||||
|
||||
<?=$this->endSection() ?>
|
||||
|
||||
|
||||
<?=$this->section('additionalInlineJs') ?>
|
||||
|
||||
const lastColNr = $('#tableOfPapelesformatos').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">
|
||||
<button class="btn btn-sm btn-warning btn-edit me-1" data-id="${data.id}"><?= lang('Basic.global.edit') ?></button>
|
||||
<button class="btn btn-sm btn-danger btn-delete ms-1" data-id="${data.id}"><?= lang('Basic.global.Delete') ?></button>
|
||||
</div>
|
||||
</td>`;
|
||||
};
|
||||
theTable = $('#tableOfPapelesformatos').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": 'lfrtipB', // 'lfBrtip', // you can try different layout combinations by uncommenting one or the other
|
||||
// "dom": '<"top"lf><"clear">rt<"bottom"ipB><"clear">', // remember to comment this line if you uncomment the above
|
||||
"buttons": [
|
||||
'copy', 'csv', 'excel', 'print', {
|
||||
extend: 'pdfHtml5',
|
||||
orientation: 'landscape',
|
||||
pageSize: 'A4'
|
||||
}
|
||||
],
|
||||
stateSave: true,
|
||||
order: [[1, 'asc']],
|
||||
language: {
|
||||
url: "/assets/dt/<?= config('Basics')->languages[$currentLocale] ?? config('Basics')->i18n ?>.json"
|
||||
},
|
||||
ajax : $.fn.dataTable.pipeline( {
|
||||
url: '<?= route_to('dataTableOfPapelesFormatos') ?>',
|
||||
method: 'POST',
|
||||
headers: {'X-Requested-With': 'XMLHttpRequest'},
|
||||
async: true,
|
||||
}),
|
||||
columnDefs: [
|
||||
{
|
||||
orderable: false,
|
||||
searchable: false,
|
||||
targets: [0,lastColNr]
|
||||
}
|
||||
],
|
||||
columns : [
|
||||
{ 'data': actionBtns },
|
||||
{ 'data': 'id' },
|
||||
{ 'data': 'ancho' },
|
||||
{ 'data': 'alto' },
|
||||
{ 'data': 'created_at' },
|
||||
{ 'data': 'updated_at' },
|
||||
{ 'data': actionBtns }
|
||||
]
|
||||
});
|
||||
|
||||
|
||||
theTable.on( 'draw.dt', function () {
|
||||
|
||||
const dateCols = [4, 5];
|
||||
const shortDateFormat = '<?= convertPhpDateToMomentFormat('mm/dd/YYYY')?>';
|
||||
const dateTimeFormat = '<?= convertPhpDateToMomentFormat('mm/dd/YYYY h:i a')?>';
|
||||
|
||||
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);
|
||||
const md = moment(d);
|
||||
const usingThisFormat = dateStrLen > 11 ? dateTimeFormat : shortDateFormat;
|
||||
const formattedDateStr = md.format(usingThisFormat);
|
||||
cell.innerHTML = formattedDateStr;
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
$(document).on('click', '.btn-edit', function(e) {
|
||||
window.location.href = `<?= route_to('papelFormatoList') ?>/${$(this).attr('data-id')}/edit`;
|
||||
});
|
||||
|
||||
$(document).on('click', '.btn-delete', function(e) {
|
||||
Swal.fire({
|
||||
title: '<?= lang('Basic.global.sweet.sureToDeleteTitle', [mb_strtolower(lang('LgPapelFormatoes.papel formato'))]) ?>',
|
||||
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('papelFormatoList') ?>/${dataId}`,
|
||||
method: 'DELETE',
|
||||
}).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.<?=config('Basics')->theme['name'] == 'Bootstrap5' ? 'bootstrap5' : 'bootstrap4' ?>.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.<?=config('Basics')->theme['name'] == 'Bootstrap5' ? 'bootstrap5' : 'bootstrap4' ?>.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() ?>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,262 @@
|
||||
<div class="accordion mt-3" id="accordionDatosLibro">
|
||||
<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="#accordionDatosLibroTip" aria-expanded="false" aria-controls="accordionDatosLibroTip">
|
||||
<h4><?= lang("Presupuestos.datosLibro") ?></h4>
|
||||
</button>
|
||||
</h2>
|
||||
|
||||
<div id="accordionDatosLibroTip" class="accordion-collapse collapse show" data-bs-parent="#accordionDatosLibro">
|
||||
<div class="accordion-body">
|
||||
|
||||
<!-- Fila 1 -->
|
||||
<div class="row">
|
||||
<div class="col-md-12 col-lg-2 px-4">
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="paginas" class="form-label">
|
||||
<?= lang('Presupuestos.paginas') ?>*
|
||||
</label>
|
||||
<input type="number" id="paginas" name="paginas" maxLength="11" class="form-control" value="<?= old('paginas', $presupuestoEntity->paginas) ?>">
|
||||
</div><!--//.mb-3 -->
|
||||
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="mb-3">
|
||||
|
||||
<div class="form-check form-switch mb-2">
|
||||
<input class="form-check-input" type="checkbox" id="solapas" name="solapas" value="1" <?= $presupuestoEntity->solapas == true ? 'checked' : ''; ?>>
|
||||
<label class="form-check-label" for="papelFormatoPersonalizado"><?= lang('Presupuestos.solapasCubierta') ?></label>
|
||||
</div>
|
||||
|
||||
</div><!--//.mb-3 -->
|
||||
|
||||
</div>
|
||||
|
||||
</div><!--//.col -->
|
||||
|
||||
<div class="col-md-12 col-lg-2 px-4">
|
||||
<div class="mb-3">
|
||||
<label for="tirada" class="form-label">
|
||||
<?= lang('Presupuestos.tirada') ?>*
|
||||
</label>
|
||||
<input type="number" id="tirada" name="tirada" maxLength="11" class="form-control" value="<?= old('tirada', $presupuestoEntity->tirada) ?>">
|
||||
</div><!--//.mb-3 -->
|
||||
</div><!--//.col -->
|
||||
|
||||
|
||||
<div class="col-md-12 col-lg-4 px-4">
|
||||
<div class="mb-3">
|
||||
<label id="label_papelFormatoId" for="papelFormatoId" class="form-label">
|
||||
<?= lang('Presupuestos.papelFormatoId') ?>*
|
||||
</label>
|
||||
|
||||
<select id="papelFormatoId" name="papel_formato_id" class="form-control select2bs2" style="width: 100%;">
|
||||
|
||||
<?php if (isset($papelFormatoList) && is_array($papelFormatoList) && !empty($papelFormatoList)) :
|
||||
foreach ($papelFormatoList as $formato) : ?>
|
||||
<option value="<?= $formato->id ?>" <?= $formato->id == $presupuestoEntity->papel_formato_id ? ' selected' : '' ?>>
|
||||
<?= $formato->tamanio ?>
|
||||
</option>
|
||||
<?php endforeach;
|
||||
endif; ?>
|
||||
</select>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12 col-lg-6">
|
||||
<div class="mb-3">
|
||||
<input style="display: none" type="number" id="papelFormatoAncho" name="papel_formato_ancho" maxLength="8" step="0.01" class="form-control" value="<?= old('papel_formato_ancho', $presupuestoEntity->papel_formato_ancho) ?>">
|
||||
</div><!--//.mb-3 -->
|
||||
</div><!--//.col -->
|
||||
|
||||
<div class="col-md-12 col-lg-6">
|
||||
<div class="mb-3">
|
||||
<input style="display: none" type="number" id="papelFormatoAlto" name="papel_formato_alto" maxLength="8" step="0.01" class="form-control" value="<?= old('papel_formato_alto', $presupuestoEntity->papel_formato_alto) ?>">
|
||||
</div><!--//.mb-3 -->
|
||||
</div><!--//.col -->
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-check form-switch mb-2">
|
||||
<input class="form-check-input" type="checkbox" id="papelFormatoPersonalizado" name="papel_formato_personalizado" value="1" <?= $presupuestoEntity->papel_formato_personalizado == true ? 'checked' : ''; ?>>
|
||||
<label class="form-check-label" for="papelFormatoPersonalizado"><?= lang('Presupuestos.papelFormatoPersonalizado') ?></label>
|
||||
</div>
|
||||
|
||||
</div><!--//.mb-3 -->
|
||||
</div><!--//.col -->
|
||||
|
||||
|
||||
<div class="col-md-12 col-lg-2 px-4">
|
||||
<div class="mb-3">
|
||||
<label for="merma" class="form-label">
|
||||
<?= lang('Presupuestos.merma') ?>*
|
||||
</label>
|
||||
<input type="number" id="merma" name="merma" maxLength="8" step="0.01" class="form-control" value="<?= old('merma', $presupuestoEntity->merma) ?>">
|
||||
</div><!--//.mb-3 -->
|
||||
</div><!--//.col -->
|
||||
|
||||
<div class="col-md-12 col-lg-2 px-4">
|
||||
<div class="mb-3">
|
||||
<label for="mermaportada" class="form-label">
|
||||
<?= lang('Presupuestos.mermaportada') ?>*
|
||||
</label>
|
||||
<input type="number" id="mermaportada" name="merma_sobrecubierta" placeholder="6.00" maxLength="8" step="0.01" class="form-control" value="<?= old('merma_sobrecubierta', $presupuestoEntity->merma_sobrecubierta) ?>">
|
||||
</div><!--//.mb-3 -->
|
||||
</div><!--//.col -->
|
||||
|
||||
</div> <!--//.row -->
|
||||
|
||||
<div class="row">
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="row" id="div_solapas_ancho" style="display:none;">
|
||||
<div class="col-md-12 col-lg-2 px-4">
|
||||
<div class="mb-3">
|
||||
<label for="solapas_ancho" class="form-label">
|
||||
<?= lang('Presupuestos.solapasAnchoCubierta') ?>*
|
||||
</label>
|
||||
<input type="number" id="solapas_ancho" name="solapas_ancho" placeholder="6.00" maxLength="8" step="0.01" class="form-control" value="<?= old('solapas_ancho', $presupuestoEntity->solapas_ancho) ?>">
|
||||
</div><!--//.mb-3 -->
|
||||
</div><!--//.col -->
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<!----------------------------------------------------------------------------->
|
||||
|
||||
<div class="divider divider-dark text-start mb-1">
|
||||
<div class="divider-text">
|
||||
<h5><?= lang("Presupuestos.opcionesPresupuesto") ?></h5>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12 col-lg-3 px-4">
|
||||
<div class="mb-3">
|
||||
<div class="form-check">
|
||||
<label for="retractilado" class="form-check-label">
|
||||
<input type="checkbox" id="retractilado" name="retractilado" value="1" class="form-check-input" <?= $presupuestoEntity->retractilado == true ? 'checked' : ''; ?>>
|
||||
<?= lang('Presupuestos.retractilado') ?>
|
||||
</label>
|
||||
</div><!--//.form-check -->
|
||||
</div><!--//.mb-3 -->
|
||||
</div><!--//.col -->
|
||||
|
||||
<div class="col-md-12 col-lg-3 px-4">
|
||||
<div class="mb-3">
|
||||
<div class="form-check">
|
||||
<label for="retractilado5" class="form-check-label">
|
||||
<input type="checkbox" id="retractilado5" name="retractilado_5" value="1" class="form-check-input" <?= $presupuestoEntity->retractilado5 == true ? 'checked' : ''; ?>>
|
||||
<?= lang('Presupuestos.retractilado5') ?>
|
||||
</label>
|
||||
</div><!--//.form-check -->
|
||||
</div><!--//.mb-3 -->
|
||||
</div><!--//.col -->
|
||||
|
||||
|
||||
<div class="col-md-12 col-lg-3 px-4">
|
||||
<div class="mb-3">
|
||||
<div class="form-check">
|
||||
<label for="fajaColor" class="form-check-label">
|
||||
<input type="checkbox" id="fajaColor" name="faja_color" value="1" class="form-check-input" <?= $presupuestoEntity->faja_color == true ? 'checked' : ''; ?>>
|
||||
<?= lang('Presupuestos.fajaColor') ?>
|
||||
</label>
|
||||
</div><!--//.form-check -->
|
||||
</div><!--//.mb-3 -->
|
||||
</div><!--//.col -->
|
||||
|
||||
<div class="col-md-12 col-lg-3 px-4">
|
||||
<div class="mb-3">
|
||||
<div class="form-check">
|
||||
<label for="prototipo" class="form-check-label">
|
||||
<input type="checkbox" id="prototipo" name="prototipo" value="1" class="form-check-input" <?= $presupuestoEntity->prototipo == true ? 'checked' : ''; ?>>
|
||||
<?= lang('Presupuestos.prototipo') ?>
|
||||
</label>
|
||||
</div><!--//.form-check -->
|
||||
</div><!--//.mb-3 -->
|
||||
<div class="mb-3">
|
||||
|
||||
</div><!--//.mb-3 -->
|
||||
</div><!--//.col -->
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-12 col-lg-3 px-4">
|
||||
<div class="mb-3">
|
||||
<div class="form-check">
|
||||
<label for="ferro" class="form-check-label">
|
||||
<input type="checkbox" id="ferro" name="ferro" value="1" class="form-check-input" <?= $presupuestoEntity->ferro == true ? 'checked' : ''; ?>>
|
||||
<?= lang('Presupuestos.ferro') ?>
|
||||
</label>
|
||||
</div><!--//.form-check -->
|
||||
</div><!--//.mb-3 -->
|
||||
</div><!--//.col -->
|
||||
|
||||
|
||||
<div class="col-md-12 col-lg-3 px-4">
|
||||
<div class="mb-3">
|
||||
<div class="form-check">
|
||||
<label for="ferroDigital" class="form-check-label">
|
||||
<input type="checkbox" id="ferroDigital" name="ferro_digital" value="1" class="form-check-input" <?= $presupuestoEntity->ferro_digital == true ? 'checked' : ''; ?>>
|
||||
<?= lang('Presupuestos.ferroDigital') ?>
|
||||
</label>
|
||||
</div><!--//.form-check -->
|
||||
</div><!--//.mb-3 -->
|
||||
</div><!--//.col -->
|
||||
|
||||
<div class="col-md-12 col-lg-3 px-4">
|
||||
<div class="mb-3">
|
||||
<div class="form-check">
|
||||
<label for="marcapaginas" class="form-check-label">
|
||||
<input type="checkbox" id="marcapaginas" name="marcapaginas" value="1" class="form-check-input" <?= $presupuestoEntity->marcapaginas == true ? 'checked' : ''; ?>>
|
||||
<?= lang('Presupuestos.marcapaginas') ?>
|
||||
</label>
|
||||
</div><!--//.form-check -->
|
||||
</div><!--//.mb-3 -->
|
||||
</div><!--//.col -->
|
||||
|
||||
<div class="col-md-12 col-lg-3 px-4">
|
||||
<div class="mb-3">
|
||||
<div class="form-check">
|
||||
<label for="recogerEnTaller" class="form-check-label">
|
||||
<input type="checkbox" id="recogerEnTaller" name="recoger_en_taller" value="1" class="form-check-input" <?= $presupuestoEntity->recoger_en_taller == true ? 'checked' : ''; ?>>
|
||||
<?= lang('Presupuestos.recogerEnTaller') ?>
|
||||
</label>
|
||||
</div><!--//.form-check -->
|
||||
</div><!--//.mb-3 -->
|
||||
</div><!--//.col -->
|
||||
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-12 col-lg-4 px-4">
|
||||
<div class="mb-3">
|
||||
<div class="form-check">
|
||||
<label for="imagenesBnInterior" class="form-check-label">
|
||||
<input type="checkbox" id="imagenesBnInterior" name="imagenes_bn_interior" value="1" class="form-check-input" <?= $presupuestoEntity->imagenes_bn_interior == true ? 'checked' : ''; ?>>
|
||||
<?= lang('Presupuestos.imagenesBnInterior') ?>
|
||||
</label>
|
||||
</div><!--//.form-check -->
|
||||
</div><!--//.mb-3 -->
|
||||
</div><!--//.col -->
|
||||
|
||||
</div> <!--//.row -->
|
||||
|
||||
</div> <!-- //.accordion-body -->
|
||||
</div> <!-- //.accordion-collapse -->
|
||||
</div> <!-- //.accordion-item -->
|
||||
</div> <!-- //.accordion -->
|
||||
@ -0,0 +1,409 @@
|
||||
<div class="accordion mt-3" id="accordionDatosPresupuestoCliente">
|
||||
<div class="card accordion-item active">
|
||||
<h2 class="accordion-header" id="heading">
|
||||
<button type="button" class="accordion-button" data-bs-toggle="collapse" data-bs-target="#accordionDatosPresupuestoClienteTip" aria-expanded="false" aria-controls="accordionDatosPresupuestoClienteTip">
|
||||
<h4><?= lang("Presupuestos.datosPresupuestoCliente") ?></h4>
|
||||
</button>
|
||||
</h2>
|
||||
|
||||
<div id="accordionDatosPresupuestoClienteTip" class="accordion-collapse collapse show" data-bs-parent="#accordionDatosPresupuestoCliente">
|
||||
<div class="accordion-body">
|
||||
|
||||
|
||||
<div class="divider divider-dark text-start mb-1">
|
||||
<div class="divider-text">
|
||||
<h5><?= lang("Presupuestos.tipoImpresion") ?></h5>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-12 col-lg-3 px-4 mt-1">
|
||||
<div class="mb-3">
|
||||
<select id="tipoImpresion" name="tipo_impresion" class="form-control select2bs2" style="width: 100%;">
|
||||
<option id="tipoImpresionNegro" value="negro" <?= isset($presupuestoEntity->comparador_json_data) ? ("negro" == $presupuestoEntity->comparador_json_data->tipo_impresion ? ' selected' : '') : '' ?>>
|
||||
<?= lang('MaquinasTarifasImpresions.negro') ?>
|
||||
</option>
|
||||
<option value="negrohq" <?= isset($presupuestoEntity->comparador_json_data) ? ("negrohq" == $presupuestoEntity->comparador_json_data->tipo_impresion ? ' selected' : '') : '' ?>>
|
||||
<?= lang('MaquinasTarifasImpresions.negrohq') ?>
|
||||
</option>
|
||||
<option value="color" <?= isset($presupuestoEntity->comparador_json_data) ? ("color" == $presupuestoEntity->comparador_json_data->tipo_impresion ? ' selected' : '') : '' ?>>
|
||||
<?= lang('MaquinasTarifasImpresions.color') ?>
|
||||
</option>
|
||||
<option value="colorhq" <?= isset($presupuestoEntity->comparador_json_data) ? ("colorhq" == $presupuestoEntity->comparador_json_data->tipo_impresion ? ' selected' : '') : '' ?>>
|
||||
<?= lang('MaquinasTarifasImpresions.colorhq') ?>
|
||||
</option>
|
||||
</select>
|
||||
</div><!--//.mb-3 -->
|
||||
</div><!--//.col -->
|
||||
|
||||
|
||||
<!----------------------------------------------------------------------------->
|
||||
|
||||
|
||||
<div class="divider divider-dark text-start mb-1">
|
||||
<div class="divider-text">
|
||||
<h5><?= lang("Presupuestos.papelesComparadorCosidoTapaBlanda") ?></h5>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row mb-1">
|
||||
<div class="col-md-12 col-lg-2 px-1 mb-0">
|
||||
<p class="mb-0"></p>
|
||||
</div>
|
||||
<div class="col-md-12 col-lg-2 px-4 mb-0">
|
||||
<p class="mb-0"><?= lang("Presupuestos.numeroPaginas") ?></p>
|
||||
</div>
|
||||
<div class="col-md-12 col-lg-6 px-4 mb-0">
|
||||
<p class="mb-0"><?= lang("Presupuestos.papel") ?></p>
|
||||
</div>
|
||||
<div class="col-md-12 col-lg-2 px-4 mb-0">
|
||||
<p class="mb-0"><?= lang("Presupuestos.gramaje") ?></p>
|
||||
</div>
|
||||
<div>
|
||||
<hr class="my-1">
|
||||
<hr class="my-1">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row mt-0 comp-negro-selected">
|
||||
<div class="col-md-12 col-lg-2 px-4">
|
||||
<p><?= lang('MaquinasTarifasImpresions.negro') ?></p>
|
||||
</div>
|
||||
<div class="col-md-12 col-lg-2 px-4">
|
||||
<input type="number" id="compPaginasNegro" name="comp_paginas_negro" placeholder="0" maxLength="5" class="form-control" value="<?= isset($presupuestoEntity->comparador_json_data->negro) ? (old(0, $presupuestoEntity->comparador_json_data->negro->paginas)) : '0' ?>">
|
||||
</div>
|
||||
<div class="col-md-12 col-lg-6 px-4">
|
||||
<select id="compPapelNegro" name="comp_papel_negro" class="form-control select2bs2" style="width: 100%;">
|
||||
<?php if (isset($papelGenericoNegroList) && is_array($papelGenericoNegroList) && !empty($papelGenericoNegroList)) :
|
||||
foreach ($papelGenericoNegroList as $k => $v) : ?>
|
||||
<option value="<?= $k ?>" /*<?= $k == $presupuestoEntity->tipo_impresion_id ? ' selected' : '' ?>* />
|
||||
<?= $v ?>
|
||||
</option>
|
||||
<?php endforeach;
|
||||
endif; ?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-md-12 col-lg-2 px-4">
|
||||
<select id="compGramajeNegro" name="comp_gramaje_negro" class="form-control select2bs2" disabled style="width: 100%;">
|
||||
</select>
|
||||
</div>
|
||||
<div>
|
||||
<hr class="my-1">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row mt-0 comp-negrohq-selected">
|
||||
<div class="col-md-12 col-lg-2 px-4">
|
||||
<p><?= lang('MaquinasTarifasImpresions.negrohq') ?></p>
|
||||
</div>
|
||||
<div class="col-md-12 col-lg-2 px-4">
|
||||
<input type="number" id="compPaginasNegrohq" name="comp_paginas_negrohq" placeholder="0" maxLength="5" class="form-control" value="<?= isset($presupuestoEntity->comparador_json_data->negro) ? (old(0, $presupuestoEntity->comparador_json_data->negro->paginas)) : '0' ?>">
|
||||
</div>
|
||||
<div class="col-md-12 col-lg-6 px-4">
|
||||
<select id="compPapelNegrohq" name="comp_papel_negrohq" class="form-control select2bs2" style="width: 100%;">
|
||||
<?php if (isset($papelGenericoNegroHQList) && is_array($papelGenericoNegroHQList) && !empty($papelGenericoNegroHQList)) :
|
||||
foreach ($papelGenericoNegroHQList as $k => $v) : ?>
|
||||
<option value="<?= $k ?>" /*<?= $k == $presupuestoEntity->tipo_impresion_id ? ' selected' : '' ?>* />
|
||||
<?= $v ?>
|
||||
</option>
|
||||
<?php endforeach;
|
||||
endif; ?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-md-12 col-lg-2 px-4">
|
||||
<select id="compGramajeNegrohq" name="comp_gramaje_negrohq" class="form-control select2bs2" disabled style="width: 100%;">
|
||||
</select>
|
||||
</div>
|
||||
<div>
|
||||
<hr class="my-1">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row comp-color-selected">
|
||||
<div class="col-md-12 col-lg-2 px-4">
|
||||
<p><?= lang('MaquinasTarifasImpresions.color') ?></p>
|
||||
</div>
|
||||
<div class="col-md-12 col-lg-2 px-4">
|
||||
<input type="number" id="compPaginasColor" name="comp_paginas_color" placeholder="0" maxLength="5" class="form-control" value="<?= isset($presupuestoEntity->comparador_json_data->color) ? (old(0, $presupuestoEntity->comparador_json_data->color->paginas)) : '0' ?>">
|
||||
</div>
|
||||
<div class="col-md-12 col-lg-6 px-4">
|
||||
<select id="compPapelColor" name="comp_papel_color" class="form-control select2bs2" style="width: 100%;">
|
||||
<?php if (isset($papelGenericoColorList) && is_array($papelGenericoColorList) && !empty($papelGenericoColorList)) :
|
||||
foreach ($papelGenericoColorList as $k => $v) : ?>
|
||||
<option value="<?= $k ?>" /*<?= $k == $presupuestoEntity->tipo_impresion_id ? ' selected' : '' ?>* />
|
||||
<?= $v ?>
|
||||
</option>
|
||||
<?php endforeach;
|
||||
endif; ?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-md-12 col-lg-2 px-4">
|
||||
<select id="compGramajeColor" name="comp_gramaje_color" class="form-control select2bs2" disabled style="width: 100%;">
|
||||
</select>
|
||||
</div>
|
||||
<div>
|
||||
<hr class="my-1">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row comp-colorhq-selected">
|
||||
<div class="col-md-12 col-lg-2 px-4">
|
||||
<p><?= lang('MaquinasTarifasImpresions.colorhq') ?></p>
|
||||
</div>
|
||||
<div class="col-md-12 col-lg-2 px-4">
|
||||
<input type="number" id="compPaginasColorhq" name="comp_paginas_colorhq" placeholder="0" maxLength="5" class="form-control" value="<?= isset($presupuestoEntity->comparador_json_data->color) ? (old(0, $presupuestoEntity->comparador_json_data->color->paginas)) : '0' ?>">
|
||||
</div>
|
||||
<div class="col-md-12 col-lg-6 px-4">
|
||||
<select id="compPapelColorhq" name="comp_papel_colorhq" class="form-control select2bs2" style="width: 100%;">
|
||||
<?php if (isset($papelGenericoColorHQList) && is_array($papelGenericoColorHQList) && !empty($papelGenericoColorHQList)) :
|
||||
foreach ($papelGenericoColorHQList as $k => $v) : ?>
|
||||
<option value="<?= $k ?>" /*<?= $k == $presupuestoEntity->tipo_impresion_id ? ' selected' : '' ?>* />
|
||||
<?= $v ?>
|
||||
</option>
|
||||
<?php endforeach;
|
||||
endif; ?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-md-12 col-lg-2 px-4">
|
||||
<select id="compGramajeColorhq" name="comp_gramaje_colorhq" class="form-control select2bs2" disabled style="width: 100%;">
|
||||
</select>
|
||||
</div>
|
||||
<div>
|
||||
<hr class="my-1">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12 col-lg-2 px-4">
|
||||
<p><?= lang('PapelImpresion.cubierta') ?></p>
|
||||
</div>
|
||||
<div class="col-md-12 col-lg-2 px-4">
|
||||
<select id="compPaginasCubierta" name="comp_paginas_cubierta" class="form-control select2bs2" style="width: 100%;">
|
||||
<option value="1" >
|
||||
<p><?= lang('Presupuestos.1cara') ?></p>
|
||||
</option>
|
||||
<option value="2" >
|
||||
<p><?= lang('Presupuestos.2caras') ?></p>
|
||||
</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-md-12 col-lg-6 px-4">
|
||||
<select id="compPapelCubierta" name="comp_papel_cubierta" class="form-control select2bs2" style="width: 100%;">
|
||||
<?php if (isset($papelGenericoSobrecubiertaList) && is_array($papelGenericoSobrecubiertaList) && !empty($papelGenericoSobrecubiertaList)) :
|
||||
foreach ($papelGenericoSobrecubiertaList as $k => $v) : ?>
|
||||
<option value="<?= $k ?>" /*<?= $k == $presupuestoEntity->tipo_impresion_id ? ' selected' : '' ?>* />
|
||||
<?= $v ?>
|
||||
</option>
|
||||
<?php endforeach;
|
||||
endif; ?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-md-12 col-lg-2 px-4">
|
||||
<select id="compGramajeCubierta" name="comp_gramaje_cubierta" class="form-control select2bs2" disabled style="width: 100%;">
|
||||
</select>
|
||||
</div>
|
||||
<div>
|
||||
<hr class="my-1">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!----------------------------------------------------------------------------->
|
||||
|
||||
<div class="divider divider-dark text-start mb-1 comp-color-selected">
|
||||
<div class="divider-text">
|
||||
<h5><?= lang("Presupuestos.posicionPagColor") ?></h5>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row comp-color-selected">
|
||||
<div class="col-md-12 col-lg-4 px-4">
|
||||
<div class="mb-3">
|
||||
<label for="compPosPaginasColor" class="form-label">
|
||||
<?= lang('Presupuestos.posicionPagColor') ?>
|
||||
</label>
|
||||
<input type="text" id="compPosPaginasColor" name="comp_pos_paginas_color" maxLength="20" class="form-control" value="<?= isset($presupuestoEntity->comparador_json_data->color->pospaginas) ? (old('', $presupuestoEntity->comparador_json_data->color->pospaginas)) : '' ?>">
|
||||
</div><!--//.mb-3 -->
|
||||
</div><!--//.col -->
|
||||
<div class="col-md-12 col-lg-8 px-4">
|
||||
<div class="mb-3">
|
||||
<label for="compCalPaginasColor" class="form-label">
|
||||
<?= lang('Presupuestos.posicionPagColor') ?>
|
||||
</label>
|
||||
<textarea type="text" id="compCalPaginasColor" name="comp_cal_paginas_color" maxLength="500" class="form-control" rows="1" readonly style="background: #E8E8E8;"></textarea>
|
||||
</div><!--//.mb-3 -->
|
||||
</div><!--//.col -->
|
||||
|
||||
<div class="col-md-12 col-lg-12 px-4">
|
||||
<p class="text-muted" style="font-size: 0.9em;"><?= lang('Presupuestos.colorPageInstructions') ?></p>
|
||||
</div>
|
||||
</div><!--//.row -->
|
||||
|
||||
<!----------------------------------------------------------------------------->
|
||||
|
||||
<div class="accordion mt-3" id="accordionCompInteriorPlana">
|
||||
<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="#accordionCompInteriorPlanaTip" aria-expanded="false" aria-controls="accordionCompInteriorPlanaTip">
|
||||
<h6><?= lang("Presupuestos.compInteriorPlana") ?></h4>
|
||||
</button>
|
||||
</h2>
|
||||
|
||||
<div id="accordionCompInteriorPlanaTip" class="accordion-collapse collapse" data-bs-parent="#accordionCompInteriorPlana">
|
||||
<div class="accordion-body">
|
||||
|
||||
|
||||
|
||||
<table id="tableCompIntPlana" class="comparator-table table dt-responsive dataTable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.tipo') ?></th>
|
||||
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.paginas') ?></th>
|
||||
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.papel') ?></th>
|
||||
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.gramaje') ?></th>
|
||||
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.marca') ?></th>
|
||||
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.maquina') ?></th>
|
||||
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.numeroPliegos') ?></th>
|
||||
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.pliegosPedido') ?></th>
|
||||
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.precioPliego') ?></th>
|
||||
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.libro') ?></th>
|
||||
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.totalPapelPedido') ?></th>
|
||||
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.lomo') ?></th>
|
||||
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.peso') ?></th>
|
||||
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.click') ?></th>
|
||||
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.totalClicks') ?></th>
|
||||
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.precioPagNegro') ?></th>
|
||||
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.precioPagColor') ?></th>
|
||||
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.totalTinta') ?></th>
|
||||
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.totalCorte') ?></th>
|
||||
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.total') ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td class="dt-result dt-result-text" colspan="18"><?= lang('Presupuestos.total') ?> <?= lang("Presupuestos.compInteriorPlana") ?>:</td>
|
||||
<td class="dt-result dt-result-value" colspan="2"> 0.00 </td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="accordion mt-3" id="accordionCompInteriorRotativa">
|
||||
<div class="card accordion-item active">
|
||||
<h2 class="accordion-header" id="headingTwo">
|
||||
<button type="button" class="accordion-button" data-bs-toggle="collapse" data-bs-target="#accordionCompInteriorRotativaTip" aria-expanded="false" aria-controls="accordionCompInteriorRotativaTip">
|
||||
<h6><?= lang("Presupuestos.compInteriorRotativa") ?></h4>
|
||||
</button>
|
||||
</h2>
|
||||
|
||||
<div id="accordionCompInteriorRotativaTip" class="accordion-collapse collapse" data-bs-parent="#accordionCompInteriorRotativa">
|
||||
<div class="accordion-body">
|
||||
|
||||
|
||||
<table id="tableCompIntRotativa" class="comparator-table table dt-responsive dataTable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.tipo') ?></th>
|
||||
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.paginas') ?></th>
|
||||
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.papel') ?></th>
|
||||
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.gramaje') ?></th>
|
||||
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.marca') ?></th>
|
||||
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.maquina') ?></th>
|
||||
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.numeroPliegos') ?></th>
|
||||
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.pliegosPedido') ?></th>
|
||||
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.precioPliego') ?></th>
|
||||
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.libro') ?></th>
|
||||
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.totalPapelPedido') ?></th>
|
||||
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.lomo') ?></th>
|
||||
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.peso') ?></th>
|
||||
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.click') ?></th>
|
||||
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.totalClicks') ?></th>
|
||||
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.precioPagNegro') ?></th>
|
||||
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.precioPagColor') ?></th>
|
||||
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.totalTinta') ?></th>
|
||||
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.totalCorte') ?></th>
|
||||
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.total') ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td class="dt-result dt-result-text" colspan="18"><?= lang('Presupuestos.total') ?> <?= lang("Presupuestos.compInteriorRotativa") ?>:</td>
|
||||
<td class="dt-result dt-result-value" colspan="2">0.00</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="accordion mt-3" id="accordionCompCubiertaSobrecubierta">
|
||||
<div class="card accordion-item active">
|
||||
<h2 class="accordion-header" id="headingThree">
|
||||
<button type="button" class="accordion-button" data-bs-toggle="collapse" data-bs-target="#accordionCompCubiertaSobrecubiertaTip" aria-expanded="false" aria-controls="accordionCompCubiertaSobrecubiertaTip">
|
||||
<h6><?= lang("Presupuestos.cubierta") ?></h4>
|
||||
</button>
|
||||
</h2>
|
||||
|
||||
<div id="accordionCompCubiertaSobrecubiertaTip" class="accordion-collapse collapse" data-bs-parent="#accordionCompCubiertaSobrecubierta">
|
||||
<div class="accordion-body">
|
||||
|
||||
<table id="tableCompCubierta" class="comparator-table table dt-responsive dataTable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.tipo') ?></th>
|
||||
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.paginas') ?></th>
|
||||
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.papel') ?></th>
|
||||
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.gramaje') ?></th>
|
||||
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.marca') ?></th>
|
||||
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.maquina') ?></th>
|
||||
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.numeroPliegos') ?></th>
|
||||
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.pliegosPedido') ?></th>
|
||||
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.precioPliego') ?></th>
|
||||
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.libro') ?></th>
|
||||
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.totalPapelPedido') ?></th>
|
||||
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.lomo') ?></th>
|
||||
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.peso') ?></th>
|
||||
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.click') ?></th>
|
||||
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.totalClicks') ?></th>
|
||||
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.precioPagNegro') ?></th>
|
||||
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.precioPagColor') ?></th>
|
||||
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.totalTinta') ?></th>
|
||||
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.totalCorte') ?></th>
|
||||
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.total') ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td class="dt-result dt-result-text" colspan="18"><?= lang('Presupuestos.total') ?> <?= lang('Presupuestos.cubierta') ?>:</td>
|
||||
<td class="dt-result dt-result-value" colspan="2">0.00</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div> <!-- //.accordion-body -->
|
||||
</div> <!-- //.accordion-collapse -->
|
||||
</div> <!-- //.accordion-item -->
|
||||
</div> <!-- //.accordion -->
|
||||
@ -0,0 +1,169 @@
|
||||
<div class="accordion mt-3" id="accordionDatosPresupuesto">
|
||||
<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="#accordionDatosPresupuestoTip" aria-expanded="false" aria-controls="accordionDatosPresupuestoTip">
|
||||
<h4><?= lang("Presupuestos.datosPresupuesto") ?></h4>
|
||||
</button>
|
||||
</h2>
|
||||
|
||||
<div id="accordionDatosPresupuestoTip" class="accordion-collapse collapse show" data-bs-parent="#accordionDatosPresupuesto">
|
||||
<div class="accordion-body">
|
||||
|
||||
<!-- Fila 1 -->
|
||||
<div class="row">
|
||||
<div class="col-md-12 col-lg-3 px-4">
|
||||
<div class="mb-3">
|
||||
<label for="id" class="form-label">
|
||||
<?= lang('Presupuestos.id') ?>
|
||||
</label>
|
||||
<input readonly style="background: #E8E8E8;" id="id" name="id" maxLength="12" class="form-control" value="<?= old('id', $presupuestoEntity->id) ?>">
|
||||
</div><!--//.mb-3 -->
|
||||
</div><!--//.col -->
|
||||
|
||||
<div class="col-md-12 col-lg-3 px-4">
|
||||
<div class="mb-3">
|
||||
<label for="created_at" class="form-label">
|
||||
<?= lang('Presupuestos.created_at') ?>
|
||||
</label>
|
||||
<input readonly style="background: #E8E8E8;" id="created_at" name="created_at" maxLength="12" class="form-control" value="<?= old('created_at', (isset($presupuestoEntity->created_at)) ? $presupuestoEntity->created_at : date("d/m/Y")) ?>">
|
||||
</div><!--//.mb-3 -->
|
||||
</div><!--//.col -->
|
||||
|
||||
<div class="col-md-12 col-lg-3 px-4">
|
||||
<div class="mb-3">
|
||||
<label for="estadoId" class="form-label">
|
||||
<?= lang('Presupuestos.presupuestoEstado') ?>
|
||||
</label>
|
||||
<input readonly style="background: #E8E8E8 ;" id="estadoId" name="estado_id" maxLength="12" class="form-control" value="<?= old('estadoId', (isset($presupuestoEntity->estadoId)) ? $presupuestoEntity->estadoId : lang('Presupuestos.presupuestoEstadoBorrador')) ?>">
|
||||
</div><!--//.mb-3 -->
|
||||
</div><!--//.col -->
|
||||
|
||||
<div class="col-md-12 col-lg-3 px-4">
|
||||
<div class="mb-3">
|
||||
<label for="incRei" class="form-label">
|
||||
<?= lang('Presupuestos.incRei') ?>
|
||||
</label>
|
||||
<select id="incRei" name="inc_rei" maxLength="11" class="form-control" value="<?= old('inc_rei', $presupuestoEntity->inc_rei) ?>">
|
||||
<?php if (isset($incReiList) && is_array($incReiList) && !empty($incReiList)) : ?>
|
||||
<option> </option>
|
||||
<?php foreach ($incReiList as $k => $v) : ?>
|
||||
<option value="<?= $k ?>" <?= $k == $presupuestoEntity->estado_id ? ' selected' : '' ?>>
|
||||
<?= $v ?>
|
||||
</option>
|
||||
<?php endforeach;
|
||||
endif; ?>
|
||||
</select>
|
||||
|
||||
</div><!--//.mb-3 -->
|
||||
|
||||
</div><!--//.col -->
|
||||
</div> <!--//.row -->
|
||||
|
||||
<!-- Fila 2 -->
|
||||
<div class="row">
|
||||
<div class="col-md-12 col-lg-6 px-4">
|
||||
<div class="mb-3">
|
||||
<label for="titulo" class="form-label">
|
||||
<?=lang('Presupuestos.titulo') ?>*
|
||||
</label>
|
||||
<input type="text" id="titulo" name="titulo" maxLength="300" class="form-control" value="<?=old('titulo', $presupuestoEntity->titulo) ?>">
|
||||
</div><!--//.mb-3 -->
|
||||
</div><!--//.col -->
|
||||
|
||||
|
||||
<div class="col-md-12 col-lg-6 px-4">
|
||||
<div class="mb-3">
|
||||
<label for="autor" class="form-label">
|
||||
<?=lang('Presupuestos.autor') ?>*
|
||||
</label>
|
||||
<input type="text" id="autor" name="autor" maxLength="150" class="form-control" value="<?=old('autor', $presupuestoEntity->autor) ?>">
|
||||
</div><!--//.mb-3 -->
|
||||
</div><!--//.col -->
|
||||
|
||||
</div> <!--//.row -->
|
||||
|
||||
|
||||
<!-- Fila 3 -->
|
||||
<div class="row">
|
||||
<div class="col-md-12 col-lg-3 px-4">
|
||||
<div class="mb-3">
|
||||
<label for="coleccion" class="form-label">
|
||||
<?=lang('Presupuestos.coleccion') ?>
|
||||
</label>
|
||||
<input type="text" id="coleccion" name="coleccion" maxLength="255" class="form-control" value="<?=old('coleccion', $presupuestoEntity->coleccion) ?>">
|
||||
</div><!--//.mb-3 -->
|
||||
</div>
|
||||
|
||||
<div class="col-md-12 col-lg-3 px-4">
|
||||
<div class="mb-3">
|
||||
<label for="numeroEdicion" class="form-label">
|
||||
<?=lang('Presupuestos.numeroEdicion') ?>
|
||||
</label>
|
||||
<input type="text" id="numeroEdicion" name="numero_edicion" maxLength="50" class="form-control" value="<?=old('numero_edicion', $presupuestoEntity->numero_edicion) ?>">
|
||||
</div><!--//.mb-3 -->
|
||||
</div>
|
||||
|
||||
<div class="col-md-12 col-lg-3 px-4">
|
||||
<div class="mb-3">
|
||||
<label for="isbn" class="form-label">
|
||||
<?=lang('Presupuestos.isbn') ?>
|
||||
</label>
|
||||
<input type="text" id="isbn" name="isbn" maxLength="50" class="form-control" value="<?=old('isbn', $presupuestoEntity->isbn) ?>">
|
||||
</div><!--//.mb-3 -->
|
||||
</div>
|
||||
|
||||
<div class="col-md-12 col-lg-3 px-4">
|
||||
<div class="mb-3">
|
||||
<label for="paisId" class="form-label">
|
||||
<?=lang('Presupuestos.paisId') ?>*
|
||||
</label>
|
||||
<select id="paisId" name="pais_id" class="form-control select2bs" style="width: 100%;" >
|
||||
<option value=""><?=lang('Basic.global.pleaseSelectA', [lang('Presupuestos.paisId')]) ?></option>
|
||||
<?php foreach ($paisList as $item) : ?>
|
||||
<option value="<?=$item->id ?>"<?=$item->id==$presupuestoEntity->pais_id ? ' selected':'' ?>>
|
||||
<?=$item->nombre ?>
|
||||
</option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div><!--//.mb-3 -->
|
||||
</div>
|
||||
|
||||
</div> <!--//.row -->
|
||||
|
||||
|
||||
<!-- Fila 3 -->
|
||||
<div class="row">
|
||||
<div class="col-md-12 col-lg-6 px-4">
|
||||
<div class="mb-3">
|
||||
<label for="clienteId" class="form-label">
|
||||
<?= lang('Presupuestos.clienteId') ?>*
|
||||
</label>
|
||||
<select id="clienteId" name="cliente_id" class="form-control select2bs2" style="width: 100%;">
|
||||
|
||||
<?php if (isset($clienteList) && is_array($clienteList) && !empty($clienteList)) :
|
||||
foreach ($clienteList as $k => $v) : ?>
|
||||
<option value="<?= $k ?>" <?= $k == $presupuestoEntity->cliente_id ? ' selected' : '' ?>>
|
||||
<?= $v ?>
|
||||
</option>
|
||||
<?php endforeach;
|
||||
endif; ?>
|
||||
</select>
|
||||
</div><!--//.mb-3 -->
|
||||
</div><!--//.col -->
|
||||
|
||||
<div class="col-md-12 col-lg-6 px-4">
|
||||
<div class="mb-3">
|
||||
<label for="referenciaCliente" class="form-label">
|
||||
<?=lang('Presupuestos.referenciaCliente') ?>
|
||||
</label>
|
||||
<input type="text" id="referenciaCliente" name="referencia_cliente" maxLength="100" class="form-control" value="<?=old('referencia_cliente', $presupuestoEntity->referencia_cliente) ?>">
|
||||
</div><!--//.mb-3 -->
|
||||
</div><!--//.col -->
|
||||
|
||||
|
||||
</div> <!--//.row -->
|
||||
|
||||
</div> <!-- //.accordion-body -->
|
||||
</div> <!-- //.accordion-collapse -->
|
||||
</div> <!-- //.accordion-item -->
|
||||
</div> <!-- //.accordion -->
|
||||
@ -0,0 +1,33 @@
|
||||
<div class="accordion mt-3" id="accordionEncuadernacion">
|
||||
<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="#accordionEncuadernacionTip" aria-expanded="false" aria-controls="accordionEncuadernacionTip">
|
||||
<h4><?= lang("Presupuestos.encuadernacion") ?></h4>
|
||||
</button>
|
||||
</h2>
|
||||
|
||||
<div id="accordionEncuadernacionTip" class="accordion-collapse collapse show" data-bs-parent="#accordionEncuadernacion">
|
||||
<div class="accordion-body">
|
||||
<div class="col-md-12 col-lg-4 px-4">
|
||||
<div class="mb-3">
|
||||
<label for="encuadernacion" class="form-label">
|
||||
<?= lang('Presupuestos.encuadernacion') ?>*
|
||||
</label>
|
||||
|
||||
<select id="encuadernacion" name="encuadernacion" class="form-control select2bs2" style="width: 100%;">
|
||||
<!---
|
||||
<?php if (isset($papelFormatoList) && is_array($papelFormatoList) && !empty($papelFormatoList)) :
|
||||
foreach ($papelFormatoList as $formato) : ?>
|
||||
<option value="<?= $formato->id ?>" <?= $formato->id == $presupuestoEntity->papel_formato_id ? ' selected' : '' ?>>
|
||||
<?= $formato->tamanio ?>
|
||||
</option>
|
||||
<?php endforeach;
|
||||
endif; ?>
|
||||
--->
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -0,0 +1,197 @@
|
||||
/*******************************
|
||||
* Eventos asociados a elementos HTML
|
||||
*******************************/
|
||||
$("#solapas").on("click", function () {
|
||||
var e = document.getElementById('div_solapas_ancho');
|
||||
if (document.getElementById('solapas').checked) {
|
||||
e.style.display = "flex";
|
||||
}
|
||||
else {
|
||||
e.style.display = "none";
|
||||
}
|
||||
});
|
||||
|
||||
$('#tipoImpresion').on("change", function () {
|
||||
updatePapelesComparador();
|
||||
});
|
||||
|
||||
$('#tipoImpresion').on("change", function () {
|
||||
updatePapelesComparador();
|
||||
});
|
||||
|
||||
$('#compRetractilado').on("change", function () {
|
||||
checkRetractiladoComparador(this);
|
||||
});
|
||||
|
||||
$('#compRetractilado5').on("change", function () {
|
||||
checkRetractiladoComparador(this);
|
||||
});
|
||||
|
||||
$('#imagenesBnInterior').on("change", function () {
|
||||
var e = document.getElementById('tipoImpresion');
|
||||
var optionToHide = e.querySelector("option[value='negro']");
|
||||
|
||||
if (document.getElementById('imagenesBnInterior').checked) {
|
||||
optionToHide.setAttribute('disabled', 'disabled')
|
||||
|
||||
if (e.value == 'negro') {
|
||||
e.value = 'negrohq';
|
||||
}
|
||||
}
|
||||
else {
|
||||
optionToHide.removeAttribute('disabled');
|
||||
}
|
||||
$('#tipoImpresion').select2();
|
||||
});
|
||||
|
||||
$('#compPosPaginasColor').on("keyup", function () {
|
||||
computarPaginasColor(this.value);
|
||||
});
|
||||
|
||||
|
||||
// Este evento recoloca los headers de las tablas cuando se pulsa el
|
||||
// boton del acordeon
|
||||
$('.accordion-button').on('click', function (e) {
|
||||
$.fn.dataTable.tables({ visible: true, api: true }).columns.adjust();
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/*******************************
|
||||
* Metodos
|
||||
*******************************/
|
||||
function init_comparador() {
|
||||
updatePapelesComparador();
|
||||
const paginasColor = document.getElementById('compCalPaginasColor');
|
||||
if (paginasColor.value.length > 0) {
|
||||
computarPaginasColor(paginasColor.value);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
function computarPaginasColor(string) {
|
||||
|
||||
var numbers = [];
|
||||
for (const [, beginStr, endStr] of string.matchAll(/(\d+)(?:-(\d+))?/g)) {
|
||||
const [begin, end] = [beginStr, endStr].map(Number);
|
||||
numbers.push(begin);
|
||||
if (endStr !== undefined) {
|
||||
for (let num = begin + 1; num <= end; num++) {
|
||||
numbers.push(num);
|
||||
}
|
||||
}
|
||||
}
|
||||
var numbers2 = [];
|
||||
numbers.forEach(function (value, i) {
|
||||
// Si es impar y no está el siguiente par hay que añadirlo
|
||||
if (value % 2 != 0 && numbers[i + 1] != value + 1) {
|
||||
numbers2.push(value + 1);
|
||||
}
|
||||
});
|
||||
numbers = numbers.concat(numbers2);
|
||||
numbers.sort(function (a, b) {
|
||||
return a - b;
|
||||
});
|
||||
calPagesTextarea = document.getElementById('compCalPaginasColor');
|
||||
calPagesTextarea.value = numbers;
|
||||
autosize.update(calPagesTextarea);
|
||||
}
|
||||
|
||||
function checkRetractiladoComparador(element) {
|
||||
|
||||
switch (element.id) {
|
||||
case 'compRetractilado':
|
||||
if (document.getElementById(element.id).checked) {
|
||||
document.getElementById('compRetractilado5').checked = false;
|
||||
}
|
||||
break;
|
||||
case 'compRetractilado5':
|
||||
if (document.getElementById(element.id).checked) {
|
||||
document.getElementById('compRetractilado').checked = false;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function updatePapelesComparador() {
|
||||
|
||||
var e = document.getElementById("tipoImpresion");
|
||||
elements_negro = document.getElementsByClassName('comp-negro-selected');
|
||||
elements_negrohq = document.getElementsByClassName('comp-negrohq-selected');
|
||||
elements_color = document.getElementsByClassName('comp-color-selected');
|
||||
elements_colorhq = document.getElementsByClassName('comp-colorhq-selected');
|
||||
switch (e.value) {
|
||||
case "negro":
|
||||
Array.from(elements_color).forEach(element => {
|
||||
element.style.display = "none";
|
||||
});
|
||||
Array.from(elements_negro).forEach(element => {
|
||||
element.style.display = "flex";
|
||||
});
|
||||
Array.from(elements_negrohq).forEach(element => {
|
||||
element.style.display = "none";
|
||||
});
|
||||
Array.from(elements_colorhq).forEach(element => {
|
||||
element.style.display = "none";
|
||||
});
|
||||
break;
|
||||
|
||||
case "negrohq":
|
||||
Array.from(elements_color).forEach(element => {
|
||||
element.style.display = "none";
|
||||
});
|
||||
Array.from(elements_negro).forEach(element => {
|
||||
element.style.display = "none";
|
||||
});
|
||||
Array.from(elements_negrohq).forEach(element => {
|
||||
element.style.display = "flex";
|
||||
});
|
||||
Array.from(elements_colorhq).forEach(element => {
|
||||
element.style.display = "none";
|
||||
});
|
||||
break;
|
||||
|
||||
case "color":
|
||||
Array.from(elements_negro).forEach(element => {
|
||||
element.style.display = "flex";
|
||||
});
|
||||
Array.from(elements_negrohq).forEach(element => {
|
||||
element.style.display = "none";
|
||||
});
|
||||
Array.from(elements_color).forEach(element => {
|
||||
element.style.display = "flex";
|
||||
});
|
||||
Array.from(elements_colorhq).forEach(element => {
|
||||
element.style.display = "none";
|
||||
});
|
||||
break;
|
||||
|
||||
case "colorhq":
|
||||
Array.from(elements_negro).forEach(element => {
|
||||
element.style.display = "none";
|
||||
});
|
||||
Array.from(elements_negrohq).forEach(element => {
|
||||
element.style.display = "flex";
|
||||
});
|
||||
Array.from(elements_color).forEach(element => {
|
||||
element.style.display = "none";
|
||||
});
|
||||
Array.from(elements_colorhq).forEach(element => {
|
||||
element.style.display = "flex";
|
||||
});
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,403 @@
|
||||
<?= $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="presupuestoForm" 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/presupuestos/cosidotapablanda/_datosPresupuestoItems") ?>
|
||||
<?= view("themes/backend/vuexy/form/presupuestos/cosidotapablanda/_datosLibroItems") ?>
|
||||
<?= view("themes/backend/vuexy/form/presupuestos/cosidotapablanda/_datosPresupuestoClienteItems") ?>
|
||||
<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("cosidotapablandaList"), lang("Basic.global.Cancel"), ["class" => "btn btn-secondary float-start",]) ?>
|
||||
</div>
|
||||
</form>
|
||||
</div><!-- //.card -->
|
||||
</div><!--//.col -->
|
||||
</div><!--//.row -->
|
||||
<?= $this->endSection() ?>
|
||||
|
||||
|
||||
<!------------------------------------------->
|
||||
<!-- Código JS para los selects -->
|
||||
<!------------------------------------------->
|
||||
<?= $this->section("additionalInlineJs") ?>
|
||||
|
||||
$('#clienteId').select2({
|
||||
allowClear: false,
|
||||
ajax: {
|
||||
url: '<?= route_to("menuItemsOfClientes") ?>',
|
||||
type: 'post',
|
||||
dataType: 'json',
|
||||
|
||||
data: function (params) {
|
||||
return {
|
||||
id: 'id',
|
||||
text: 'nombre',
|
||||
searchTerm: params.term,
|
||||
<?= csrf_token() ?? "token" ?> : <?= csrf_token() ?>v
|
||||
};
|
||||
},
|
||||
delay: 60,
|
||||
processResults: function (response) {
|
||||
yeniden(response.<?= csrf_token() ?>);
|
||||
return {
|
||||
results: response.menu
|
||||
};
|
||||
},
|
||||
cache: true
|
||||
}
|
||||
});
|
||||
|
||||
$('#incRei').select2({
|
||||
allowClear: false,
|
||||
});
|
||||
|
||||
$('#paisId').select2({
|
||||
allowClear: false,
|
||||
});
|
||||
|
||||
$('#papelFormatoId').select2({
|
||||
allowClear: false,
|
||||
});
|
||||
|
||||
$('#tipoImpresion').select2({
|
||||
allowClear: false,
|
||||
});
|
||||
|
||||
$('#compPapelNegro').select2({
|
||||
allowClear: false,
|
||||
});
|
||||
|
||||
$('#compGramajeNegro').select2({
|
||||
allowClear: false,
|
||||
});
|
||||
|
||||
$('#compPapelNegrohq').select2({
|
||||
allowClear: false,
|
||||
});
|
||||
|
||||
$('#compGramajeNegrohq').select2({
|
||||
allowClear: false,
|
||||
});
|
||||
|
||||
$('#compPapelColor').select2({
|
||||
allowClear: false,
|
||||
});
|
||||
|
||||
$('#compPapelColorhq').select2({
|
||||
allowClear: false,
|
||||
});
|
||||
|
||||
$('#compGramajeColor').select2({
|
||||
allowClear: false,
|
||||
});
|
||||
|
||||
$('#compPapelCubierta').select2({
|
||||
allowClear: false,
|
||||
});
|
||||
|
||||
$('#compGramajeCubierta').select2({
|
||||
allowClear: false,
|
||||
});
|
||||
|
||||
$('#encuadernacion').select2({
|
||||
allowClear: false,
|
||||
});
|
||||
|
||||
$('#compPaginasCubierta').select2({
|
||||
allowClear: false,
|
||||
minimumResultsForSearch: Infinity,
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
<?= $this->endSection() ?>
|
||||
|
||||
|
||||
<!------------------------------------------->
|
||||
<!-- Código JS comportamiento general pag. -->
|
||||
<!------------------------------------------->
|
||||
<?= $this->section("additionalInlineJs") ?>
|
||||
|
||||
autosize($('#compCalPaginasColor'));
|
||||
|
||||
|
||||
|
||||
$('#papelFormatoPersonalizado').on("click",function(){
|
||||
var checkbox = document.getElementById('papelFormatoPersonalizado');
|
||||
if(checkbox.checked == true){
|
||||
document.getElementById("papelFormatoAncho").style.display = "block";
|
||||
document.getElementById("papelFormatoAlto").style.display = "block";
|
||||
$('#papelFormatoId').next(".select2-container").hide();
|
||||
document.getElementById("label_papelFormatoId").innerHTML =
|
||||
"<?=lang('Presupuestos.papelFormatoId') ?> (" +
|
||||
"<?=lang('Presupuestos.papelFormatoAncho') ?> x <?=lang('Presupuestos.papelFormatoAncho') ?>)*";
|
||||
}
|
||||
else{
|
||||
document.getElementById("papelFormatoAncho").style.display = "none";
|
||||
document.getElementById("papelFormatoAlto").style.display = "none";
|
||||
$('#papelFormatoId').next(".select2-container").show();
|
||||
document.getElementById("label_papelFormatoId").innerHTML =
|
||||
"<?=lang('Presupuestos.papelFormatoId') ?>*";
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
init_comparador();
|
||||
|
||||
|
||||
var tableCompIntPlana = new DataTable('#tableCompIntPlana',{
|
||||
scrollX: true,
|
||||
searching: false,
|
||||
paging: false,
|
||||
info: false,
|
||||
ordering: false,
|
||||
responsive: true,
|
||||
language: {
|
||||
url: "//cdn.datatables.net/plug-ins/1.13.4/i18n/<?= config('Basics')->i18n ?>.json"
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
var tableCompIntRotativa = new DataTable('#tableCompIntRotativa',{
|
||||
scrollX: true,
|
||||
searching: false,
|
||||
paging: false,
|
||||
info: false,
|
||||
ordering: false,
|
||||
responsive: true,
|
||||
language: {
|
||||
url: "//cdn.datatables.net/plug-ins/1.13.4/i18n/<?= config('Basics')->i18n ?>.json"
|
||||
},
|
||||
});
|
||||
|
||||
var tableCompIntCubierta = new DataTable('#tableCompCubierta',{
|
||||
scrollX: true,
|
||||
searching: false,
|
||||
paging: false,
|
||||
info: false,
|
||||
ordering: false,
|
||||
responsive: true,
|
||||
language: {
|
||||
url: "//cdn.datatables.net/plug-ins/1.13.4/i18n/<?= config('Basics')->i18n ?>.json"
|
||||
},
|
||||
});
|
||||
|
||||
var tableCompIntSobrecubierta = new DataTable('#tableCompSobrecubierta',{
|
||||
scrollX: true,
|
||||
searching: false,
|
||||
paging: false,
|
||||
info: false,
|
||||
ordering: false,
|
||||
responsive: true,
|
||||
language: {
|
||||
url: "//cdn.datatables.net/plug-ins/1.13.4/i18n/<?= config('Basics')->i18n ?>.json"
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
|
||||
$('#compPapelNegro').on('select2:select', function (e){
|
||||
|
||||
$('#compGramajeNegro').val(null).trigger('change');
|
||||
$('#compGramajeNegro').prop('disabled', false);
|
||||
$('#compPapelNegro').find('option[value="0"]').remove();
|
||||
$('#compGramajeNegro').select2({
|
||||
allowClear: true,
|
||||
minimumResultsForSearch: Infinity,
|
||||
ajax: {
|
||||
url: '<?= route_to("menuItemsOfCosidotapablanda") ?>',
|
||||
type: 'post',
|
||||
dataType: 'json',
|
||||
|
||||
data: function (params) {
|
||||
return {
|
||||
tipo: 'gramaje',
|
||||
datos: $('#compPapelNegro').select2('data')[0].text.trim() ,
|
||||
<?= csrf_token() ?? "token" ?> : <?= csrf_token() ?>v
|
||||
};
|
||||
},
|
||||
delay: 60,
|
||||
processResults: function (response) {
|
||||
yeniden(response.<?= csrf_token() ?>);
|
||||
return {
|
||||
results: response.menu
|
||||
};
|
||||
},
|
||||
cache: true
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
$('#compPapelNegrohq').on('select2:select', function (e){
|
||||
|
||||
$('#compGramajeNegrohq').val(null).trigger('change');
|
||||
$('#compGramajeNegrohq').prop('disabled', false);
|
||||
$('#compPapelNegrohq').find('option[value="0"]').remove();
|
||||
$('#compGramajeNegrohq').select2({
|
||||
allowClear: true,
|
||||
minimumResultsForSearch: Infinity,
|
||||
ajax: {
|
||||
url: '<?= route_to("menuItemsOfCosidotapablanda") ?>',
|
||||
type: 'post',
|
||||
dataType: 'json',
|
||||
|
||||
data: function (params) {
|
||||
return {
|
||||
tipo: 'gramaje',
|
||||
datos: $('#compPapelNegrohq').select2('data')[0].text.trim() ,
|
||||
<?= csrf_token() ?? "token" ?> : <?= csrf_token() ?>v
|
||||
};
|
||||
},
|
||||
delay: 60,
|
||||
processResults: function (response) {
|
||||
yeniden(response.<?= csrf_token() ?>);
|
||||
return {
|
||||
results: response.menu
|
||||
};
|
||||
},
|
||||
cache: true
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
$('#compPapelColor').on('select2:select', function (e){
|
||||
|
||||
$('#compGramajeColor').val(null).trigger('change');
|
||||
$('#compGramajeColor').prop('disabled', false);
|
||||
$('#compPapelColor').find('option[value="0"]').remove();
|
||||
$('#compGramajeColor').select2({
|
||||
allowClear: true,
|
||||
minimumResultsForSearch: Infinity,
|
||||
ajax: {
|
||||
url: '<?= route_to("menuItemsOfCosidotapablanda") ?>',
|
||||
type: 'post',
|
||||
dataType: 'json',
|
||||
|
||||
data: function (params) {
|
||||
return {
|
||||
tipo: 'gramaje',
|
||||
datos: $('#compPapelColor').select2('data')[0].text.trim() ,
|
||||
<?= csrf_token() ?? "token" ?> : <?= csrf_token() ?>v
|
||||
};
|
||||
},
|
||||
delay: 60,
|
||||
processResults: function (response) {
|
||||
yeniden(response.<?= csrf_token() ?>);
|
||||
return {
|
||||
results: response.menu
|
||||
};
|
||||
},
|
||||
cache: true
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
$('#compPapelColorhq').on('select2:select', function (e){
|
||||
|
||||
$('#compGramajeColorhq').val(null).trigger('change');
|
||||
$('#compGramajeColorhq').prop('disabled', false);
|
||||
$('#compPapelColorhq').find('option[value="0"]').remove();
|
||||
$('#compGramajeColorhq').select2({
|
||||
allowClear: true,
|
||||
minimumResultsForSearch: Infinity,
|
||||
ajax: {
|
||||
url: '<?= route_to("menuItemsOfCosidotapablanda") ?>',
|
||||
type: 'post',
|
||||
dataType: 'json',
|
||||
|
||||
data: function (params) {
|
||||
return {
|
||||
tipo: 'gramaje',
|
||||
datos: $('#compPapelColorhq').select2('data')[0].text.trim() ,
|
||||
<?= csrf_token() ?? "token" ?> : <?= csrf_token() ?>v
|
||||
};
|
||||
},
|
||||
delay: 60,
|
||||
processResults: function (response) {
|
||||
yeniden(response.<?= csrf_token() ?>);
|
||||
return {
|
||||
results: response.menu
|
||||
};
|
||||
},
|
||||
cache: true
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$('#compPapelCubierta').on('select2:select', function (e){
|
||||
|
||||
$('#compGramajeCubierta').val(null).trigger('change');
|
||||
$('#compGramajeCubierta').prop('disabled', false);
|
||||
$('#compPapelCubierta').find('option[value="0"]').remove();
|
||||
$('#compGramajeCubierta').select2({
|
||||
allowClear: true,
|
||||
minimumResultsForSearch: Infinity,
|
||||
ajax: {
|
||||
url: '<?= route_to("menuItemsOfCosidotapablanda") ?>',
|
||||
type: 'post',
|
||||
dataType: 'json',
|
||||
|
||||
data: function (params) {
|
||||
return {
|
||||
tipo: 'gramaje',
|
||||
datos: $('#compPapelCubierta').select2('data')[0].text.trim() ,
|
||||
<?= csrf_token() ?? "token" ?> : <?= csrf_token() ?>v
|
||||
};
|
||||
},
|
||||
delay: 60,
|
||||
processResults: function (response) {
|
||||
yeniden(response.<?= csrf_token() ?>);
|
||||
return {
|
||||
results: response.menu
|
||||
};
|
||||
},
|
||||
cache: true
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
<?= $this->endSection() ?>
|
||||
|
||||
<?=$this->section('css') ?>
|
||||
|
||||
<link rel="stylesheet" href="<?= site_url('themes/vuexy/css/datatables-editor/editor.dataTables.min.css') ?>">
|
||||
<link rel="stylesheet" href="https://cdn.datatables.net/buttons/2.2.3/css/buttons.bootstrap5.min.css">
|
||||
<link rel="stylesheet" href="<?= site_url('themes/vuexy/css/sk-datatables.css') ?>">
|
||||
|
||||
<?=$this->endSection() ?>
|
||||
|
||||
<?= $this->section('additionalExternalJs') ?>
|
||||
<script src="<?= site_url('themes/vuexy/vendor/libs/autosize/autosize.js') ?>"></script>
|
||||
<script src="<?= site_url('js_loader/comparadorCosidoTapaBlanda_js') ?>"></script>
|
||||
<?=$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>
|
||||
<?=$this->endSection() ?>
|
||||
@ -0,0 +1,195 @@
|
||||
<?=$this->include('themes/_commonPartialsBs/select2bs5') ?>
|
||||
<?=$this->include('themes/_commonPartialsBs/datatables') ?>
|
||||
<?=$this->include('themes/_commonPartialsBs/sweetalert') ?>
|
||||
<?= $this->include('themes/_commonPartialsBs/_confirm2delete') ?>
|
||||
<?= $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('Presupuestos.presupuestoCosidotapablandaList') ?></h3>
|
||||
<?=anchor(route_to('newCosidotapablanda'), lang('Basic.global.addNew').' '.lang('Presupuestos.presupuesto'), ['class'=>'btn btn-primary float-end']); ?>
|
||||
</div><!--//.card-header -->
|
||||
<div class="card-body">
|
||||
<?= view('themes/_commonPartialsBs/_alertBoxes'); ?>
|
||||
|
||||
<table id="tableOfPresupuestos" class="table table-striped table-hover" style="width: 100%;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><?=lang('Presupuestos.id')?></th>
|
||||
<th><?= lang('Presupuestos.created_at') ?></th>
|
||||
<th><?= lang('Clientes.cliente') ?></th>
|
||||
<th><?= lang('Presupuestos.comercial') ?></th>
|
||||
<th><?= lang('Presupuestos.titulo') ?></th>
|
||||
<th><?= lang('Paises.pais') ?></th>
|
||||
<th><?= lang('Presupuestos.incRei') ?></th>
|
||||
<th><?= lang('Presupuestos.paginas') ?></th>
|
||||
<th><?= lang('Presupuestos.tirada') ?></th>
|
||||
<th><?= lang('Presupuestos.totalPedido') ?></th>
|
||||
<th><?= lang('Presupuestos.presupuestoEstado') ?></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 = $('#tableOfPresupuestos').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">
|
||||
<a href="javascript:void(0);"><i class="ti ti-pencil ti-sm btn-edit mx-2" data-id="${data.id}"></i></a>
|
||||
<a href="javascript:void(0);"><i class="ti ti-trash ti-sm btn-delete mx-2" data-id="${data.id}" data-bs-toggle="modal" data-bs-target="#confirm2delete"></i></a>
|
||||
</div>
|
||||
</td>`;
|
||||
};
|
||||
theTable = $('#tableOfPresupuestos').DataTable({
|
||||
processing: true,
|
||||
serverSide: true,
|
||||
autoWidth: true,
|
||||
responsive: true,
|
||||
scrollX: true,
|
||||
lengthMenu: [ 5, 10, 25, 50, 75, 100, 250, 500, 1000, 2500 ],
|
||||
pageLength: 50,
|
||||
lengthChange: true,
|
||||
"dom": 'lfBrtip',
|
||||
"buttons": [
|
||||
'colvis', 'copy', 'csv', 'excel', 'print', {
|
||||
extend: 'pdfHtml5',
|
||||
orientation: 'landscape',
|
||||
pageSize: 'A4'
|
||||
}
|
||||
],
|
||||
stateSave: true,
|
||||
order: [[1, 'asc']],
|
||||
language: {
|
||||
url: "//cdn.datatables.net/plug-ins/1.13.4/i18n/<?= config('Basics')->i18n ?>.json"
|
||||
},
|
||||
ajax : $.fn.dataTable.pipeline( {
|
||||
url: '<?= route_to('dataTableOfCosidotapablanda') ?>',
|
||||
method: 'POST',
|
||||
headers: {'X-Requested-With': 'XMLHttpRequest'},
|
||||
async: true,
|
||||
}),
|
||||
columnDefs: [
|
||||
{
|
||||
orderable: false,
|
||||
searchable: false,
|
||||
targets: [lastColNr]
|
||||
}
|
||||
],
|
||||
columns : [
|
||||
{ 'data': 'id' },
|
||||
{ 'data': 'fecha' },
|
||||
{ 'data': 'cliente' },
|
||||
{ 'data': 'comercial' },
|
||||
{ 'data': 'titulo' },
|
||||
{ 'data': 'pais' },
|
||||
{ 'data': 'inc_rei' },
|
||||
{ 'data': 'paginas' },
|
||||
{ 'data': 'tirada' },
|
||||
{ 'data': 'total_pedido' },
|
||||
{ 'data': 'estado' },
|
||||
{ 'data': actionBtns }
|
||||
]
|
||||
});
|
||||
|
||||
|
||||
theTable.on( 'draw.dt', function () {
|
||||
|
||||
const dateCols = [1];
|
||||
const priceCols = [9];
|
||||
|
||||
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();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
for (let coln of priceCols) {
|
||||
theTable.column(coln, { page: 'current' }).nodes().each( function (cell, i) {
|
||||
cell.innerHTML = parseFloat(cell.innerHTML).toFixed(2);
|
||||
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
$(document).on('click', '.btn-edit', function(e) {
|
||||
window.location.href = `/presupuestos/cosidotapablanda/edit/${$(this).attr('data-id')}`;
|
||||
});
|
||||
|
||||
|
||||
$(document).on('click', '.btn-delete', function(e) {
|
||||
$(".btn-remove").attr('data-id', $(this).attr('data-id'));
|
||||
});
|
||||
|
||||
|
||||
$(document).on('click', '.btn-remove', function(e) {
|
||||
const dataId = $(this).attr('data-id');
|
||||
const row = $(this).closest('tr');
|
||||
if ($.isNumeric(dataId)) {
|
||||
$.ajax({
|
||||
url: `/presupuestos/cosidotapablanda/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->section('css') ?>
|
||||
<link rel="stylesheet" href="https://cdn.datatables.net/buttons/2.2.3/css/buttons.<?=config('Basics')->theme['name'] == 'Bootstrap5' ? 'bootstrap5' : 'bootstrap4' ?>.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.<?=config('Basics')->theme['name'] == 'Bootstrap5' ? 'bootstrap5' : 'bootstrap4' ?>.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://cdn.datatables.net/buttons/2.2.3/js/buttons.colVis.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() ?>
|
||||
|
||||
@ -335,6 +335,16 @@ if (!empty($token) && $tfa == false) {
|
||||
<!-- Page JS -->
|
||||
<?= sweetAlert() ?>
|
||||
|
||||
<?php
|
||||
if (isset($global_js_variables)) {
|
||||
echo "<script>\n";
|
||||
foreach ($global_js_variables as $name => $value):
|
||||
echo "\t" . "var $name = $value;" . "\n";
|
||||
endforeach;
|
||||
echo "</script>\n";
|
||||
}
|
||||
?>
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
|
||||
Reference in New Issue
Block a user