update querry
All checks were successful
Build, Push and Deploy / build-and-push (push) Successful in 4m25s
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 15s
Build, Push and Deploy / deploy-staging (push) Successful in 45s
Build, Push and Deploy / deploy-production (push) Has been skipped

This commit is contained in:
2026-04-23 21:37:41 +07:00
parent 90ceb2ec19
commit 6868533af2
9 changed files with 30 additions and 30 deletions

View File

@@ -30,7 +30,7 @@ public function index(Request $request)
->select(
DB::raw('DATE(saleDate) as date'),
DB::raw('SUM(actual_total_amount) as total_sales'),
DB::raw('SUM(lossProfit) as total_sale_income')
DB::raw('SUM("lossProfit") as total_sale_income')
)
->where('business_id', $businessId)
->when($branchId, fn ($q) =>
@@ -214,7 +214,7 @@ public function exportPdf()
->select(
DB::raw('DATE(saleDate) as date'),
DB::raw('SUM(actual_total_amount) as total_sales'),
DB::raw('SUM(lossProfit) as total_sale_income')
DB::raw('SUM("lossProfit") as total_sale_income')
)
->where('business_id', $businessId)
->when($branchId, fn ($q) => $q->where('branch_id', $branchId))