|
|
@@ -241,11 +241,11 @@ class SaleCommissionLists extends BaseAdminDataLists implements ListsSearchInter
|
|
|
$propertyHeadIds = PropertyHead::where('sale_id','>',0)->where('is_cooperate','=',1)->where('sale_id',$sale_id)->column('id')??[];
|
|
|
$groupOrderIds = GroupOrder::whereIn('property_head_id',$propertyHeadIds)->column('id')??[];
|
|
|
//->whereB('pay_time',1)->
|
|
|
- $paid_amounts = GroupUserOrder::alias("a")->whereIn('group_order_id',$groupOrderIds)
|
|
|
+ $paid_amounts = GroupUserOrder::alias("a")->whereIn('a.group_order_id',$groupOrderIds)
|
|
|
->join('group_service_work as b','a.id = b.group_user_order_id AND b.service_status = 3')
|
|
|
- ->where('status',1)
|
|
|
- ->whereBetween('pay_time',[$whereTime[0],$whereTime[1]])
|
|
|
- ->sum('paid_amount');
|
|
|
+ ->where('a.status',1)
|
|
|
+ ->whereBetween('a.pay_time',[$whereTime[0],$whereTime[1]])
|
|
|
+ ->sum('a.paid_amount');
|
|
|
$groupCounts[$sale_id] = $paid_amounts;
|
|
|
}
|
|
|
return $groupCounts;
|