From 8e6d664245a4c3cb6204fb5b6d78b440a1e5c73c Mon Sep 17 00:00:00 2001 From: Henning Leutz <leutz@pcsg.de> Date: Thu, 22 Sep 2022 17:20:40 +0200 Subject: [PATCH] feat: quiqqer/erp#78 --- src/QUI/ERP/Coupons/Events.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/QUI/ERP/Coupons/Events.php b/src/QUI/ERP/Coupons/Events.php index c17b142..4d5510a 100644 --- a/src/QUI/ERP/Coupons/Events.php +++ b/src/QUI/ERP/Coupons/Events.php @@ -297,10 +297,9 @@ public static function onQuiqqerOrderBasketToOrder( ]) ); - $isUnique = $Discount->getAttribute('scope') === QUI\ERP\Discount\Handler::DISCOUNT_SCOPE_UNIQUE; - $everyProduct = $Discount->getAttribute( - 'scope' - ) === QUI\ERP\Discount\Handler::DISCOUNT_SCOPE_EVERY_PRODUCT; + $scope = $Discount->getAttribute('scope'); + $isUnique = $scope === QUI\ERP\Discount\Handler::DISCOUNT_SCOPE_UNIQUE; + $everyProduct = $scope === QUI\ERP\Discount\Handler::DISCOUNT_SCOPE_EVERY_PRODUCT; if ($everyProduct || $isUnique) { // add to the product -- GitLab