Skip to content

Commit

Permalink
Merge branch 'development'
Browse files Browse the repository at this point in the history
  • Loading branch information
eclipxe13 committed Oct 30, 2023
2 parents 72b0932 + 961f8e8 commit 0dca47a
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 8 deletions.
4 changes: 4 additions & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@
- Merge methods from `\CfdiUtils\Nodes\NodeHasValueInterface` into `\CfdiUtils\Nodes\NodeInterface`.
- Remove deprecated constant `CfdiUtils\Retenciones\Retenciones::RET_NAMESPACE`.

## Unreleased 2023-10-30

Fix continuous integration: `php-cs-fixer:3.37.1` fixes.

## Version 2.25.0 2023-10-22

Add `CfdiUtils\Elements\CartaPorte30` *Elements* to work with "Carta Porte 3.0".
Expand Down
6 changes: 3 additions & 3 deletions src/CfdiUtils/SumasConceptos/SumasConceptos.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,11 @@ private function addComprobante(NodeInterface $comprobante)

$this->total = round(array_sum([
$this->importes,
- $this->descuento,
-$this->descuento,
$this->impuestosTrasladados,
- $this->impuestosRetenidos,
-$this->impuestosRetenidos,
$this->localesImpuestosTrasladados,
- $this->localesImpuestosRetenidos,
-$this->localesImpuestosRetenidos,
]), $this->precision);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,13 @@ public function calculateDocumentAmountBounds(NodeInterface $doctoRelacionado, N
];
}

$almostTwo = 2 - (10 ** - 10);
$almostTwo = 2 - (10 ** -10);

$lowerAmount = $amount - 10 ** - $numDecimalsAmount / 2;
$lowerExchangeRate = $exchangeRate + (10 ** (- $numDecimalsExchangeRate) / $almostTwo);
$lowerAmount = $amount - 10 ** -$numDecimalsAmount / 2;
$lowerExchangeRate = $exchangeRate + (10 ** (-$numDecimalsExchangeRate) / $almostTwo);

$upperAmount = $amount + 10 ** - $numDecimalsAmount / $almostTwo;
$upperExchangeRate = $exchangeRate - (10 ** (- $numDecimalsExchangeRate) / 2);
$upperAmount = $amount + 10 ** -$numDecimalsAmount / $almostTwo;
$upperExchangeRate = $exchangeRate - (10 ** (-$numDecimalsExchangeRate) / 2);

return [
'lower' => $lowerAmount / $lowerExchangeRate,
Expand Down

0 comments on commit 0dca47a

Please sign in to comment.