wesmiler 1 hafta önce
ebeveyn
işleme
4c8e2a4b96
1 değiştirilmiş dosya ile 1 ekleme ve 1 silme
  1. 1 1
      app/Services/Api/GoodsService.php

+ 1 - 1
app/Services/Api/GoodsService.php

@@ -344,7 +344,7 @@ class GoodsService extends BaseService
                     $item['bd_score'] = $bdScore;
                     $item['cost_price'] = $costPrice;
                     $item['total'] = $price;
-                    $profitTotal = round(max(0,$price-$costPrice),2);
+                    $profitTotal = round(max(0,($price-$costPrice) * $num),2);
                     $item['profit_total'] = $profitTotal;
                     $item['num'] = $num;
                     $total = round($price * $num,2);