Facturacion

This commit is contained in:
Juan Pablo Vial
2024-04-15 20:13:15 -04:00
parent 8e4b5eaaf8
commit a33dd341cd
8 changed files with 259 additions and 6 deletions

View File

@ -177,7 +177,7 @@
const cantidad = this.unidades.length
this.unidades.forEach(unidad => {
const values = [
venta,
'<a href="{{$urls->base}}/ventas/factura/' + this.id + '">' + venta + '</a>',
cantidad,
unidad.tipo,
unidad.descripcion,

View File

@ -184,8 +184,8 @@
totales: {},
proporcion: 1,
precio: {{$UF->transform($venta->currentEstado()->fecha, $venta->valor)}},
terreno: {{(isset($venta->proyecto()->terreno->fecha) and $venta->proyecto()->terreno->fecha >= $lastDic) ?
$IPC->readjust($venta->proyecto()->terreno->valor, $venta->proyecto()->terreno->fecha, $venta->currentEstado()->fecha) : 0}},
terreno: {{(isset($terreno->fecha) and $terreno->fecha >= $lastDic) ?
$IPC->readjust($terreno->valor, $terreno->fecha, $venta->currentEstado()->fecha) : 0}},
uf: {{$UF->get($venta->currentEstado()->fecha)}},
unidades: JSON.parse('{!! json_encode(array_map(function(Incoviba\Model\Venta\PropiedadUnidad $unidad) use ($venta, $UF, $format) {
$precio = ($unidad->valor > 0) ? $unidad->valor : ($unidad->precio($venta->currentEstado()->fecha) ? $unidad->precio($venta->currentEstado()->fecha)->valor : 0);