2021-11-01 11:00:59 -03:00
|
|
|
<?php
|
|
|
|
namespace Contabilidad;
|
|
|
|
|
|
|
|
use ProVM\Common\Alias\Model;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @property int $id
|
|
|
|
* @property string $descripcion
|
2021-12-06 22:10:41 -03:00
|
|
|
* @property string $color
|
2021-11-01 11:00:59 -03:00
|
|
|
*/
|
|
|
|
class TipoCuenta extends Model {
|
2022-04-18 22:13:17 -04:00
|
|
|
public static $_table = 'tipos_cuenta';
|
|
|
|
protected static $fields = ['descripcion', 'color'];
|
|
|
|
|
|
|
|
public function cargo()
|
|
|
|
{
|
|
|
|
$tipos = [
|
|
|
|
'activo',
|
|
|
|
'perdida',
|
|
|
|
'banco'
|
|
|
|
];
|
|
|
|
if (in_array(strtolower($this->descripcion), $tipos)) {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
return true;
|
|
|
|
}
|
2021-12-06 22:10:41 -03:00
|
|
|
}
|