fix test suite
This commit is contained in:
@@ -125,6 +125,12 @@ class BaseFacade implements FacadeInterface
|
||||
|
||||
}
|
||||
|
||||
public function getCartTotalTaxPrice()
|
||||
{
|
||||
$taxCountry = $this->getContainer()->get('thelia.taxEngine')->getDeliveryCountry();
|
||||
return $this->getCart()->getTaxedAmount($taxCountry);
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the Checkout currency EUR|USD
|
||||
*
|
||||
|
||||
@@ -83,6 +83,13 @@ interface FacadeInterface
|
||||
*/
|
||||
public function getCartTotalPrice();
|
||||
|
||||
/**
|
||||
* Return Product total tax price
|
||||
*
|
||||
* @return float
|
||||
*/
|
||||
public function getCartTotalTaxPrice();
|
||||
|
||||
/**
|
||||
* Return the Checkout currency EUR|USD
|
||||
*
|
||||
|
||||
@@ -103,10 +103,9 @@ class RemoveXPercent extends CouponAbstract
|
||||
'Percentage must be inferior to 100'
|
||||
);
|
||||
}
|
||||
$taxCountry = $this->facade->getContainer()->get('thelia.taxEngine')->getDeliveryCountry();
|
||||
$basePrice = $this->facade->getCart()->getTaxedAmount($taxCountry);
|
||||
|
||||
return round($basePrice * $this->percentage/100, 2);
|
||||
|
||||
return round($this->facade->getCartTotalTaxPrice() * $this->percentage/100, 2);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user