Skip to content

Commit

Permalink
Merge pull request #110 from benjicarson/patch-3
Browse files Browse the repository at this point in the history
fix: Resolve Calculator::getDiscountableAmount incongruity
  • Loading branch information
wilr committed Sep 27, 2023
2 parents 7db1e34 + cafdce9 commit fe12b93
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Calculator.php
Expand Up @@ -168,7 +168,7 @@ protected function getDiscountableAmount($discount)
foreach ($this->order->Items() as $item) {
if (ItemDiscountConstraint::match($item, $discount)) {
$amount += $item->hasMethod('DiscountableAmount') ?
$item->DiscountableAmount() :
$item->DiscountableAmount() * $item->Quantity :
$item->Total();
}
}
Expand Down

0 comments on commit fe12b93

Please sign in to comment.