From 961f8e80f232faf4bbec24b08794a4c59987952b Mon Sep 17 00:00:00 2001 From: Carlos C Soto Date: Mon, 30 Oct 2023 09:41:49 -0600 Subject: [PATCH] Fix CI build (php-cs-fixer) Fix continuous integration: `php-cs-fixer:3.37.1` fixes. --- docs/CHANGELOG.md | 4 ++++ src/CfdiUtils/SumasConceptos/SumasConceptos.php | 6 +++--- .../Pagos/MontoBetweenIntervalSumOfDocuments.php | 10 +++++----- 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index 61061382..d933a469 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -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". diff --git a/src/CfdiUtils/SumasConceptos/SumasConceptos.php b/src/CfdiUtils/SumasConceptos/SumasConceptos.php index cd501183..45fdb311 100644 --- a/src/CfdiUtils/SumasConceptos/SumasConceptos.php +++ b/src/CfdiUtils/SumasConceptos/SumasConceptos.php @@ -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); } diff --git a/src/CfdiUtils/Validate/Cfdi33/RecepcionPagos/Pagos/MontoBetweenIntervalSumOfDocuments.php b/src/CfdiUtils/Validate/Cfdi33/RecepcionPagos/Pagos/MontoBetweenIntervalSumOfDocuments.php index 7ce6f9fc..13632e92 100644 --- a/src/CfdiUtils/Validate/Cfdi33/RecepcionPagos/Pagos/MontoBetweenIntervalSumOfDocuments.php +++ b/src/CfdiUtils/Validate/Cfdi33/RecepcionPagos/Pagos/MontoBetweenIntervalSumOfDocuments.php @@ -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,