Auth, Login, Home, Venta->Listados->Precios

This commit is contained in:
Juan Pablo Vial
2023-07-24 20:55:26 -04:00
parent d9d5a15376
commit 1a7b10ce3c
130 changed files with 4302 additions and 0 deletions

View File

@ -0,0 +1,46 @@
<?php
namespace Incoviba\Model\Venta;
use Incoviba\Common\Ideal\Model;
use Incoviba\Model\Direccion;
class Propietario extends Model
{
public int $rut;
public string $dv;
public string $nombres;
public array $apellidos;
public Datos $datos;
public ?Propietario $representante;
public ?bool $otro;
public function rut(): string
{
return implode('-', [
number_format($this->rut, 0, ',', '.'),
$this->dv
]);
}
public function nombreCompleto(): string
{
return implode(' ', [
$this->nombres,
implode(' ', $this->apellidos)
]);
}
public function jsonSerialize(): mixed
{
return array_merge([
'rut' => $this->rut,
'dv' => $this->dv,
'rut_formateado' => $this->rut(),
'nombres' => $this->nombres,
'apellidos' => $this->apellidos,
'nombre_completo' => $this->nombreCompleto(),
], $this->datos->jsonSerialize(), [
'representante' => $this->representante ?? '',
'otro' => $this->otro ?? ''
]);
}
}