{"id":"1780849367-3701-748990671","version":1,"type":"request","time":1780849367.3398029804229736328125,"method":"GET","url":"http:\/\/retail-demo-api.dinex.app\/public\/api\/v1\/dashboard\/charts\/list?period=month","uri":"\/public\/api\/v1\/dashboard\/charts\/list?period=month","headers":{"host":["retail-demo-api.dinex.app"],"x-forwarded-proto":["https"],"cf-visitor":["{\"scheme\":\"https\"}"],"cf-ipcountry":["AE"],"cf-connecting-ip":["86.97.10.28"],"cdn-loop":["cloudflare; loops=1"],"cf-ray":["a080ff610b69882e-HKG"],"connection":["Keep-Alive"],"accept-language":["en-AE,en-GB;q=0.9,en-US;q=0.8,en;q=0.7"],"accept-encoding":["gzip, br"],"referer":["https:\/\/yasmenelsham-dashboard.dinex.app\/"],"sec-fetch-dest":["empty"],"sec-fetch-mode":["cors"],"sec-fetch-site":["same-site"],"origin":["https:\/\/yasmenelsham-dashboard.dinex.app"],"sec-ch-ua-mobile":["?0"],"sec-ch-ua":["\"Google Chrome\";v=\"149\", \"Chromium\";v=\"149\", \"Not)A;Brand\";v=\"24\""],"accept":["application\/json, text\/plain, *\/*"],"user-agent":["Mozilla\/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/149.0.0.0 Safari\/537.36"],"lang":["en"],"sec-ch-ua-platform":["\"macOS\""],"priority":["u=1, i"],"authorization":["Bearer TWqCdrj8tDGG3xYzSQT7EgNtz8yVvG6JAQoXtEV31g178L2MMz42UuULyucpnEHlxWCIKPNCWdTkBrHC"]},"controller":"App\\Http\\Controllers\\Dashboard\\DashboardChartsController@index","getData":{"period":"month"},"postData":[],"requestData":"","sessionData":{"_token":"BczXRwgSiM39SFvnr9UnvlV5baAwYZ9EZQ7rSpJj","_previous":{"__type__":"array","url":"http:\/\/retail-demo-api.dinex.app\/public\/api\/v1\/dashboard\/charts\/list?period=month"},"_flash":{"__type__":"array","old":{"__type__":"array"},"new":{"__type__":"array"}}},"authenticatedUser":{"id":1,"username":"admin@dinex.com","email":"admin@dinex.com","name":"Admin Dinex"},"cookies":[],"responseTime":1780849367.4167668819427490234375,"responseStatus":200,"responseDuration":76.963901519775390625,"memoryUsage":25165824,"middleware":["api","auth.session","auth_api","api.role:admin|superadmin","api.role:superadmin|admin","api.permission:reports.read"],"databaseQueries":[{"query":"SELECT `id`, `name` FROM `payment_types`","duration":1.1599999999999999200639422269887290894985198974609375,"connection":"mysql","time":1780849367.3963921070098876953125,"trace":[{"call":"Illuminate\\Database\\Eloquent\\Builder->get()","file":"\/home\/dinexzx\/public_html\/retail-demo\/api\/app\/Repositories\/Dashboard\/DashboardChartsRepository.php","line":36,"isVendor":false},{"call":"App\\Repositories\\Dashboard\\DashboardChartsRepository->__construct()","file":null,"line":null,"isVendor":false},{"call":"ReflectionClass->newInstanceArgs()","file":"\/home\/dinexzx\/public_html\/retail-demo\/api\/vendor\/laravel\/framework\/src\/Illuminate\/Container\/Container.php","line":952,"isVendor":true},{"call":"Illuminate\\Container\\Container->build()","file":"\/home\/dinexzx\/public_html\/retail-demo\/api\/vendor\/laravel\/framework\/src\/Illuminate\/Container\/Container.php","line":795,"isVendor":true},{"call":"Illuminate\\Container\\Container->resolve()","file":"\/home\/dinexzx\/public_html\/retail-demo\/api\/vendor\/laravel\/framework\/src\/Illuminate\/Foundation\/Application.php","line":986,"isVendor":true},{"call":"Illuminate\\Foundation\\Application->resolve()","file":"\/home\/dinexzx\/public_html\/retail-demo\/api\/vendor\/laravel\/framework\/src\/Illuminate\/Container\/Container.php","line":296,"isVendor":true},{"call":"Illuminate\\Container\\Container->Illuminate\\Container\\{closure}()","file":"\/home\/dinexzx\/public_html\/retail-demo\/api\/vendor\/laravel\/framework\/src\/Illuminate\/Container\/Container.php","line":908,"isVendor":true},{"call":"Illuminate\\Container\\Container->build()","file":"\/home\/dinexzx\/public_html\/retail-demo\/api\/vendor\/laravel\/framework\/src\/Illuminate\/Container\/Container.php","line":795,"isVendor":true},{"call":"Illuminate\\Container\\Container->resolve()","file":"\/home\/dinexzx\/public_html\/retail-demo\/api\/vendor\/laravel\/framework\/src\/Illuminate\/Foundation\/Application.php","line":986,"isVendor":true},{"call":"Illuminate\\Foundation\\Application->resolve()","file":"\/home\/dinexzx\/public_html\/retail-demo\/api\/vendor\/laravel\/framework\/src\/Illuminate\/Container\/Container.php","line":731,"isVendor":true}],"model":"App\\Models\\PaymentType","tags":[]},{"query":"SELECT `id`, `name` FROM `branches`","duration":0.13000000000000000444089209850062616169452667236328125,"connection":"mysql","time":1780849367.39832401275634765625,"trace":[{"call":"Illuminate\\Database\\Eloquent\\Builder->get()","file":"\/home\/dinexzx\/public_html\/retail-demo\/api\/app\/Repositories\/Dashboard\/DashboardChartsRepository.php","line":37,"isVendor":false},{"call":"App\\Repositories\\Dashboard\\DashboardChartsRepository->__construct()","file":null,"line":null,"isVendor":false},{"call":"ReflectionClass->newInstanceArgs()","file":"\/home\/dinexzx\/public_html\/retail-demo\/api\/vendor\/laravel\/framework\/src\/Illuminate\/Container\/Container.php","line":952,"isVendor":true},{"call":"Illuminate\\Container\\Container->build()","file":"\/home\/dinexzx\/public_html\/retail-demo\/api\/vendor\/laravel\/framework\/src\/Illuminate\/Container\/Container.php","line":795,"isVendor":true},{"call":"Illuminate\\Container\\Container->resolve()","file":"\/home\/dinexzx\/public_html\/retail-demo\/api\/vendor\/laravel\/framework\/src\/Illuminate\/Foundation\/Application.php","line":986,"isVendor":true},{"call":"Illuminate\\Foundation\\Application->resolve()","file":"\/home\/dinexzx\/public_html\/retail-demo\/api\/vendor\/laravel\/framework\/src\/Illuminate\/Container\/Container.php","line":296,"isVendor":true},{"call":"Illuminate\\Container\\Container->Illuminate\\Container\\{closure}()","file":"\/home\/dinexzx\/public_html\/retail-demo\/api\/vendor\/laravel\/framework\/src\/Illuminate\/Container\/Container.php","line":908,"isVendor":true},{"call":"Illuminate\\Container\\Container->build()","file":"\/home\/dinexzx\/public_html\/retail-demo\/api\/vendor\/laravel\/framework\/src\/Illuminate\/Container\/Container.php","line":795,"isVendor":true},{"call":"Illuminate\\Container\\Container->resolve()","file":"\/home\/dinexzx\/public_html\/retail-demo\/api\/vendor\/laravel\/framework\/src\/Illuminate\/Foundation\/Application.php","line":986,"isVendor":true},{"call":"Illuminate\\Foundation\\Application->resolve()","file":"\/home\/dinexzx\/public_html\/retail-demo\/api\/vendor\/laravel\/framework\/src\/Illuminate\/Container\/Container.php","line":731,"isVendor":true}],"model":"App\\Models\\Branch","tags":[]},{"query":"SELECT * FROM `oauth_user_tokens` WHERE `token_hash` = 'c9db7c978ed2958c96fdb7b7f6826dbee1e4a58274b8b540bd97b6218b2644ef' and `revoked_at` IS NULL and `expire_date` > '2026-06-07 20:22:47' LIMIT 1","duration":0.330000000000000015543122344752191565930843353271484375,"connection":"mysql","time":1780849367.4028041362762451171875,"trace":[{"call":"Illuminate\\Database\\Eloquent\\Builder->first()","file":"\/home\/dinexzx\/public_html\/retail-demo\/api\/app\/Http\/Middleware\/AuthApiMiddleware.php","line":44,"isVendor":false},{"call":"App\\Http\\Middleware\\AuthApiMiddleware->handle()","file":"\/home\/dinexzx\/public_html\/retail-demo\/api\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php","line":183,"isVendor":true},{"call":"Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()","file":"\/home\/dinexzx\/public_html\/retail-demo\/api\/app\/Http\/Middleware\/LocaleMiddleware.php","line":19,"isVendor":false},{"call":"App\\Http\\Middleware\\LocaleMiddleware->handle()","file":"\/home\/dinexzx\/public_html\/retail-demo\/api\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php","line":183,"isVendor":true},{"call":"Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()","file":"\/home\/dinexzx\/public_html\/retail-demo\/api\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/Middleware\/SubstituteBindings.php","line":50,"isVendor":true},{"call":"Illuminate\\Routing\\Middleware\\SubstituteBindings->handle()","file":"\/home\/dinexzx\/public_html\/retail-demo\/api\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php","line":183,"isVendor":true},{"call":"Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()","file":"\/home\/dinexzx\/public_html\/retail-demo\/api\/vendor\/laravel\/framework\/src\/Illuminate\/Session\/Middleware\/AuthenticateSession.php","line":41,"isVendor":true},{"call":"Illuminate\\Session\\Middleware\\AuthenticateSession->handle()","file":"\/home\/dinexzx\/public_html\/retail-demo\/api\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php","line":183,"isVendor":true},{"call":"Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()","file":"\/home\/dinexzx\/public_html\/retail-demo\/api\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/Middleware\/ThrottleRequests.php","line":159,"isVendor":true},{"call":"Illuminate\\Routing\\Middleware\\ThrottleRequests->handleRequest()","file":"\/home\/dinexzx\/public_html\/retail-demo\/api\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/Middleware\/ThrottleRequests.php","line":125,"isVendor":true}],"model":"App\\Models\\Token","tags":[]},{"query":"SELECT * FROM `users` WHERE `users`.`id` = 1 LIMIT 1","duration":0.2099999999999999922284388276239042170345783233642578125,"connection":"mysql","time":1780849367.404511928558349609375,"trace":[{"call":"Illuminate\\Database\\Eloquent\\Model::__callStatic()","file":"\/home\/dinexzx\/public_html\/retail-demo\/api\/app\/Http\/Middleware\/AuthApiMiddleware.php","line":46,"isVendor":false},{"call":"App\\Http\\Middleware\\AuthApiMiddleware->handle()","file":"\/home\/dinexzx\/public_html\/retail-demo\/api\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php","line":183,"isVendor":true},{"call":"Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()","file":"\/home\/dinexzx\/public_html\/retail-demo\/api\/app\/Http\/Middleware\/LocaleMiddleware.php","line":19,"isVendor":false},{"call":"App\\Http\\Middleware\\LocaleMiddleware->handle()","file":"\/home\/dinexzx\/public_html\/retail-demo\/api\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php","line":183,"isVendor":true},{"call":"Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()","file":"\/home\/dinexzx\/public_html\/retail-demo\/api\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/Middleware\/SubstituteBindings.php","line":50,"isVendor":true},{"call":"Illuminate\\Routing\\Middleware\\SubstituteBindings->handle()","file":"\/home\/dinexzx\/public_html\/retail-demo\/api\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php","line":183,"isVendor":true},{"call":"Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()","file":"\/home\/dinexzx\/public_html\/retail-demo\/api\/vendor\/laravel\/framework\/src\/Illuminate\/Session\/Middleware\/AuthenticateSession.php","line":41,"isVendor":true},{"call":"Illuminate\\Session\\Middleware\\AuthenticateSession->handle()","file":"\/home\/dinexzx\/public_html\/retail-demo\/api\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php","line":183,"isVendor":true},{"call":"Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()","file":"\/home\/dinexzx\/public_html\/retail-demo\/api\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/Middleware\/ThrottleRequests.php","line":159,"isVendor":true},{"call":"Illuminate\\Routing\\Middleware\\ThrottleRequests->handleRequest()","file":"\/home\/dinexzx\/public_html\/retail-demo\/api\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/Middleware\/ThrottleRequests.php","line":125,"isVendor":true}],"model":"App\\Models\\User","tags":[]},{"query":"SELECT * FROM `branches` WHERE `branches`.`id` = 1 LIMIT 1","duration":0.179999999999999993338661852249060757458209991455078125,"connection":"mysql","time":1780849367.4054119586944580078125,"trace":[{"call":"Illuminate\\Database\\Eloquent\\Model->__get()","file":"\/home\/dinexzx\/public_html\/retail-demo\/api\/app\/Http\/Middleware\/AuthApiMiddleware.php","line":57,"isVendor":false},{"call":"App\\Http\\Middleware\\AuthApiMiddleware->handle()","file":"\/home\/dinexzx\/public_html\/retail-demo\/api\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php","line":183,"isVendor":true},{"call":"Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()","file":"\/home\/dinexzx\/public_html\/retail-demo\/api\/app\/Http\/Middleware\/LocaleMiddleware.php","line":19,"isVendor":false},{"call":"App\\Http\\Middleware\\LocaleMiddleware->handle()","file":"\/home\/dinexzx\/public_html\/retail-demo\/api\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php","line":183,"isVendor":true},{"call":"Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()","file":"\/home\/dinexzx\/public_html\/retail-demo\/api\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/Middleware\/SubstituteBindings.php","line":50,"isVendor":true},{"call":"Illuminate\\Routing\\Middleware\\SubstituteBindings->handle()","file":"\/home\/dinexzx\/public_html\/retail-demo\/api\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php","line":183,"isVendor":true},{"call":"Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()","file":"\/home\/dinexzx\/public_html\/retail-demo\/api\/vendor\/laravel\/framework\/src\/Illuminate\/Session\/Middleware\/AuthenticateSession.php","line":41,"isVendor":true},{"call":"Illuminate\\Session\\Middleware\\AuthenticateSession->handle()","file":"\/home\/dinexzx\/public_html\/retail-demo\/api\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php","line":183,"isVendor":true},{"call":"Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()","file":"\/home\/dinexzx\/public_html\/retail-demo\/api\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/Middleware\/ThrottleRequests.php","line":159,"isVendor":true},{"call":"Illuminate\\Routing\\Middleware\\ThrottleRequests->handleRequest()","file":"\/home\/dinexzx\/public_html\/retail-demo\/api\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/Middleware\/ThrottleRequests.php","line":125,"isVendor":true}],"model":"App\\Models\\Branch","tags":[]},{"query":"SELECT `roles`.*, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` FROM `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` WHERE `model_has_roles`.`model_id` = 1 and `model_has_roles`.`model_type` = 'App\\\\Models\\\\User'","duration":0.270000000000000017763568394002504646778106689453125,"connection":"mysql","time":1780849367.4076421260833740234375,"trace":[{"call":"Illuminate\\Database\\Eloquent\\Model->__get()","file":"\/home\/dinexzx\/public_html\/retail-demo\/api\/app\/Http\/Middleware\/CustomRoleMiddleware.php","line":20,"isVendor":false},{"call":"App\\Http\\Middleware\\CustomRoleMiddleware->handle()","file":"\/home\/dinexzx\/public_html\/retail-demo\/api\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php","line":183,"isVendor":true},{"call":"Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()","file":"\/home\/dinexzx\/public_html\/retail-demo\/api\/app\/Http\/Middleware\/AuthApiMiddleware.php","line":59,"isVendor":false},{"call":"App\\Http\\Middleware\\AuthApiMiddleware->handle()","file":"\/home\/dinexzx\/public_html\/retail-demo\/api\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php","line":183,"isVendor":true},{"call":"Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()","file":"\/home\/dinexzx\/public_html\/retail-demo\/api\/app\/Http\/Middleware\/LocaleMiddleware.php","line":19,"isVendor":false},{"call":"App\\Http\\Middleware\\LocaleMiddleware->handle()","file":"\/home\/dinexzx\/public_html\/retail-demo\/api\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php","line":183,"isVendor":true},{"call":"Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()","file":"\/home\/dinexzx\/public_html\/retail-demo\/api\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/Middleware\/SubstituteBindings.php","line":50,"isVendor":true},{"call":"Illuminate\\Routing\\Middleware\\SubstituteBindings->handle()","file":"\/home\/dinexzx\/public_html\/retail-demo\/api\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php","line":183,"isVendor":true},{"call":"Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()","file":"\/home\/dinexzx\/public_html\/retail-demo\/api\/vendor\/laravel\/framework\/src\/Illuminate\/Session\/Middleware\/AuthenticateSession.php","line":41,"isVendor":true},{"call":"Illuminate\\Session\\Middleware\\AuthenticateSession->handle()","file":"\/home\/dinexzx\/public_html\/retail-demo\/api\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php","line":183,"isVendor":true}],"model":"Spatie\\Permission\\Models\\Role","tags":[]},{"query":"SELECT `permissions`.*, `role_has_permissions`.`role_id` as `pivot_role_id`, `role_has_permissions`.`permission_id` as `pivot_permission_id` FROM `permissions` inner join `role_has_permissions` on `permissions`.`id` = `role_has_permissions`.`permission_id` WHERE `role_has_permissions`.`role_id` = 1","duration":0.25,"connection":"mysql","time":1780849367.4088618755340576171875,"trace":[{"call":"Illuminate\\Database\\Eloquent\\Model->__get()","file":"\/home\/dinexzx\/public_html\/retail-demo\/api\/app\/Http\/Middleware\/CustomPermissionMiddleware.php","line":21,"isVendor":false},{"call":"App\\Http\\Middleware\\CustomPermissionMiddleware->handle()","file":"\/home\/dinexzx\/public_html\/retail-demo\/api\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php","line":183,"isVendor":true},{"call":"Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()","file":"\/home\/dinexzx\/public_html\/retail-demo\/api\/app\/Http\/Middleware\/CustomRoleMiddleware.php","line":21,"isVendor":false},{"call":"App\\Http\\Middleware\\CustomRoleMiddleware->handle()","file":"\/home\/dinexzx\/public_html\/retail-demo\/api\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php","line":183,"isVendor":true},{"call":"Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()","file":"\/home\/dinexzx\/public_html\/retail-demo\/api\/app\/Http\/Middleware\/CustomRoleMiddleware.php","line":21,"isVendor":false},{"call":"App\\Http\\Middleware\\CustomRoleMiddleware->handle()","file":"\/home\/dinexzx\/public_html\/retail-demo\/api\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php","line":183,"isVendor":true},{"call":"Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()","file":"\/home\/dinexzx\/public_html\/retail-demo\/api\/app\/Http\/Middleware\/AuthApiMiddleware.php","line":59,"isVendor":false},{"call":"App\\Http\\Middleware\\AuthApiMiddleware->handle()","file":"\/home\/dinexzx\/public_html\/retail-demo\/api\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php","line":183,"isVendor":true},{"call":"Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()","file":"\/home\/dinexzx\/public_html\/retail-demo\/api\/app\/Http\/Middleware\/LocaleMiddleware.php","line":19,"isVendor":false},{"call":"App\\Http\\Middleware\\LocaleMiddleware->handle()","file":"\/home\/dinexzx\/public_html\/retail-demo\/api\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php","line":183,"isVendor":true}],"model":"Spatie\\Permission\\Models\\Permission","tags":[]},{"query":"SELECT COUNT(*) as total_orders, COUNT(CASE WHEN status = 3 THEN 1 END) as total_canceled_orders, COUNT(CASE WHEN status = 4 THEN 1 END) as total_returned_orders, COUNT(CASE WHEN status = 2 THEN 1 END) as total_delivered_orders, ROUND(SUM(CASE WHEN status NOT IN (3, 4) THEN price_before_discount + vat ELSE 0 END), 2) as total_gross_sales, ROUND(SUM(CASE WHEN status NOT IN (3, 4) THEN final_price ELSE 0 END), 2) as total_sales, ROUND(SUM(CASE WHEN status NOT IN (3, 4) THEN price_before_discount - price_after_discount ELSE 0 END), 2) as total_discount, ROUND(SUM(CASE WHEN status NOT IN (3, 4) THEN final_price - vat ELSE 0 END), 2) as net_sales, ROUND(SUM(CASE WHEN status NOT IN (3, 4) THEN vat ELSE 0 END), 2) as total_vat FROM `orders` inner join `branches` on `orders`.`branch_id` = `branches`.`id` WHERE ((month(`orders`.`related_date`) = '06') or (`orders`.`closed_at` IS NULL and `orders`.`day_closed` = 0 and `orders`.`related_date` IS NULL and date(`orders`.`created_at`) = '2026-06-07')) LIMIT 1","duration":0.270000000000000017763568394002504646778106689453125,"connection":"mysql","time":1780849367.410333156585693359375,"trace":[{"call":"Illuminate\\Database\\Query\\Builder->first()","file":"\/home\/dinexzx\/public_html\/retail-demo\/api\/app\/Repositories\/Dashboard\/DashboardChartsRepository.php","line":157,"isVendor":false},{"call":"App\\Repositories\\Dashboard\\DashboardChartsRepository->total_values()","file":"\/home\/dinexzx\/public_html\/retail-demo\/api\/app\/Http\/Controllers\/Dashboard\/DashboardChartsController.php","line":23,"isVendor":false},{"call":"App\\Http\\Controllers\\Dashboard\\DashboardChartsController->index()","file":"\/home\/dinexzx\/public_html\/retail-demo\/api\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/Controller.php","line":54,"isVendor":true},{"call":"Illuminate\\Routing\\Controller->callAction()","file":"\/home\/dinexzx\/public_html\/retail-demo\/api\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/ControllerDispatcher.php","line":43,"isVendor":true},{"call":"Illuminate\\Routing\\ControllerDispatcher->dispatch()","file":"\/home\/dinexzx\/public_html\/retail-demo\/api\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/Route.php","line":259,"isVendor":true},{"call":"Illuminate\\Routing\\Route->runController()","file":"\/home\/dinexzx\/public_html\/retail-demo\/api\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/Route.php","line":205,"isVendor":true},{"call":"Illuminate\\Routing\\Route->run()","file":"\/home\/dinexzx\/public_html\/retail-demo\/api\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/Router.php","line":806,"isVendor":true},{"call":"Illuminate\\Routing\\Router->Illuminate\\Routing\\{closure}()","file":"\/home\/dinexzx\/public_html\/retail-demo\/api\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php","line":144,"isVendor":true},{"call":"Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()","file":"\/home\/dinexzx\/public_html\/retail-demo\/api\/app\/Http\/Middleware\/CustomPermissionMiddleware.php","line":33,"isVendor":false},{"call":"App\\Http\\Middleware\\CustomPermissionMiddleware->handle()","file":"\/home\/dinexzx\/public_html\/retail-demo\/api\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php","line":183,"isVendor":true}],"model":null,"tags":[]},{"query":"SELECT CASE\n                    WHEN \"month\" = \"custom\" THEN CASE\n                        WHEN DATEDIFF(STR_TO_DATE(\"\", \"%Y%m%d\"),\n                             STR_TO_DATE(\"\", \"%Y%m%d\")) <= 30\n                        THEN DATE_FORMAT(orders.related_date, \"%d %b\")\n                        WHEN DATEDIFF(STR_TO_DATE(\"\", \"%Y%m%d\"),\n                             STR_TO_DATE(\"\", \"%Y%m%d\")) <= 180\n                        THEN DATE_FORMAT(orders.related_date, \"%b %Y\")\n                        ELSE DATE_FORMAT(orders.related_date, \"%b %Y\")\n                    END\n                    WHEN \"month\" = \"day\" THEN CASE\n                        WHEN orders.closed_at IS NULL AND orders.related_date IS NULL AND orders.day_closed = 0\n                            THEN DATE_FORMAT(orders.created_at, \"%I:%i %p\")\n                        ELSE DATE_FORMAT(orders.related_date, \"%I:%i %p\")\n                    END\n                    WHEN \"month\" = \"week\" THEN DATE_FORMAT(orders.related_date, \"%d %b %W\")\n                    WHEN \"month\" = \"month\" THEN CONCAT(\"Week \", WEEK(orders.related_date) - WEEK(DATE_FORMAT(orders.related_date, \"%Y-%m-01\")) + 1)\n                    WHEN \"month\" = \"6month\" THEN CASE\n                        WHEN YEAR(DATE_SUB(NOW(), INTERVAL 6 MONTH)) < YEAR(NOW())\n                            THEN DATE_FORMAT(orders.related_date, \"%b %Y\")\n                        ELSE DATE_FORMAT(orders.related_date, \"%b %Y\")\n                    END\n                    WHEN \"month\" = \"year\" THEN DATE_FORMAT(orders.related_date, \"%b %Y\")\n                    ELSE DATE_FORMAT(orders.related_date, \"%b %Y\")\n                END as period, ROUND(SUM(final_price), 2) as total_sales, ROUND(SUM(final_price - vat), 2) as net_sales FROM `orders` inner join `branches` on `orders`.`branch_id` = `branches`.`id` WHERE ((month(`orders`.`related_date`) = '06') or (`orders`.`closed_at` IS NULL and `orders`.`day_closed` = 0 and `orders`.`related_date` IS NULL and date(`orders`.`created_at`) = '2026-06-07')) and `status` = 2 GROUP BY WEEK(orders.related_date) - WEEK(DATE_FORMAT(orders.related_date, \"%Y-%m-01\")) + 1","duration":0.2800000000000000266453525910037569701671600341796875,"connection":"mysql","time":1780849367.410891056060791015625,"trace":[{"call":"Illuminate\\Database\\Query\\Builder->get()","file":"\/home\/dinexzx\/public_html\/retail-demo\/api\/app\/Repositories\/Dashboard\/DashboardChartsRepository.php","line":344,"isVendor":false},{"call":"App\\Repositories\\Dashboard\\DashboardChartsRepository->TotalAndNetSalesLineChart()","file":"\/home\/dinexzx\/public_html\/retail-demo\/api\/app\/Http\/Controllers\/Dashboard\/DashboardChartsController.php","line":24,"isVendor":false},{"call":"App\\Http\\Controllers\\Dashboard\\DashboardChartsController->index()","file":"\/home\/dinexzx\/public_html\/retail-demo\/api\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/Controller.php","line":54,"isVendor":true},{"call":"Illuminate\\Routing\\Controller->callAction()","file":"\/home\/dinexzx\/public_html\/retail-demo\/api\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/ControllerDispatcher.php","line":43,"isVendor":true},{"call":"Illuminate\\Routing\\ControllerDispatcher->dispatch()","file":"\/home\/dinexzx\/public_html\/retail-demo\/api\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/Route.php","line":259,"isVendor":true},{"call":"Illuminate\\Routing\\Route->runController()","file":"\/home\/dinexzx\/public_html\/retail-demo\/api\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/Route.php","line":205,"isVendor":true},{"call":"Illuminate\\Routing\\Route->run()","file":"\/home\/dinexzx\/public_html\/retail-demo\/api\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/Router.php","line":806,"isVendor":true},{"call":"Illuminate\\Routing\\Router->Illuminate\\Routing\\{closure}()","file":"\/home\/dinexzx\/public_html\/retail-demo\/api\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php","line":144,"isVendor":true},{"call":"Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()","file":"\/home\/dinexzx\/public_html\/retail-demo\/api\/app\/Http\/Middleware\/CustomPermissionMiddleware.php","line":33,"isVendor":false},{"call":"App\\Http\\Middleware\\CustomPermissionMiddleware->handle()","file":"\/home\/dinexzx\/public_html\/retail-demo\/api\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php","line":183,"isVendor":true}],"model":null,"tags":[]},{"query":"SELECT CASE\n                WHEN \"month\" = \"custom\" THEN CASE\n                        WHEN DATEDIFF(STR_TO_DATE(\"\", \"%Y%m%d\"),\n                             STR_TO_DATE(\"\", \"%Y%m%d\")) <= 30\n                        THEN DATE_FORMAT(orders.related_date, \"%d %b\")\n                        WHEN DATEDIFF(STR_TO_DATE(\"\", \"%Y%m%d\"),\n                             STR_TO_DATE(\"\", \"%Y%m%d\")) <= 180\n                        THEN DATE_FORMAT(orders.related_date, \"%b %Y\")\n                        ELSE DATE_FORMAT(orders.related_date, \"%b %Y\")\n                    END\n                    WHEN \"month\" = \"day\" THEN CASE\n                        WHEN orders.closed_at IS NULL AND orders.related_date IS NULL AND orders.day_closed = 0\n                            THEN DATE_FORMAT(orders.created_at, \"%I:%i %p\")\n                        ELSE DATE_FORMAT(orders.related_date, \"%I:%i %p\")\n                    END\n                   WHEN \"month\" = \"week\" THEN DATE_FORMAT(orders.related_date, \"%d %b %W\")\n                    WHEN \"month\" = \"month\" THEN CONCAT(\"Week \", WEEK(orders.related_date) - WEEK(DATE_FORMAT(orders.related_date, \"%Y-%m-01\")) + 1)\n                   WHEN \"month\" = \"6month\" THEN CASE\n                        WHEN YEAR(DATE_SUB(NOW(), INTERVAL 6 MONTH)) < YEAR(NOW())\n                            THEN DATE_FORMAT(orders.related_date, \"%b %Y\")\n                        ELSE DATE_FORMAT(orders.related_date, \"%b %Y\")\n                    END\n                    WHEN \"month\" = \"year\" THEN DATE_FORMAT(orders.related_date, \"%b %Y\")\n                    ELSE DATE_FORMAT(orders.related_date, \"%b %Y\")\n                END as period, ROUND(SUM(vat), 2) as total_tax, ROUND(SUM(price_before_discount - price_after_discount), 2) as total_discount FROM `orders` inner join `branches` on `orders`.`branch_id` = `branches`.`id` WHERE ((month(`orders`.`related_date`) = '06') or (`orders`.`closed_at` IS NULL and `orders`.`day_closed` = 0 and `orders`.`related_date` IS NULL and date(`orders`.`created_at`) = '2026-06-07')) and `status` = 2 GROUP BY WEEK(orders.related_date) - WEEK(DATE_FORMAT(orders.related_date, \"%Y-%m-01\")) + 1","duration":0.479999999999999982236431605997495353221893310546875,"connection":"mysql","time":1780849367.411365985870361328125,"trace":[{"call":"Illuminate\\Database\\Query\\Builder->get()","file":"\/home\/dinexzx\/public_html\/retail-demo\/api\/app\/Repositories\/Dashboard\/DashboardChartsRepository.php","line":423,"isVendor":false},{"call":"App\\Repositories\\Dashboard\\DashboardChartsRepository->TotalDiscountAndTaxLineChart()","file":"\/home\/dinexzx\/public_html\/retail-demo\/api\/app\/Http\/Controllers\/Dashboard\/DashboardChartsController.php","line":25,"isVendor":false},{"call":"App\\Http\\Controllers\\Dashboard\\DashboardChartsController->index()","file":"\/home\/dinexzx\/public_html\/retail-demo\/api\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/Controller.php","line":54,"isVendor":true},{"call":"Illuminate\\Routing\\Controller->callAction()","file":"\/home\/dinexzx\/public_html\/retail-demo\/api\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/ControllerDispatcher.php","line":43,"isVendor":true},{"call":"Illuminate\\Routing\\ControllerDispatcher->dispatch()","file":"\/home\/dinexzx\/public_html\/retail-demo\/api\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/Route.php","line":259,"isVendor":true},{"call":"Illuminate\\Routing\\Route->runController()","file":"\/home\/dinexzx\/public_html\/retail-demo\/api\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/Route.php","line":205,"isVendor":true},{"call":"Illuminate\\Routing\\Route->run()","file":"\/home\/dinexzx\/public_html\/retail-demo\/api\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/Router.php","line":806,"isVendor":true},{"call":"Illuminate\\Routing\\Router->Illuminate\\Routing\\{closure}()","file":"\/home\/dinexzx\/public_html\/retail-demo\/api\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php","line":144,"isVendor":true},{"call":"Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()","file":"\/home\/dinexzx\/public_html\/retail-demo\/api\/app\/Http\/Middleware\/CustomPermissionMiddleware.php","line":33,"isVendor":false},{"call":"App\\Http\\Middleware\\CustomPermissionMiddleware->handle()","file":"\/home\/dinexzx\/public_html\/retail-demo\/api\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php","line":183,"isVendor":true}],"model":null,"tags":[]},{"query":"SELECT `order_1`.`branch_id`, `branches`.`name` as `branch_name`, `order_1`.`closed_at`, `order_1`.`related_date`, CASE\n            WHEN order_1.closed_at IS NOT NULL THEN (\n                SELECT COUNT(*)\n                FROM orders as o\n                WHERE o.branch_id = order_1.branch_id\n                  AND o.related_date = order_1.related_date\n            )\n            ELSE (\n                SELECT MIN(o.created_at)\n                FROM orders as o\n                WHERE o.branch_id = order_1.branch_id\n                  AND o.closed_at IS NULL\n            )\n        END as count_or_opened_date FROM `orders` as `order_1` inner join `branches` on `branches`.`id` = `order_1`.`branch_id` inner join (SELECT branch_id, MAX(created_at) as max_created_at FROM orders GROUP BY branch_id) as order_2 on `order_1`.`branch_id` = `order_2`.`branch_id` and `order_1`.`created_at` = `order_2`.`max_created_at` WHERE `order_1`.`branch_id` in (1, 2, 3)","duration":0.5100000000000000088817841970012523233890533447265625,"connection":"mysql","time":1780849367.41207408905029296875,"trace":[{"call":"Illuminate\\Database\\Query\\Builder->get()","file":"\/home\/dinexzx\/public_html\/retail-demo\/api\/app\/Repositories\/Dashboard\/DashboardChartsRepository.php","line":276,"isVendor":false},{"call":"App\\Repositories\\Dashboard\\DashboardChartsRepository->closed_opened_branch()","file":"\/home\/dinexzx\/public_html\/retail-demo\/api\/app\/Http\/Controllers\/Dashboard\/DashboardChartsController.php","line":26,"isVendor":false},{"call":"App\\Http\\Controllers\\Dashboard\\DashboardChartsController->index()","file":"\/home\/dinexzx\/public_html\/retail-demo\/api\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/Controller.php","line":54,"isVendor":true},{"call":"Illuminate\\Routing\\Controller->callAction()","file":"\/home\/dinexzx\/public_html\/retail-demo\/api\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/ControllerDispatcher.php","line":43,"isVendor":true},{"call":"Illuminate\\Routing\\ControllerDispatcher->dispatch()","file":"\/home\/dinexzx\/public_html\/retail-demo\/api\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/Route.php","line":259,"isVendor":true},{"call":"Illuminate\\Routing\\Route->runController()","file":"\/home\/dinexzx\/public_html\/retail-demo\/api\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/Route.php","line":205,"isVendor":true},{"call":"Illuminate\\Routing\\Route->run()","file":"\/home\/dinexzx\/public_html\/retail-demo\/api\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/Router.php","line":806,"isVendor":true},{"call":"Illuminate\\Routing\\Router->Illuminate\\Routing\\{closure}()","file":"\/home\/dinexzx\/public_html\/retail-demo\/api\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php","line":144,"isVendor":true},{"call":"Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()","file":"\/home\/dinexzx\/public_html\/retail-demo\/api\/app\/Http\/Middleware\/CustomPermissionMiddleware.php","line":33,"isVendor":false},{"call":"App\\Http\\Middleware\\CustomPermissionMiddleware->handle()","file":"\/home\/dinexzx\/public_html\/retail-demo\/api\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php","line":183,"isVendor":true}],"model":null,"tags":[]},{"query":"SELECT `branch_id`, SUM(final_price) as total_sales, COUNT(*) as total_orders FROM `orders` WHERE `orders`.`branch_id` != '0' and (month(`orders`.`related_date`) = '06') and (`orders`.`status` != 3) and (`orders`.`status` != 4) GROUP BY `branch_id` ORDER BY `total_sales` DESC LIMIT 1","duration":0.289999999999999980015985556747182272374629974365234375,"connection":"mysql","time":1780849367.412928104400634765625,"trace":[{"call":"Illuminate\\Database\\Query\\Builder->first()","file":"\/home\/dinexzx\/public_html\/retail-demo\/api\/app\/Repositories\/Dashboard\/DashboardChartsRepository.php","line":489,"isVendor":false},{"call":"App\\Repositories\\Dashboard\\DashboardChartsRepository->topBranchSelling()","file":"\/home\/dinexzx\/public_html\/retail-demo\/api\/app\/Http\/Controllers\/Dashboard\/DashboardChartsController.php","line":28,"isVendor":false},{"call":"App\\Http\\Controllers\\Dashboard\\DashboardChartsController->index()","file":"\/home\/dinexzx\/public_html\/retail-demo\/api\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/Controller.php","line":54,"isVendor":true},{"call":"Illuminate\\Routing\\Controller->callAction()","file":"\/home\/dinexzx\/public_html\/retail-demo\/api\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/ControllerDispatcher.php","line":43,"isVendor":true},{"call":"Illuminate\\Routing\\ControllerDispatcher->dispatch()","file":"\/home\/dinexzx\/public_html\/retail-demo\/api\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/Route.php","line":259,"isVendor":true},{"call":"Illuminate\\Routing\\Route->runController()","file":"\/home\/dinexzx\/public_html\/retail-demo\/api\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/Route.php","line":205,"isVendor":true},{"call":"Illuminate\\Routing\\Route->run()","file":"\/home\/dinexzx\/public_html\/retail-demo\/api\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/Router.php","line":806,"isVendor":true},{"call":"Illuminate\\Routing\\Router->Illuminate\\Routing\\{closure}()","file":"\/home\/dinexzx\/public_html\/retail-demo\/api\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php","line":144,"isVendor":true},{"call":"Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()","file":"\/home\/dinexzx\/public_html\/retail-demo\/api\/app\/Http\/Middleware\/CustomPermissionMiddleware.php","line":33,"isVendor":false},{"call":"App\\Http\\Middleware\\CustomPermissionMiddleware->handle()","file":"\/home\/dinexzx\/public_html\/retail-demo\/api\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php","line":183,"isVendor":true}],"model":null,"tags":[]}],"databaseQueriesCount":12,"databaseSlowQueries":0,"databaseSelects":12,"databaseInserts":0,"databaseUpdates":0,"databaseDeletes":0,"databaseOthers":0,"databaseDuration":4.36000000000000031974423109204508364200592041015625,"cacheQueries":[{"type":"hit","key":"ee924589e0540636f5931bff1664c7de","expiration":null,"time":1780849367.40164089202880859375,"connection":null,"trace":[{"call":"Illuminate\\Foundation\\Http\\Kernel->handle()","file":"\/home\/dinexzx\/public_html\/retail-demo\/api\/public\/index.php","line":51,"isVendor":false}]},{"type":"hit","key":"ee924589e0540636f5931bff1664c7de","expiration":null,"time":1780849367.41617298126220703125,"connection":null,"trace":[{"call":"Illuminate\\Foundation\\Http\\Kernel->handle()","file":"\/home\/dinexzx\/public_html\/retail-demo\/api\/public\/index.php","line":51,"isVendor":false}]}],"cacheReads":2,"cacheHits":2,"cacheWrites":0,"cacheDeletes":0,"cacheTime":0,"modelsActions":[],"modelsRetrieved":{"App\\Models\\PaymentType":2,"App\\Models\\Branch":4,"App\\Models\\Token":1,"App\\Models\\User":1,"Spatie\\Permission\\Models\\Role":1,"Spatie\\Permission\\Models\\Permission":46},"modelsCreated":[],"modelsUpdated":[],"modelsDeleted":[],"redisCommands":[],"queueJobs":[],"timelineData":[{"description":"Controller","start":1780849367.3885729312896728515625,"end":1780849367.4167129993438720703125,"duration":28.14006805419921875,"color":null,"data":null}],"log":[],"events":[],"routes":[],"notifications":[],"emailsData":[],"viewsData":[],"userData":[],"httpRequests":[],"subrequests":[],"xdebug":[],"commandName":null,"commandArguments":[],"commandArgumentsDefaults":[],"commandOptions":[],"commandOptionsDefaults":[],"commandExitCode":null,"commandOutput":null,"jobName":null,"jobDescription":null,"jobStatus":null,"jobPayload":[],"jobQueue":null,"jobConnection":null,"jobOptions":[],"testName":null,"testStatus":null,"testStatusMessage":null,"testAsserts":[],"clientMetrics":[],"webVitals":[],"parent":null,"updateToken":"d3f7cb27"}
