diff --git a/app/resources/views/ventas/reservations.blade.php b/app/resources/views/ventas/reservations.blade.php
index 959eb06..007c456 100644
--- a/app/resources/views/ventas/reservations.blade.php
+++ b/app/resources/views/ventas/reservations.blade.php
@@ -533,13 +533,35 @@
'
Precio | ',
''
]
+ const rowAlters = [
+ '',
+ " align='right'",
+ " align='right'",
+ " align='right'"
+ ]
reservation.units.forEach(unit => {
let type = unit.unit.proyecto_tipo_unidad.tipo_unidad.descripcion
type = type.charAt(0).toUpperCase() + type.slice(1)
const base = unit.base ?? (unit.value ?? 0);
const price = unit.unit.current_precio?.valor ?? 0
const diff = (base - price) / price * 100
- table.push(`| ${type} ${unit.unit.descripcion}: | ${formatter.format(base)} UF | ${formatter.format(price)} UF | (${formatter.format(diff)} %) |
`)
+ const rowsData = [
+ [
+ `${type} ${unit.unit.descripcion}`,
+ `${formatter.format(base)} UF`,
+ `${formatter.format(price)} UF`,
+ `(${formatter.format(diff)} %)`
+ ]
+ ]
+ const rowContent = []
+ rowsData.forEach(row => {
+ const content = []
+ row.forEach((cell, idx) => {
+ content.push(`${cell} | `)
+ })
+ rowContent.push(`${content.join('')}
`)
+ })
+ table.push(rowContent.join(''))
})
if (reservation.broker !== null) {
table.push('| ----- |
')
diff --git a/app/resources/views/ventas/reservations/modal/add.blade.php b/app/resources/views/ventas/reservations/modal/add.blade.php
index 1f0b9fc..69109be 100644
--- a/app/resources/views/ventas/reservations/modal/add.blade.php
+++ b/app/resources/views/ventas/reservations/modal/add.blade.php
@@ -222,7 +222,7 @@
draw = {
promotion: idx => {
const promotions = this.data.promotions.map(promotion => {
- return `${promotion.name}
`
+ return `${promotion.name}
`
})
return [
``,