Skip to content

Commit

Permalink
FIX: Négative Order Totals VAT
Browse files Browse the repository at this point in the history
  • Loading branch information
BadPixxel committed Jan 24, 2023
1 parent 7cd6c82 commit dab5ad4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/splashsync/src/Objects/Order/TotalsTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ private function getTotalsFields(string $key, string $fieldName): void
*/
private static function toVatPercents(float $priceTaxExcl, float $priceTaxIncl): float
{
return (($priceTaxExcl > 0) && ($priceTaxIncl > 0))
return (($priceTaxExcl > 0) && ($priceTaxIncl > 0) && ($priceTaxExcl > $priceTaxIncl))
? 100 * ($priceTaxIncl - $priceTaxExcl) / $priceTaxExcl
: 0.0
;
Expand Down

0 comments on commit dab5ad4

Please sign in to comment.