mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
añadiendo linea factura
This commit is contained in:
@ -75,9 +75,54 @@
|
||||
$('#pedidoImpresion').select2({
|
||||
placeholder: "<?= lang('Facturas.pedidoImpresion') ?>",
|
||||
allowClear: true,
|
||||
width: '100%'
|
||||
ajax: {
|
||||
url: '<?= route_to("menuPedidosPendientesImpresion", $facturaEntity->cliente_id) ?>',
|
||||
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
|
||||
}
|
||||
});
|
||||
|
||||
$('#addNewPedidoImpresion').on('click', function(){
|
||||
var lineaPedido = $('#pedidoImpresion').val();
|
||||
if(lineaPedido == null) {
|
||||
return;
|
||||
}
|
||||
$.ajax({
|
||||
url: '<?= route_to("addLineaPedidoImpresion2Factura", $facturaEntity->id) ?>',
|
||||
type: 'post',
|
||||
data: {
|
||||
lineaPedido: lineaPedido,
|
||||
<?= csrf_token() ?? "token" ?> : <?= csrf_token() ?>v
|
||||
},
|
||||
success: function(response) {
|
||||
yeniden(response.<?= csrf_token() ?>);
|
||||
$('#lineaPedido').val(null).trigger('change');
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
|
||||
$('#pedidoMaquetacion').select2({
|
||||
placeholder: "<?= lang('Facturas.pedidoMaquetacion') ?>",
|
||||
allowClear: true,
|
||||
|
||||
Reference in New Issue
Block a user