feature/cierres #30

Merged
aldarien merged 460 commits from feature/cierres into develop 2025-09-11 15:16:17 -03:00
339 changed files with 988 additions and 13894 deletions
Showing only changes of commit 4f4e69f0c3 - Show all commits

View File

@ -231,12 +231,12 @@
return
}
const sum_precios = departamentos.map(departamento => {
return departamento.current_precio.valor
return departamento.valor
}).reduce((sum, precio) => sum + precio, 0)
departamentos.forEach(departamento => {
const idx = units.data.units.findIndex(unit => unit.id === departamento.id)
const saldo = venta.valor - precios
units.data.units[idx].valor = saldo / sum_precios * departamento.current_precio.valor
units.data.units[idx].valor = saldo / sum_precios * departamento.valor
units.data.units[idx].venta = venta
})
})