Skip to content

Commit

Permalink
Se usa Currency de derafu. Se quitan ejemplos de docs en YAML inválid…
Browse files Browse the repository at this point in the history
…os. Se agregan normalizaciones a arreglo en Document::getDatos().
  • Loading branch information
estebandelaf committed Jan 20, 2025
1 parent 9f2d906 commit 5bd0ed5
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 583 deletions.
8 changes: 4 additions & 4 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -271,8 +271,10 @@ public function getDatos(): array
unset($array['TED'], $array['TmstFirma']);

$arrayRequired = [
'Detalle',
'Encabezado.Totales.ImptoReten',
'Detalle',
'DscRcgGlobal',
'Referencia',
];
foreach ($arrayRequired as $path) {
Arr::ensureArrayAtPath($array, $path);
Expand Down
10 changes: 5 additions & 5 deletions src/Package/Billing/Component/Document/Entity/AduanaMoneda.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@

namespace libredte\lib\Core\Package\Billing\Component\Document\Entity;

use Derafu\Lib\Core\Enum\Currency;
use Derafu\Lib\Core\Package\Prime\Component\Entity\Entity\Entity;
use libredte\lib\Core\Package\Billing\Component\Document\Enum\Moneda;

/**
* Entidad de una moneda de aduana (documentos de exportación).
Expand Down Expand Up @@ -56,16 +56,16 @@ public function getCodigoISO(): string
* Si la moneda no fue encontrada en las monedas soportadas se devolverá la
* moneda ISO 4217 XXX.
*
* @return Moneda
* @return Currency
*/
public function getMoneda(): Moneda
public function getCurrency(): Currency
{
$moneda = Moneda::tryFrom($this->getCodigoISO());
$moneda = Currency::tryFrom($this->getCodigoISO());

if ($moneda !== null) {
return $moneda;
}

return Moneda::XXX;
return Currency::XXX;
}
}
Loading

0 comments on commit 5bd0ed5

Please sign in to comment.