diff --git a/app/resources/views/ventas/facturacion/show.blade.php b/app/resources/views/ventas/facturacion/show.blade.php index cc12bd1..d5a5910 100644 --- a/app/resources/views/ventas/facturacion/show.blade.php +++ b/app/resources/views/ventas/facturacion/show.blade.php @@ -167,6 +167,7 @@ const ufFormatter = new Intl.NumberFormat('es-CL', {maximumFractionDigits: 2, minimumFractionDigits: 2}) const percentFormatter = new Intl.NumberFormat('es-CL', {maximumFractionDigits: 5, minimumFractionDigits: 5}) let terreno = 0 + let prorrateo = 0 let c = 1 const classes = [ '', @@ -179,6 +180,7 @@ this.unidades.forEach(unidad => { const descuento = this.terreno * unidad.prorrateo terreno += descuento + prorrateo += unidad.prorrateo const bruto = unidad.base - descuento const neto = bruto / 1.19 const data = [ @@ -207,7 +209,6 @@ const subtotal = base + iva const total = subtotal + terreno const totalUF = total / this.uf - const descuento = terreno / base const data = [ c, @@ -217,7 +218,7 @@ 'SUBTOTAL ' + pesoFormatter.format(subtotal * this.proporcion) + '
' + 'Mas valor terreno ' + pesoFormatter.format(terreno * this.proporcion) + '
' + 'TOTAL ' + pesoFormatter.format(total * this.proporcion) + ';' + ufFormatter.format(totalUF * this.proporcion) + ' UF

' + - 'Descuento Terreno: ' + percentFormatter.format(descuento * 100) + '%

' + + 'Descuento Terreno: ' + percentFormatter.format(prorrateo) + '%

' + 'UF: ' + ufFormatter.format(this.uf), '1 UNID', pesoFormatter.format(terreno * this.proporcion),