Facturacion

This commit is contained in:
2023-11-22 19:08:19 -03:00
parent b4742a501e
commit 9ab0515954
45 changed files with 1846 additions and 71 deletions

View File

@ -2,6 +2,8 @@
namespace Incoviba\Service;
use DateTimeInterface;
use DateTimeImmutable;
use DateInterval;
use Incoviba\Common\Define\Money\Provider;
use Incoviba\Common\Implement\Exception\EmptyResponse;
use Incoviba\Service\Money\MiIndicador;
@ -22,6 +24,15 @@ class Money
return $this->providers[$name];
}
public function get(string $provider, DateTimeInterface $dateTime): float
{
try {
$upper = strtoupper($provider);
return $this->getProvider($provider)->get(MiIndicador::getSymbol($provider), $dateTime);
} catch (EmptyResponse) {
return 0;
}
}
public function getUF(DateTimeInterface $dateTime): float
{
try {