cody 2 years ago
parent 6aeb2c7af2
commit 13914acfa6

@ -266,6 +266,7 @@ class StatisticsController extends CommonController
$query->where("project_id", $project_id);
})
->get();
$recharges_sum = $recharges->sum('money');
$refunds = Refund::whereNotNull("paid_at")
->where(function ($query) use ($hushizhang, $orderIds) {
@ -278,8 +279,8 @@ class StatisticsController extends CommonController
$query->where("project_id", $project_id);
})
->get();
return view($this->bladePath . ".finance", compact("recharges", "refunds", "projects", "project_id", "months", "month"));
$refunds_sum = $refunds->sum('money');
return view($this->bladePath . ".finance", compact("recharges_sum", "refunds_sum", "recharges", "refunds", "projects", "project_id", "months", "month"));
}
public function memberBalanceByDate(Request $request)
@ -419,12 +420,12 @@ class StatisticsController extends CommonController
}
// 获取所有列
$lie = [];
if(isset($data[0]->lies)){
if (isset($data[0]->lies)) {
$lie = array_column($data[0]->lies, 'name');
}
$months = $this->_getMonths();
return view($this->bladePath . ".huli", compact("sumOrderTotal","data", "month", "lie", "projects", "project_id"));
return view($this->bladePath . ".huli", compact("sumOrderTotal", "data", "month", "lie", "projects", "project_id"));
}
/**

@ -82,6 +82,10 @@
<td class="p-1">{{ $item->refunds_count ? $item->refunds_count : "" }}</td>
</tr>
@endforeach
<tr>
<td>合计</td>
<td>{{$recharges_sum}}</td>
</tr>
</tbody>
</table>
<h5>退款明细</h5>

Loading…
Cancel
Save