Merge branch 'main' into fix/importador_bubok

This commit is contained in:
imnavajas
2025-05-13 09:05:32 +02:00
15 changed files with 255 additions and 111 deletions

View File

@ -4,7 +4,7 @@
<thead>
<tr>
<th></th>
<th><?= lang('Produccion.datatable.ot_id') ?></th>
<th class="w-10"><?= lang('Produccion.datatable.ot_id') ?></th>
<th><?= lang('Produccion.datatable.pedido_id') ?></th>
<th><?= lang('Produccion.datatable.fecha_encuadernacion') ?></th>
<th><?= lang('Produccion.datatable.cliente') ?></th>
@ -16,6 +16,20 @@
<th><?= lang('Produccion.datatable.progreso') ?></th>
<th class="text-nowrap"><?= lang('Basic.global.Action') ?></th>
</tr>
<tr>
<th></th>
<th><input type="text" class="form-control ot-filter" name="id"></th>
<th><input type="text" class="form-control ot-filter" name="pedido_id"></th>
<th><input type="text" class="form-control ot-filter" name="fecha_encuadernado_at"></th>
<th><input type="text" class="form-control ot-filter" name="cliente_nombre"></th>
<th><input type="text" class="form-control ot-filter" name="presupuesto_titulo"></th>
<th><input type="text" class="form-control ot-filter" name="ubicacion_nombre"></th>
<th><input type="text" class="form-control ot-filter" name="total_tirada"></th>
<th><input type="text" class="form-control ot-filter" name="tipo_presupuesto_impresion"></th>
<th></th>
<th></th>
<th></th>
</tr>
</thead>
<tbody>

View File

@ -96,13 +96,12 @@
<div class="row mb-2">
<div <?= ($facturaEntity->serie_id == 7 || $facturaEntity->serie_id == 9 || $facturaEntity->factura_rectificada_id != null) ? "":"style='display:none;'" ?> class="col-md-12 col-lg-2 px-4 factura-R">
<div <?= ($facturaEntity->serie_id == 7 || $facturaEntity->serie_id == 9 || $facturaEntity->factura_rectificativa_id != null) ? "":"style='display:none;'" ?> class="col-md-12 col-lg-2 px-4 factura-R">
<div class="mb-1">
<label for="facturaR" class="form-label factura-R">
<?= ($facturaEntity->factura_rectificada_id != null) ? lang('Facturas.facturaRectificada') : lang('Facturas.facturaRectificativa') ?>:
<?= ($facturaEntity->serie_id == 7 || $facturaEntity->serie_id == 9) ? lang('Facturas.facturaRectificada') : lang('Facturas.facturaRectificativa') ?>:
</label>
<input <?= ($facturaEntity->estado!='borrador')? "disabled":"" ?> id="facturaR" name="<?= ($facturaEntity->factura_rectificada_id != null) ? 'factura_rectificada_id' : 'factura_rectificativa_id' ?>" tabindex="" maxLength="25" class="form-control update-cabecera factura-R"
<input <?= ($facturaEntity->estado!='borrador')? "disabled":"" ?> id="facturaR" name="<?= ($facturaEntity->serie_id == 7 || $facturaEntity->serie_id == 9) ? 'factura_rectificada_id' : 'factura_rectificativa_id' ?>" tabindex="" maxLength="25" class="form-control update-cabecera factura-R"
<?php if($facturaEntity->factura_rectificada_id == null && $facturaEntity->factura_rectificativa_id == null): ?>
value=""
<?php else: ?>

View File

@ -211,7 +211,7 @@ var editor_lineas = new $.fn.dataTable.Editor( {
name: "base",
attr: {
type: "text",
name : "total",
name : "base",
class :"autonumeric"
}
}, {
@ -224,6 +224,10 @@ var editor_lineas = new $.fn.dataTable.Editor( {
name: "id",
type: "hidden"
},
{
name: "total",
type: "hidden"
}
]
} );
@ -279,7 +283,8 @@ editor_lineas.on( 'preEdit', function ( e, json, data, id ) {
editor_lineas.on( 'postSubmit', function ( e, json, data, action ) {
yeniden(json.<?= csrf_token() ?>);
tableLineas.clearPipeline();
tableLineas.draw();
});
editor_lineas.on( 'submitSuccess', function ( e, json, data, action ) {
@ -495,7 +500,7 @@ var tableLineas = $('#tableOfLineasFactura').DataTable({
$('#total-iva-sum-4').closest('tr').addClass('d-none');
}
else{
totalTotal += totalIVA_4;
//totalTotal += totalIVA_4;
$('#total-iva-sum-4').closest('tr').removeClass('d-none');
}
autoNumericIVA_21.set(totalIVA_21);
@ -503,17 +508,18 @@ var tableLineas = $('#tableOfLineasFactura').DataTable({
$('#total-iva-sum-21').closest('tr').addClass('d-none');
}
else{
totalTotal += totalIVA_21;
//totalTotal += totalIVA_21;
$('#total-iva-sum-21').closest('tr').removeClass('d-none');
}
autoNumericTotal.set(totalTotal);
var total_pagos = autoNumericTotalCobrado.getNumber();
var pendientePago = totalTotal - total_pagos;
if (isNaN(pendientePago)) pendientePago = 0;
autoNumericPendientePago.set(pendientePago);
if(!(<?= $facturaEntity->serie_id ?> == 7 || <?= $facturaEntity->serie_id ?> == 9)){
var total_pagos = autoNumericTotalCobrado.getNumber();
var pendientePago = totalTotal - total_pagos;
if (isNaN(pendientePago)) pendientePago = 0;
autoNumericPendientePago.set(pendientePago);
}
$.ajax({
url: '<?= route_to('updateFacturaTotales', $facturaEntity->id) ?>',

View File

@ -17,7 +17,7 @@
<?= !empty($validation->getErrors()) ? $validation->listErrors("bootstrap_style") : "" ?>
<?= view("themes/vuexy/form/facturas/_facturaCabeceraItems") ?>
<?php if($facturaEntity->estado =='borrador') : ?>
<?php if($facturaEntity->estado =='borrador' && !($facturaEntity->serie_id == 7 || $facturaEntity->serie_id == 9)) : ?>
<?= view("themes/vuexy/form/facturas/_addPedidosItems") ?>
<?php endif; ?>

View File

@ -28,7 +28,7 @@
</div>
<div class="col-md-4 mb-3 d-flex align-items-end">
<button type="button" id="importBtn" class="btn btn-success w-100">
<button type="button" id="importBtn" class="btn btn-success w-100" disabled>
<i class="fas fa-file-import me-2"></i> <?= lang('Importador.importar') ?? 'Importar' ?>
</button>
</div>