Cambios en formato
This commit is contained in:
@ -30,19 +30,19 @@ class Factura extends Ideal\Model
|
||||
|
||||
public function total(): int
|
||||
{
|
||||
return round($this->venta->valor * $this->uf->valor * $this->proporcion);
|
||||
return $this->venta->valor * $this->uf->valor * $this->proporcion;
|
||||
}
|
||||
public function bruto(): int
|
||||
{
|
||||
return round($this->total() - $this->terreno * $this->proporcion);
|
||||
return $this->total() - $this->terreno * $this->proporcion;
|
||||
}
|
||||
public function iva(): int
|
||||
{
|
||||
return round($this->bruto() / 1.19 * .19);
|
||||
return $this->neto() * .19;
|
||||
}
|
||||
public function neto(): int
|
||||
{
|
||||
return round($this->bruto() / 1.19);
|
||||
return $this->bruto() / 1.19;
|
||||
}
|
||||
public function base(): int
|
||||
{
|
||||
@ -83,7 +83,7 @@ class Factura extends Ideal\Model
|
||||
'emisor' => [
|
||||
'rut' => $this->venta->proyecto()->inmobiliaria()->rut(),
|
||||
'nombre' => $this->venta->proyecto()->inmobiliaria()->nombreCompleto(),
|
||||
'direccion' => $this->venta->proyecto()->direccion(),
|
||||
'direccion' => $this->venta->proyecto()->direccion()->simple(),
|
||||
'comuna' => $this->venta->proyecto()->direccion()->comuna->descripcion
|
||||
],
|
||||
'receptor' => [
|
||||
@ -96,9 +96,12 @@ class Factura extends Ideal\Model
|
||||
'unidades' => $this->unidades,
|
||||
'detalle' => $this->detalle(),
|
||||
'total' => $this->totales(),
|
||||
'uf' => $this->uf,
|
||||
'ipc' => $this->ipc,
|
||||
'uf' => [
|
||||
'fecha' => $this->uf->fecha->format('Y-m-d'),
|
||||
'valor' => $this->uf->valor
|
||||
],
|
||||
'estados' => $this->estados()
|
||||
]);
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user