Facturacion, se agrega PropiedadUnidad
This commit is contained in:
@ -10,6 +10,20 @@ class Direccion extends Model
|
||||
public string $extra;
|
||||
public Comuna $comuna;
|
||||
|
||||
public function simple(): string
|
||||
{
|
||||
$arr = [
|
||||
implode(' ', [
|
||||
$this->calle,
|
||||
$this->numero
|
||||
])
|
||||
];
|
||||
if ($this->extra !== '') {
|
||||
$arr []= $this->extra;
|
||||
}
|
||||
return implode(', ', $arr);
|
||||
}
|
||||
|
||||
public function full(): string
|
||||
{
|
||||
return implode(', ', [
|
||||
|
16
app/src/Model/Venta/PropiedadUnidad.php
Normal file
16
app/src/Model/Venta/PropiedadUnidad.php
Normal file
@ -0,0 +1,16 @@
|
||||
<?php
|
||||
namespace Incoviba\Model\Venta;
|
||||
|
||||
class PropiedadUnidad extends Unidad
|
||||
{
|
||||
public int $pu_id;
|
||||
public int $propiedad_id;
|
||||
public float $valor;
|
||||
|
||||
public function jsonSerialize(): mixed
|
||||
{
|
||||
return array_merge(parent::jsonSerialize(), [
|
||||
'valor' => $this->valor
|
||||
]);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user