| Line 58... |
Line 58... |
| 58 |
ERROR ("Not a League Admin [$league_id]",
|
58 |
ERROR ("Not a League Admin [$league_id]",
|
| 59 |
"You must be a League Admin to purchase insurance for the league.",
|
59 |
"You must be a League Admin to purchase insurance for the league.",
|
| 60 |
"Viewed Attestation page for league coverage but not a league admin.");
|
60 |
"Viewed Attestation page for league coverage but not a league admin.");
|
| 61 |
}
|
61 |
}
|
| Line -... |
Line 62... |
| - |
|
62 |
|
| - |
|
63 |
## Leagues have to be approved to purchase Alcohol Liability coverage
|
| - |
|
64 |
if ($policy->{id} eq "3" and !getLeague ($league_id)->{alcohol_liability_eligible}) {
|
| - |
|
65 |
ERROR ("League Not Eligible [$league_id]",
|
| - |
|
66 |
"You must be pre-approved to purchase Alcohol Liability coverage for the league. Please email insurance\@wftdi.com to begin approval process.",
|
| - |
|
67 |
"Viewed Attestation page for Alchohol Liability coverage but not pre-approved.");
|
| - |
|
68 |
}
|
| 62 |
|
69 |
|
| 63 |
## Check to see if this is a new purchase or within the renewal period. If neither, eligible will be empty.
|
70 |
## Check to see if this is a new purchase or within the renewal period. If neither, eligible will be empty.
|
| 64 |
$active_policy = isLeagueCovered ($league_id);
|
71 |
$active_policy = isLeagueCovered ($league_id, undef, $policy->{name});
|
| 65 |
if ($active_policy) {
|
72 |
if ($active_policy) {
|
| 66 |
$daysremaining = remainingOrgPolicyDays ($league_id, $active_policy);
|
73 |
$daysremaining = remainingOrgPolicyDays ($league_id, $active_policy);
|
| 67 |
if ($daysremaining <= $RENEWAL_WINDOW) {
|
74 |
if ($daysremaining <= $RENEWAL_WINDOW) {
|
| 68 |
$eligible = "renew";
|
75 |
$eligible = "renew";
|