add refund logic and fix books inventory logic
This commit is contained in:
@@ -42,6 +42,14 @@ final class SchoolYearValidationService
|
||||
}
|
||||
|
||||
$this->dateOrNull($payload['fall_makeup_exam_on'] ?? null);
|
||||
|
||||
$weeks = $payload['total_instructional_weeks'] ?? null;
|
||||
if ($weeks !== null && trim((string) $weeks) !== '') {
|
||||
$parsed = filter_var($weeks, FILTER_VALIDATE_INT);
|
||||
if ($parsed === false || $parsed <= 0) {
|
||||
throw new InvalidArgumentException('Total instructional weeks must be a positive whole number.');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function isValidYearName(string $value): bool
|
||||
|
||||
Reference in New Issue
Block a user