|
|
@@ -125,6 +125,12 @@ class GoodsService extends BaseService
|
|
|
$query->where('a.category_id', $categoryId);
|
|
|
}
|
|
|
|
|
|
+ // 套餐类型
|
|
|
+ $mealType = isset($params['meal_type'])? intval($params['meal_type']) : 0;
|
|
|
+ if($mealType>0){
|
|
|
+ $query->where('a.meal_type', $mealType);
|
|
|
+ }
|
|
|
+
|
|
|
// 企业
|
|
|
$storeId = isset($params['store_id'])? intval($params['store_id']) : 0;
|
|
|
if($storeId>0){
|
|
|
@@ -356,7 +362,7 @@ class GoodsService extends BaseService
|
|
|
$item['cost_price'] = $costPrice;
|
|
|
$item['total'] = $price;
|
|
|
$profitTotal = round(max(0,($price-$costPrice) * $num),2);
|
|
|
- $netProfit = moneyFormat($profitTotal * $profitRate/100, 2);
|
|
|
+ $netProfit = round($profitTotal * $profitRate/100, 2);
|
|
|
$item['profit_total'] = $profitTotal; // 毛利
|
|
|
$item['net_profit'] = $netProfit; // 净利润
|
|
|
$item['num'] = $num;
|