fix(salary):memperbaiki oenggajian ketika pertama kali gaji itu hasilnya pasti 0
This commit is contained in:
parent
3931600346
commit
909e7c787c
@ -163,11 +163,6 @@ public function getSalaryEmployee(string $employeeId): JsonResponse
|
||||
if ($employee->role_id === 4 && $latestPayroll->created_at->isToday()) {
|
||||
$query->where('is_paid', '0');
|
||||
}
|
||||
}, function ($query) {
|
||||
$query->whereBetween('created_at', [
|
||||
now()->subMonth()->startOfMonth(),
|
||||
now()->subMonth()->endOfMonth(),
|
||||
]);
|
||||
})
|
||||
->sum('total');
|
||||
$debt = Debt::where('user_id', $employeeId)->where('is_paid', '0')->sum('amount');
|
||||
|
||||
Loading…
Reference in New Issue
Block a user