Agregar Proveedor

This commit is contained in:
Juan Pablo Vial
2024-12-03 16:45:20 -03:00
parent 5b44260245
commit 42e1dcdff7
19 changed files with 473 additions and 283 deletions

View File

@ -2,6 +2,7 @@
namespace Incoviba\Model;
use Incoviba\Common\Ideal;
use Incoviba\Model\Persona\Datos;
class Persona extends Ideal\Model
{
@ -21,8 +22,8 @@ class Persona extends Ideal\Model
return number_format($this->rut, 0, ',', '.') . '-' . $this->digito;
}
protected ?DatosPersona $datos;
public function datos(): ?DatosPersona
protected ?Datos $datos;
public function datos(): ?Datos
{
if (!isset($this->datos)) {
$this->datos = $this->runFactory('datos');
@ -40,7 +41,7 @@ class Persona extends Ideal\Model
'apellidoMaterno' => $this->apellidoMaterno,
'nombreCompleto' => $this->nombreCompleto(),
'rutCompleto' => $this->rutCompleto(),
'datos' => $this->datos(),
'datos' => $this->datos() ?? null,
];
}
}