|
|
|
|
@ -251,7 +251,7 @@ class StatisticsController extends CommonController
|
|
|
|
|
$refund = $model_refund->sum("money");
|
|
|
|
|
|
|
|
|
|
$refund_by_payment = $model_refund->select("payment", "paid_at", "money", "order_id")->addSelect(DB::raw("sum(`money`) as total"))->groupBy("payment")->get()->keyBy("payment")->toArray();
|
|
|
|
|
dd($refund_by_payment);
|
|
|
|
|
// dd($refund_by_payment);
|
|
|
|
|
$refund_methods = (new Refund())->groupBy("payment")->get()->keyBy("payment")->toArray();
|
|
|
|
|
foreach ($refund_methods as $k => $refund_method) {
|
|
|
|
|
$refund_by_methods[$k] = $model_refund->where("payment", $k)->sum("money");
|
|
|
|
|
|