|
|
@ -30,8 +30,9 @@ def service_qualify(): |
|
|
|
|
|
|
|
|
try: |
|
|
try: |
|
|
location = ( |
|
|
location = ( |
|
|
db.session.query(Locations, ParentLocations) |
|
|
db.session.query(Locations, ParentLocations, PlanGroups) |
|
|
.join(Locations, Locations.ParentLocation_ID == ParentLocations.id) |
|
|
.join(Locations, Locations.ParentLocation_ID == ParentLocations.id) |
|
|
|
|
|
.join(PlanGroups, PlanGroups.id == ParentLocations.PlanGroup_ID) |
|
|
.filter(Locations.LocationIdentifier == locid) |
|
|
.filter(Locations.LocationIdentifier == locid) |
|
|
.first() |
|
|
.first() |
|
|
) |
|
|
) |
|
|
@ -52,12 +53,17 @@ def service_qualify(): |
|
|
.all() |
|
|
.all() |
|
|
) |
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
if location.PlanGroups.ServiceClass_Override is not None: |
|
|
|
|
|
serviceclass = location.PlanGroups.ServiceClass_Override |
|
|
|
|
|
else: |
|
|
|
|
|
serviceclass = location.Locations.ServiceClass |
|
|
|
|
|
|
|
|
plan_list = [plan.Plans.PlanIdentifier for plan in plans] |
|
|
plan_list = [plan.Plans.PlanIdentifier for plan in plans] |
|
|
|
|
|
|
|
|
return jsonify({ |
|
|
return jsonify({ |
|
|
"locid": locid, |
|
|
"locid": locid, |
|
|
"status": True, |
|
|
"status": True, |
|
|
"serviceclass": location.Locations.ServiceClass, |
|
|
"serviceclass": serviceclass, |
|
|
"newDevelopmentFeeApplicable": 30000, |
|
|
"newDevelopmentFeeApplicable": 30000, |
|
|
"unitidentifier": location.Locations.UnitIdentifier, |
|
|
"unitidentifier": location.Locations.UnitIdentifier, |
|
|
"streetaddress": location.Locations.StreetAddress, |
|
|
"streetaddress": location.Locations.StreetAddress, |
|
|
|