Facturacion
This commit is contained in:
@ -1,7 +1,9 @@
|
||||
<?php
|
||||
namespace Incoviba\Model\Proyecto;
|
||||
|
||||
class Superficie
|
||||
use JsonSerializable;
|
||||
|
||||
class Superficie implements JsonSerializable
|
||||
{
|
||||
public float $sobre_nivel;
|
||||
public float $bajo_nivel;
|
||||
@ -10,4 +12,13 @@ class Superficie
|
||||
{
|
||||
return $this->bajo_nivel + $this->sobre_nivel;
|
||||
}
|
||||
|
||||
public function jsonSerialize(): mixed
|
||||
{
|
||||
return [
|
||||
'sobre_nivel' => $this->sobre_nivel,
|
||||
'bajo_nivel' => $this->bajo_nivel,
|
||||
'total' => $this->total()
|
||||
];
|
||||
}
|
||||
}
|
||||
|
@ -1,8 +1,21 @@
|
||||
<?php
|
||||
namespace Incoviba\Model\Proyecto;
|
||||
|
||||
class Terreno
|
||||
use DateTimeInterface;
|
||||
use JsonSerializable;
|
||||
|
||||
class Terreno implements JsonSerializable
|
||||
{
|
||||
public float $superficie;
|
||||
public float $valor;
|
||||
public ?DateTimeInterface $date;
|
||||
|
||||
public function jsonSerialize(): mixed
|
||||
{
|
||||
return [
|
||||
'superficie' => $this->superficie,
|
||||
'valor' => $this->valor,
|
||||
'date' => $this->date?->format('Y-m-d')
|
||||
];
|
||||
}
|
||||
}
|
||||
|
@ -12,6 +12,7 @@ class Unidad extends Ideal\Model
|
||||
public string $descripcion;
|
||||
public ?string $orientacion = '';
|
||||
public Model\Proyecto\ProyectoTipoUnidad $proyectoTipoUnidad;
|
||||
public ?float $prorrateo;
|
||||
|
||||
public array $precios = [];
|
||||
public ?Precio $currentPrecio = null;
|
||||
@ -50,7 +51,8 @@ class Unidad extends Ideal\Model
|
||||
'piso' => $this->piso,
|
||||
'descripcion' => $this->descripcion,
|
||||
'orientacion' => $this->orientacion,
|
||||
'proyecto_tipo_unidad' => $this->proyectoTipoUnidad
|
||||
'proyecto_tipo_unidad' => $this->proyectoTipoUnidad,
|
||||
'prorrateo' => $this->prorrateo
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user