| Line 4563... |
Line 4563... |
| 4563 |
rechargeTransaction.transactionTime = datetime.datetime.now()
|
4563 |
rechargeTransaction.transactionTime = datetime.datetime.now()
|
| 4564 |
rechargeTransaction.operatorId = t_recharge.operatorId
|
4564 |
rechargeTransaction.operatorId = t_recharge.operatorId
|
| 4565 |
rechargeTransaction.plan = t_recharge.plan
|
4565 |
rechargeTransaction.plan = t_recharge.plan
|
| 4566 |
rechargeTransaction.ipAddress = t_recharge.ipAddress
|
4566 |
rechargeTransaction.ipAddress = t_recharge.ipAddress
|
| 4567 |
rechargeTransaction.paymentAmount = t_recharge.paymentAmount
|
4567 |
rechargeTransaction.paymentAmount = t_recharge.paymentAmount
|
| - |
|
4568 |
rechargeTransaction.payMethod = t_recharge.payMethod
|
| 4568 |
session.commit()
|
4569 |
session.commit()
|
| 4569 |
|
4570 |
|
| 4570 |
store = HotspotStore.get_by(id=rechargeTransaction.storeId)
|
4571 |
store = HotspotStore.get_by(id=rechargeTransaction.storeId)
|
| 4571 |
wallet = WalletForCompany.get_by(companyId=store.companyId)
|
4572 |
wallet = WalletForCompany.get_by(companyId=store.companyId)
|
| 4572 |
if store.availableLimit < rechargeTransaction.amount or wallet.amount < rechargeTransaction.amount:
|
4573 |
if store.availableLimit < rechargeTransaction.amount or wallet.amount < rechargeTransaction.amount:
|
| Line 4666... |
Line 4667... |
| 4666 |
else:
|
4667 |
else:
|
| 4667 |
raise TransactionServiceException(119, 'No such circle')
|
4668 |
raise TransactionServiceException(119, 'No such circle')
|
| 4668 |
|
4669 |
|
| 4669 |
def retrieve_hotspot_recharge_invoice(id):
|
4670 |
def retrieve_hotspot_recharge_invoice(id):
|
| 4670 |
recharge = RechargeTransaction.get_by(id = id)
|
4671 |
recharge = RechargeTransaction.get_by(id = id)
|
| 4671 |
filename = "tmp/recharge" + str(recharge.invoiceNumber) + ".pdf"
|
4672 |
filename = "/tmp/recharge" + str(recharge.invoiceNumber) + ".pdf"
|
| 4672 |
operator = ServiceProvider.get_by(id = recharge.operatorId).name
|
4673 |
operator = ServiceProvider.get_by(id = recharge.operatorId).name
|
| 4673 |
amount = recharge.amount
|
4674 |
amount = recharge.amount
|
| 4674 |
telNum = "+91 " + str(recharge.deviceNum)
|
4675 |
telNum = "+91 " + str(recharge.deviceNum)
|
| 4675 |
customerName = recharge.name
|
4676 |
customerName = recharge.name
|
| 4676 |
invNum = str(recharge.invoiceNumber)
|
4677 |
invNum = str(recharge.invoiceNumber)
|