zz 6 vuotta sitten
vanhempi
commit
174260af08
1 muutettua tiedostoa jossa 6 lisäystä ja 0 poistoa
  1. 6 0
      app/Modules/Book/Services/BookGiftsService.php

+ 6 - 0
app/Modules/Book/Services/BookGiftsService.php

@@ -144,6 +144,9 @@ class BookGiftsService
         ];
         if($property == 'none' || $property == 'low'){
             $gift = [];
+            if($price <2){
+                return [];
+            }
             if($price <18 && $price >=2){
                 $gift = [['gift_id'=>6,'num'=>1,'name_desc'=>'','cost'=>'','icon'=>'']];
             }elseif ($price <30){
@@ -200,6 +203,9 @@ class BookGiftsService
 
         if($property == 'high' || $property == 'medium'){
             $gift = [];
+            if($price < 18){
+                return [];
+            }
             if($price <30 && $price >=18){
                 $gift = [
                     ['gift_id'=>6,'num'=>1,'name_desc'=>'','cost'=>'','icon'=>''],