update error
All checks were successful
All checks were successful
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user