FIX: Totales para multipropietario no sumaban correctamente
This commit is contained in:
@ -194,7 +194,8 @@
|
|||||||
},
|
},
|
||||||
unidad: ({unidad, no, classes, formatters}) => {
|
unidad: ({unidad, no, classes, formatters}) => {
|
||||||
const descuento = this.props.terreno.valor * unidad.prorrateo * this.props.proporcion
|
const descuento = this.props.terreno.valor * unidad.prorrateo * this.props.proporcion
|
||||||
const bruto = unidad.precio - descuento
|
const precio = unidad.precio * this.props.proporcion
|
||||||
|
const bruto = precio - descuento
|
||||||
const neto = bruto / 1.19
|
const neto = bruto / 1.19
|
||||||
const data = [
|
const data = [
|
||||||
no,
|
no,
|
||||||
@ -256,7 +257,7 @@
|
|||||||
tooltips.neto = ` data-tooltip="No coinciden netos! Promesa: ${formatters.pesos.format(this.props.detalle.neto)} - Unidades: ${formatters.pesos.format(this.props.total.neto)}"`
|
tooltips.neto = ` data-tooltip="No coinciden netos! Promesa: ${formatters.pesos.format(this.props.detalle.neto)} - Unidades: ${formatters.pesos.format(this.props.total.neto)}"`
|
||||||
}
|
}
|
||||||
if (this.props.total.iva !== this.props.detalle.iva) {
|
if (this.props.total.iva !== this.props.detalle.iva) {
|
||||||
tooltips.iva = ` data-tooltip="No coinciden ivas! Promesa: ${formatters.pesos.format(this.props.detalle.iva)} - Unidades: ${formatters.pesos.format(this.props.total.iva)}"`
|
tooltips.iva = ` data-tooltip="No coinciden IVAs! Promesa: ${formatters.pesos.format(this.props.detalle.iva)} - Unidades: ${formatters.pesos.format(this.props.total.iva)}"`
|
||||||
}
|
}
|
||||||
if (this.props.total.total !== this.props.detalle.total) {
|
if (this.props.total.total !== this.props.detalle.total) {
|
||||||
tooltips.total = ` data-tooltip="No coinciden totales! Promesa: ${formatters.pesos.format(this.props.detalle.total)} - Unidades: ${formatters.pesos.format(this.props.total.total)}"`
|
tooltips.total = ` data-tooltip="No coinciden totales! Promesa: ${formatters.pesos.format(this.props.detalle.total)} - Unidades: ${formatters.pesos.format(this.props.total.total)}"`
|
||||||
@ -399,7 +400,7 @@
|
|||||||
},
|
},
|
||||||
total: () => {
|
total: () => {
|
||||||
this.props.total.exento = this.props.detalle.terreno
|
this.props.total.exento = this.props.detalle.terreno
|
||||||
this.props.total.neto = (this.props.unidades.reduce((sum, unidad) => sum + unidad.precio, 0) - this.props.total.exento) / 1.19
|
this.props.total.neto = (this.props.unidades.reduce((sum, unidad) => sum + unidad.precio, 0) * this.props.proporcion - this.props.total.exento) / 1.19
|
||||||
this.props.total.iva = this.props.total.neto * 0.19
|
this.props.total.iva = this.props.total.neto * 0.19
|
||||||
this.props.total.total = this.props.total.neto + this.props.total.iva + this.props.total.exento
|
this.props.total.total = this.props.total.neto + this.props.total.iva + this.props.total.exento
|
||||||
},
|
},
|
||||||
|
Reference in New Issue
Block a user