update gitignore composer.js
All checks were successful
Build, Push and Deploy / build-and-push (push) Successful in 3m23s
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 14s
Build, Push and Deploy / deploy-staging (push) Successful in 37s
Build, Push and Deploy / deploy-production (push) Has been skipped

This commit is contained in:
2026-04-18 21:41:31 +07:00
parent dcaf267458
commit 2173c3ee81
4 changed files with 7 additions and 6 deletions

View File

@@ -196,7 +196,7 @@ public function revenue()
$data['loss'] = Sale::where('business_id', auth()->user()->business_id)
->whereYear('created_at', request('year') ?? date('Y'))
->where('lossProfit', '<', 0)
->selectRaw('MONTHNAME(created_at) as month, SUM(ABS(lossProfit)) as total')
->selectRaw("TO_CHAR(created_at, 'Month') as month, SUM(ABS(lossProfit)) as total")
->orderBy('created_at')
->groupBy('created_at')
->get();
@@ -204,7 +204,7 @@ public function revenue()
$data['profit'] = Sale::where('business_id', auth()->user()->business_id)
->whereYear('created_at', request('year') ?? date('Y'))
->where('lossProfit', '>=', 0)
->selectRaw('MONTHNAME(created_at) as month, SUM(ABS(lossProfit)) as total')
->selectRaw("TO_CHAR(created_at, 'Month') as month, SUM(ABS(lossProfit)) as total")
->orderBy('created_at')
->groupBy('created_at')
->get();

View File

@@ -241,7 +241,7 @@ public function incomeExpense(Request $request)
$data['expenses'] = Sale::where('business_id', auth()->user()->business_id)
->whereYear('created_at', request('year') ?? date('Y'))
->where('lossProfit', '<', 0)
->selectRaw('MONTH(created_at) as month_number, MONTHNAME(created_at) as month, SUM(ABS(lossProfit)) as total')
->selectRaw("EXTRACT(MONTH FROM created_at) as month_number, TO_CHAR(created_at, 'Month') as month, SUM(ABS(lossProfit)) as total")
->groupBy('month_number', 'month')
->orderBy('month_number')
->get();
@@ -249,7 +249,7 @@ public function incomeExpense(Request $request)
$data['incomes'] = Sale::where('business_id', auth()->user()->business_id)
->whereYear('created_at', request('year') ?? date('Y'))
->where('lossProfit', '>=', 0)
->selectRaw('MONTH(created_at) as month_number, MONTHNAME(created_at) as month, SUM(ABS(lossProfit)) as total')
->selectRaw("EXTRACT(MONTH FROM created_at) as month_number, TO_CHAR(created_at, 'Month') as month, SUM(ABS(lossProfit)) as total")
->groupBy('month_number', 'month')
->orderBy('month_number')
->get();