llp пре 1 недеља
родитељ
комит
f178add4d2

+ 1 - 1
packages/Longyi/Gift/src/Models/GiftCards.php

@@ -41,7 +41,7 @@ class GiftCards extends Model implements GiftCardsContract
         $cart->giftcard_number = $giftcard->giftcard_number;
         // 计算可以使用的礼品卡金额
         if ($cart->grand_total <= $giftcard->remaining_giftcard_amount) {
-            $cart->giftcard_amount = $cart->grand_total;
+            $cart->giftcard_amount = $cart->grand_total - 0.01;
         } else {
             $cart->giftcard_amount = $giftcard->remaining_giftcard_amount;
         }

+ 0 - 5
packages/Webkul/Shop/src/Http/Controllers/API/OnepageController.php

@@ -253,11 +253,6 @@ class OnepageController extends APIController
         if (!$giftCard) {
             throw new \Exception('The gift card does not exist or has been deleted. Please select a new gift card');
         }
-
-        if ($giftCard->giftcard_status != 1) {
-            throw new \Exception('The gift card has been used or has expired. Please choose another payment method');
-        }
-
         if ($giftCard->remaining_giftcard_amount < $cart->giftcard_amount) {
             throw new \Exception(
                 sprintf(