| Line 3763... |
Line 3763... |
| 3763 |
deviceNumberInfo = get_service_provider_for_device(rechargeType, deviceNumber)
|
3763 |
deviceNumberInfo = get_service_provider_for_device(rechargeType, deviceNumber)
|
| 3764 |
if deviceNumberInfo.operatorId == -1:
|
3764 |
if deviceNumberInfo.operatorId == -1:
|
| 3765 |
return "Oops! There seems to be a problem. Please try after some time."
|
3765 |
return "Oops! There seems to be a problem. Please try after some time."
|
| 3766 |
circle = TelecomCircle.query.filter_by(code = deviceNumberInfo.circleCode).first()
|
3766 |
circle = TelecomCircle.query.filter_by(code = deviceNumberInfo.circleCode).first()
|
| 3767 |
if circle:
|
3767 |
if circle:
|
| 3768 |
if not ServiceAvailability.query.filter_by(circleId = circle.id).filter_by(operatorId = userSelectedProviderId).first().isServiceAvailable :
|
3768 |
serviceAvailability = ServiceAvailability.query.filter_by(circleId = circle.id).filter_by(operatorId = userSelectedProviderId).first()
|
| - |
|
3769 |
if serviceAvailability.permIsServiceAvailable == False or serviceAvailability.tempIsServiceAvailable == False :
|
| - |
|
3770 |
|
| 3769 |
if deviceNumberInfo.operatorName :
|
3771 |
if deviceNumberInfo.operatorName :
|
| 3770 |
if circle.id == 8:
|
3772 |
if serviceAvailability.permIsServiceAvailable == False:
|
| 3771 |
return "We currently do not provide this service in J&K. We regret the inconvenience."
|
3773 |
return "We currently do not provide service for " + deviceNumberInfo.operatorName + " in " + circle.name + ". We regret the inconvenience."
|
| 3772 |
else :
|
3774 |
else :
|
| 3773 |
return "We are facing technical issues with " + deviceNumberInfo.operatorName + " in " + circle.name + " currently. Please try later."
|
3775 |
return "We are facing technical issues with " + deviceNumberInfo.operatorName + " in " + circle.name + " currently. Please try later."
|
| 3774 |
else :
|
3776 |
else :
|
| - |
|
3777 |
if serviceAvailability.permIsServiceAvailable == False:
|
| - |
|
3778 |
return "We currently do not provide service for this operator in " + circle.name + ". We regret the inconvenience."
|
| - |
|
3779 |
else:
|
| 3775 |
return "We are facing technical issues with this operator in " + circle.name + " currently. Please try later."
|
3780 |
return "We are facing technical issues with this operator in " + circle.name + " currently. Please try later."
|
| 3776 |
totalSuccessfulRechargeAmount = get_previous_transactions(clientAddress)
|
3781 |
totalSuccessfulRechargeAmount = get_previous_transactions(clientAddress)
|
| 3777 |
if totalSuccessfulRechargeAmount >= 3000 :
|
3782 |
if totalSuccessfulRechargeAmount >= 3000 :
|
| 3778 |
return "You have exceeded your daily recharge limit. Please try after 24 hours."
|
3783 |
return "You have exceeded your daily recharge limit. Please try after 24 hours."
|
| 3779 |
return "SUCCESS"
|
3784 |
return "SUCCESS"
|
| 3780 |
|
3785 |
|
| Line 3975... |
Line 3980... |
| 3975 |
circle_id = TelecomCircle.query.filter_by(code = circleCode).first().id
|
3980 |
circle_id = TelecomCircle.query.filter_by(code = circleCode).first().id
|
| 3976 |
return RechargeDenomination.query.filter_by(operatorId = operator_id).filter_by(circleId = circle_id).filter_by(denominationType = denomination_type).all()
|
3981 |
return RechargeDenomination.query.filter_by(operatorId = operator_id).filter_by(circleId = circle_id).filter_by(denominationType = denomination_type).all()
|
| 3977 |
|
3982 |
|
| 3978 |
def update_availability_status(operatorId, circleId, isAvailable):
|
3983 |
def update_availability_status(operatorId, circleId, isAvailable):
|
| 3979 |
serviceAvailability = ServiceAvailability.query.filter_by(circleId = circleId).filter_by(operatorId = operatorId).first()
|
3984 |
serviceAvailability = ServiceAvailability.query.filter_by(circleId = circleId).filter_by(operatorId = operatorId).first()
|
| 3980 |
serviceAvailability.isServiceAvailable = isAvailable
|
3985 |
serviceAvailability.tempIsServiceAvailable = isAvailable
|
| 3981 |
session.commit()
|
3986 |
session.commit()
|
| 3982 |
|
3987 |
|
| 3983 |
def get_misc_charges(transactionId):
|
3988 |
def get_misc_charges(transactionId):
|
| 3984 |
retCharges = {}
|
3989 |
retCharges = {}
|
| 3985 |
miscCharges = MiscCharges.get_by(transaction_id = transactionId)
|
3990 |
miscCharges = MiscCharges.get_by(transaction_id = transactionId)
|