Skip to content

Commit

Permalink
MAGETWO-25084: [GITHUB] About ByPercent.php under different currencies
Browse files Browse the repository at this point in the history
  • Loading branch information
Olexandr Lysenko committed Jan 14, 2015
1 parent 6e6e2af commit e7e2426
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,9 @@ protected function _calculate($rule, $item, $qty, $rulePercent)
$discountData->setAmount(($qty * $itemPrice - $item->getDiscountAmount()) * $_rulePct);
$discountData->setBaseAmount(($qty * $baseItemPrice - $item->getBaseDiscountAmount()) * $_rulePct);
$discountData->setOriginalAmount(($qty * $itemOriginalPrice - $item->getDiscountAmount()) * $_rulePct);
$discountData->setBaseOriginalAmount(($qty * $baseItemOriginalPrice - $item->getDiscountAmount()) * $_rulePct);
$discountData->setBaseOriginalAmount(
($qty * $baseItemOriginalPrice - $item->getBaseDiscountAmount()) * $_rulePct
);

if (!$rule->getDiscountQty() || $rule->getDiscountQty() > $qty) {
$discountPercent = min(100, $item->getDiscountPercent() + $rulePercent);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ public function calculateDataProvider()
'amount' => 42,
'baseAmount' => 25.5,
'originalAmount' => 51,
'baseOriginalAmount' => 46.5,
'baseOriginalAmount' => 34.5,
],
]
];
Expand Down

0 comments on commit e7e2426

Please sign in to comment.