feat(claims): implement automatic claim creation for insurance sessions

This commit is contained in:
hamed
2026-06-24 02:08:12 +03:30
parent 14c6dd6456
commit f7eb1ebd91
5 changed files with 56 additions and 1 deletions
+4
View File
@@ -28,6 +28,10 @@ class ClaimService
throw new AppException(ErrorCodes::ERR_VALIDATION_001, 'فقط از صورتحساب نهایی‌شده می‌توان مطالبه ساخت', 422);
}
if ($invoice->getId() !== null && $this->claimRepo->existsForInvoice($invoice->getId())) {
throw new AppException(ErrorCodes::ERR_VALIDATION_001, 'برای این صورتحساب قبلاً مطالبه ثبت شده است', 422);
}
$claims = [];
$baseId = $invoice->getBaseInsuranceId();