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 fe261e4 commit 7d23eb0
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion grumphp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ parameters:
# For Building Splash Module
mod-src: '/modules/splashsync'
mod-target: '/splashsync/'
mod-file: "splashsync.1.7.2"
mod-file: "splashsync.1.7.3"

# For Building Splash Manifest
yml-enable: false
Expand Down
2 changes: 1 addition & 1 deletion modules/splashsync/splashsync.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public function __construct()
// Init Module Main Information Fields
$this->name = 'splashsync';
$this->tab = 'administration';
$this->version = '1.7.2';
$this->version = '1.7.3';
$this->author = 'SplashSync';
$this->need_instance = 0;
$this->ps_versions_compliancy = array('min' => '1.6', 'max' => '1.7');
Expand Down
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 @@ -141,7 +141,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 7d23eb0

Please sign in to comment.