dyjh il y a 6 ans
Parent
commit
1eac57866a
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. 1 1
      app/Http/Controllers/Api/V1/AlbumController.php

+ 1 - 1
app/Http/Controllers/Api/V1/AlbumController.php

xqd
@@ -2645,7 +2645,7 @@ class AlbumController extends Controller
         if ($data['point'] != 0) {
             $product = AlbumProductModel::where('store_id',$data['store_id'])->get(['id','price_default']);
             foreach ($product as $key=>$val) {
-                $save['price'] = $val['price_default'] * $data['point']/100;
+                $save['price'] = $val['price_default'] * (1 + $data['point'] / 100);
                 $check = AlbumProductPriceModel::where([['agent_id',$user_agent->id],['store_id',$data['store_id']],['product_id',$val['id']]])->first();
                 if(empty($check)){
                     $save['agent_id'] = $user_agent->id;