Skip to content

Commit

Permalink
Merge pull request #28 from Smile-SA/fix-rest-number
Browse files Browse the repository at this point in the history
fix the calculation of the rest number
  • Loading branch information
maximequeneau authored Sep 14, 2020
2 parents a7f085c + ecfe6d4 commit 89379bd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Model/GiftRuleService.php
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ public function getAvailableGifts(Quote $quote)
if (isset($quoteItems[$giftRuleId])) {
$gifts[$giftRuleId][GiftRuleDataInterface::QUOTE_ITEMS] = $quoteItems[$giftRuleId];
$gifts[$giftRuleId][GiftRuleDataInterface::REST_NUMBER]
-= count($gifts[$giftRuleId][GiftRuleDataInterface::QUOTE_ITEMS]);
-= array_sum($gifts[$giftRuleId][GiftRuleDataInterface::QUOTE_ITEMS]);
}
/** @var GiftRuleDataInterface $giftRuleData */
$giftRuleData = $this->giftRuleDataFactory->create();
Expand Down

0 comments on commit 89379bd

Please sign in to comment.