|
|
@@ -241,7 +241,8 @@ 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::whereIn('group_order_id',$groupOrderIds)
|
|
|
+ $paid_amounts = GroupUserOrder::alias("a")->whereIn('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');
|