dev
Aji Kamaludin 1 year ago
parent 4b9b4a69c7
commit c770f8be10
No known key found for this signature in database
GPG Key ID: 19058F67F0083AD3

@ -4,6 +4,7 @@
- [ ] expired point - [ ] expired point
- [ ] like query must use ? and change to lower case or somethink else - [ ] like query must use ? and change to lower case or somethink else
- [ ] admin create pembayaran
## Front ## Front

@ -48,12 +48,12 @@ class GeneralController extends Controller
$year = Carbon::parse($request->year); $year = Carbon::parse($request->year);
} }
$saleDepositCharts = Sale::selectRaw('SUM(amount) as sale_total, DATE(date_time)') $saleDepositCharts = Sale::selectRaw('SUM(amount) as sale_total, DATE(date_time) as date')
->whereBetween('date_time', [$startDate, $endDate]) ->whereBetween('date_time', [$startDate, $endDate])
->where('payed_with', Sale::PAYED_WITH_DEPOSIT) ->where('payed_with', Sale::PAYED_WITH_DEPOSIT)
->groupBy(DB::raw('DATE(date_time)')); ->groupBy(DB::raw('DATE(date_time)'));
$salePaylaterCharts = Sale::selectRaw('SUM(amount) as sale_total, DATE(date_time)') $salePaylaterCharts = Sale::selectRaw('SUM(amount) as sale_total, DATE(date_time) as date')
->whereBetween('date_time', [$startDate, $endDate]) ->whereBetween('date_time', [$startDate, $endDate])
->where('payed_with', Sale::PAYED_WITH_PAYLATER) ->where('payed_with', Sale::PAYED_WITH_PAYLATER)
->groupBy(DB::raw('DATE(date_time)')); ->groupBy(DB::raw('DATE(date_time)'));

Loading…
Cancel
Save