hecho el guardar de los envios, lineas y servicios

This commit is contained in:
2025-01-15 02:13:36 +01:00
parent a9eece668c
commit 0336b2eb60
6 changed files with 30 additions and 28 deletions

View File

@ -231,18 +231,18 @@ class Envios {
}
guardarEnvios() {
/* TO-DO
var id = $('#presupuesto_id').val()
async guardarEnvios() {
var id = window.location.pathname.split('/').pop();
$.post(window.routes_envios.dataTableOfPresupuestoDirecciones,
await $.post('/presupuestodirecciones/datatable',
Object.assign({ tipo: "clear_lineas", presupuesto_id: id }, window.token_ajax))
.done(function (data) {
$('#tableOfDireccionesEnvio').DataTable().rows().every(function (rowIdx, tableLoop, rowLoop) {
$('#tableOfDireccionesEnvio').DataTable().rows().every(async function (rowIdx, tableLoop, rowLoop) {
var data = this.data();
$.post('/presupuestos/presupuestodirecciones/add',
Object.assign({
await $.post('/presupuestos/presupuestodirecciones/add',
{
presupuesto_id: id,
tarifa_id: data.tarifa_id,
cantidad: data.cantidad,
@ -250,7 +250,7 @@ class Envios {
att: data.att,
email: data.email,
direccion: data.direccion,
paisId: data.paisId,
pais_id: data.pais_id,
provincia: data.provincia,
municipio: data.municipio,
cp: data.cp,
@ -260,13 +260,12 @@ class Envios {
proveedor: data.proveedor,
proveedor_id: data.proveedor_id,
entregaPieCalle: data.entregaPieCalle
}, window.token_ajax))
})
});
})
*/
}
async updateTiradaBase() {
const self = this;
@ -581,7 +580,7 @@ class Envios {
update_resumen: true,
update_tiradas_alternativas: true
});
$('#addressForm').modal("hide");
}