update error
All checks were successful
Build, Push and Deploy / build-and-push (push) Successful in 4m50s
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 16s
Build, Push and Deploy / deploy-staging (push) Successful in 41s
Build, Push and Deploy / deploy-production (push) Has been skipped

This commit is contained in:
2026-05-06 09:49:01 +07:00
parent 28510f1163
commit 0cb58d3419
7 changed files with 28 additions and 24 deletions

View File

@@ -90,14 +90,14 @@ public function index(Request $request)
if (moduleCheck('HrmAddon')) {
$payrollQuery = DB::table('payrolls')
->select(
DB::raw('DATE(date) as date'),
DB::raw('"date"::date as date'),
DB::raw('SUM(amount) as total_payrolls')
)
->where('business_id', $businessId)
->when($branchId, fn ($q) =>
$q->where('branch_id', $branchId)
)
->groupBy(DB::raw('DATE(date)'));
->groupBy(DB::raw('"date"::date'));
$this->applyDateFilter($payrollQuery, $duration, 'date', $request->from_date, $request->to_date);
$dailyPayrolls = $payrollQuery->get();
@@ -262,12 +262,12 @@ public function exportPdf()
if (moduleCheck('HrmAddon')) {
$dailyPayrolls = DB::table('payrolls')
->select(
DB::raw('DATE(date) as date'),
DB::raw('"date"::date as date'),
DB::raw('SUM(amount) as total_payrolls')
)
->where('business_id', $businessId)
->when($branchId, fn ($q) => $q->where('branch_id', $branchId))
->groupBy(DB::raw('DATE(date)'))
->groupBy(DB::raw('"date"::date'))
->get();
}