FIX: gastos en blanco

This commit is contained in:
2020-06-04 11:51:29 -04:00
parent 0c0724aacf
commit ade2ebcfc2

View File

@ -24,7 +24,7 @@ class Oficina extends Producto {
} }
public function map($data): Model { public function map($data): Model {
parent::map($data); parent::map($data);
if (strpos($this->gastos, '.') === false) { if (strpos($this->gastos, '.') === false and $data->gastos != '') {
$this->gastos = number_format($data->gastos, 0, ',', '.'); $this->gastos = number_format($data->gastos, 0, ',', '.');
} }
return $this; return $this;