mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/portal.git
synced 2026-08-30 09:54:16 +00:00
create sales report range frontend
This commit is contained in:
@@ -17,9 +17,8 @@ use Illuminate\Http\Request;
|
||||
class MonthlyReportController
|
||||
{
|
||||
public function salesReport(Request $request): JsonResponse {
|
||||
|
||||
$from = $request->input('from') ? Carbon::parse($request->input('from')) : Carbon::now()->startOfMonth();
|
||||
$to = $request->input('to') ? Carbon::parse($request->input('to')) : Carbon::now()->endOfMonth();
|
||||
$from = $request->route('from') ? Carbon::parse($request->route('from')) : Carbon::now()->startOfMonth();
|
||||
$to = $request->route('to') ? Carbon::parse($request->route('to')) : Carbon::now()->endOfMonth();
|
||||
|
||||
$containers = Container::whereBetween('loading_date', [$from, $to])->orderBy('loading_date')->get();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user