mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
añadido generar factura desde pedido
This commit is contained in:
@ -120,8 +120,7 @@ $('#addNewPedidoImpresion').on('click', function(){
|
||||
// se ajustan el ancho de las columnas
|
||||
$('#pedidoImpresion').val(null).trigger('change');
|
||||
// Se actualiza la tabla de lineas de factura
|
||||
tableLineas.clearPipeline();
|
||||
$('#tableOfLineasFactura').DataTable().columns.adjust().draw();
|
||||
$('#tableOfLineasFactura').DataTable().clearPipeline().draw();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
@ -17,12 +17,12 @@
|
||||
<th>id</th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
<th><?= lang('Facturas.unidades') ?></th>
|
||||
<th><?= lang('Facturas.concepto') ?></th>
|
||||
<th><?= lang('Facturas.precioUnidad') ?></th>
|
||||
<th><?= lang('Facturas.iva') ?></th>
|
||||
<th><?= lang('Facturas.subtotal') ?></th>
|
||||
<th ></th>
|
||||
<th style="width: 10%;"><?= lang('Facturas.unidades') ?></th>
|
||||
<th ><?= lang('Facturas.concepto') ?></th>
|
||||
<th style="width: 10%;"><?= lang('Facturas.precioUnidad') ?></th>
|
||||
<th style="width: 10%;"><?= lang('Facturas.iva') ?></th>
|
||||
<th style="width: 10%;"><?= lang('Facturas.subtotal') ?></th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
</tr>
|
||||
@ -395,6 +395,10 @@ var tableLineas = $('#tableOfLineasFactura').DataTable({
|
||||
}
|
||||
|
||||
],
|
||||
drawCallback: function() {
|
||||
$(this.api().table().container()).find('table').css('width', '100%');
|
||||
this.api().columns.adjust();
|
||||
},
|
||||
footerCallback: function (row, data, start, end, display) {
|
||||
updateFooterLineas(this.api());
|
||||
}
|
||||
|
||||
@ -10,12 +10,19 @@
|
||||
<div id="accordionFacturasTip" class="accordion-collapse collapse show" data-bs-parent="#accordioFacturas">
|
||||
<div class="accordion-body">
|
||||
|
||||
<?php if ($pedidoEntity->estado == 'finalizado') : ?>
|
||||
<div class="d-flex justify-content-end">
|
||||
<button type="button" class="btn btn-primary btn-md" id="add-factura" ><span><?= lang("Pedidos.addFactura") ?><i class="ti ti-receipt-2 ti-xs"></i></span></button>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<table id="tableOfFacturas" class="table table-striped table-hover" style="width: 100%;grid-template-columns: 1fr 1fr 6fr 1fr 1fr 1fr;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="max-width:60px;"></th>
|
||||
<th>ID</th>
|
||||
<th><?= lang('Facturas.numeroFactura') ?></th>
|
||||
<th><?= lang('Facturas.ejemplares') ?></th>
|
||||
<th><?= lang('Facturas.serieFacturacion') ?></th>
|
||||
<th><?= lang('Facturas.estado') ?></th>
|
||||
<th><?= lang('Facturas.fechaFactura') ?></th>
|
||||
@ -43,7 +50,7 @@ const actionBtns_facturas = function(data) {
|
||||
</td>`;
|
||||
};
|
||||
|
||||
tablaFacturasPedido = $('#tableOfFacturas').DataTable({
|
||||
window.tablaFacturasPedido = $('#tableOfFacturas').DataTable({
|
||||
processing: true,
|
||||
serverSide: true,
|
||||
autoWidth: true,
|
||||
@ -75,6 +82,7 @@ tablaFacturasPedido = $('#tableOfFacturas').DataTable({
|
||||
{ 'data': actionBtns_facturas },
|
||||
{ 'data': 'id' },
|
||||
{ 'data': 'numero' },
|
||||
{ 'data': 'ejemplares'},
|
||||
{ 'data': 'serie' },
|
||||
{ 'data': 'estado',
|
||||
render: function(data, type, row, meta) {
|
||||
|
||||
@ -96,6 +96,10 @@ var tableOfLineasPedido = new DataTable('#tableOfLineasPedido',{
|
||||
orderable: false,
|
||||
},
|
||||
],
|
||||
drawCallback: function(){
|
||||
$(this.api().table().container()).find('table').css('width', '100%');
|
||||
this.api().columns.adjust();
|
||||
},
|
||||
footerCallback: function (row, data, start, end, display) {
|
||||
let api = this.api();
|
||||
|
||||
@ -124,7 +128,7 @@ var tableOfLineasPedido = new DataTable('#tableOfLineasPedido',{
|
||||
|
||||
|
||||
$(document).on('click', '.btn-view', function(e) {
|
||||
<?php if (auth()->user()->inGroup('admin') || auth()->user()->inGroup('beta')): ?>
|
||||
<?php if (!auth()->user()->inGroup('cliente-admin') && !auth()->user()->inGroup('cliente-editor')): ?>
|
||||
var url = '<?= route_to('editarPresupuestoAdmin', ':id') ?>';
|
||||
<?php else: ?>
|
||||
var url = '<?= route_to('editarPresupuestoCliente2', ':id') ?>';
|
||||
|
||||
@ -70,6 +70,7 @@
|
||||
href="<?= site_url("/themes/vuexy/vendor/libs/datatables-sk/plugins/buttons/buttons.bootstrap5.min.css") ?>">
|
||||
<link rel="stylesheet" href="<?= site_url('themes/vuexy/css/sk-datatables.css') ?>">
|
||||
<link rel="stylesheet" href="<?= site_url('themes/vuexy/vendor/libs/sweetalert2/sweetalert2.css') ?>" />
|
||||
<link rel="stylesheet" href="<?= site_url('themes/vuexy/css/pedidos.css') ?>">
|
||||
|
||||
<?= $this->endSection() ?>
|
||||
|
||||
@ -89,4 +90,6 @@
|
||||
<script src="<?= site_url("/themes/vuexy/vendor/libs/datatables-sk/plugins/pdfmake/pdfmake.min.js") ?>"
|
||||
crossorigin="anonymous" referrerpolicy="no-referrer"></script>
|
||||
<script src="<?= site_url("/themes/vuexy/vendor/libs/datatables-sk/plugins/pdfmake/vfs_fonts.js") ?>"></script>
|
||||
|
||||
<script type="module" src="<?= site_url("assets/js/safekat/pages/pedidos/pedidos.js") ?>"></script>
|
||||
<?= $this->endSection() ?>
|
||||
Reference in New Issue
Block a user