PDF reading with python

This commit is contained in:
2021-11-01 11:00:59 -03:00
parent 9f301e2175
commit 5ee267568a
74 changed files with 1092 additions and 26 deletions

View File

@ -6,6 +6,7 @@ use ProVM\Common\Alias\Model;
/**
* @property int $id
* @property string $nombre
* @property TipoCategoria $tipo_id
*/
class Categoria extends Model {
public static $_table = 'categorias';
@ -18,6 +19,13 @@ class Categoria extends Model {
}
return $this->cuentas;
}
protected $tipo;
public function tipo() {
if ($this->tipo === null) {
$this->tipo = $this->childOf(TipoCategoria::class, [Model::SELF_KEY => 'tipo_id']);
}
return $this->tipo;
}
protected $saldo;
public function saldo() {
@ -34,6 +42,7 @@ class Categoria extends Model {
public function toArray(): array {
$arr = parent::toArray();
$arr['tipo'] = $this->tipo()->toArray();
$arr['saldo'] = $this->saldo();
$arr['saldoFormateado'] = '$' . number_format($this->saldo(), 0, ',', '.');
return $arr;