diff --git a/Modules/Internal/Http/Controllers/Api/ClaimController.php b/Modules/Internal/Http/Controllers/Api/ClaimController.php index 832cddc3..b29e3f86 100644 --- a/Modules/Internal/Http/Controllers/Api/ClaimController.php +++ b/Modules/Internal/Http/Controllers/Api/ClaimController.php @@ -146,7 +146,9 @@ class ClaimController extends Controller $affectedRows = DB::table('claim_requests') ->where('code','=', $row['code']) ->where('claim_management','=', 1) + ->where('status_claim_management.status', '=', 'received') ->update([ + 'status' => $row['qc'] == 'Y' ? 'approved' : 'declined', 'status_claim_management' => $row['qc'] == 'Y' ? 'approved' : 'declined', 'reason_decline' => $row['reason'] ? $row['reason'] : null, 'approval_by_claim_management' => auth()->user()->id,