Cleanup
This commit is contained in:
@ -2,6 +2,7 @@
|
||||
namespace Incoviba\Service\Venta;
|
||||
|
||||
use Incoviba\Common\Implement\Exception\EmptyResult;
|
||||
use Incoviba\Exception\ServiceAction\Read;
|
||||
use Incoviba\Repository;
|
||||
use Incoviba\Service;
|
||||
use Incoviba\Model;
|
||||
@ -51,10 +52,10 @@ class PropiedadUnidad
|
||||
try {
|
||||
$unidad->precios = $this->precioService->getByUnidad($unidad->id);
|
||||
$unidad->currentPrecio = $this->precioService->getVigenteByUnidad($unidad->id);
|
||||
if ($unidad->valor === 0 or $unidad->valor === null) {
|
||||
if ($unidad->valor === null or $unidad->valor === 0) {
|
||||
$unidad->valor = $unidad->currentPrecio->valor;
|
||||
}
|
||||
} catch (EmptyResult) {}
|
||||
} catch (Read) {}
|
||||
return $unidad;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user