| Line 5649... |
Line 5649... |
| 5649 |
rechargeTransaction.invoiceNumber = get_next_invoice_number(OrderType.RCH4HOTSPOT)
|
5649 |
rechargeTransaction.invoiceNumber = get_next_invoice_number(OrderType.RCH4HOTSPOT)
|
| 5650 |
session.commit()
|
5650 |
session.commit()
|
| 5651 |
|
5651 |
|
| 5652 |
|
5652 |
|
| 5653 |
def create_recharge_transaction(t_recharge):
|
5653 |
def create_recharge_transaction(t_recharge):
|
| 5654 |
if t_recharge.deviceNum in ('9435070973','9818682439','83760333153','9459060666'):
|
- |
|
| 5655 |
pass
|
- |
|
| 5656 |
else:
|
- |
|
| 5657 |
raise TransactionServiceException(898, "In last 10 minutes you had already recharged this mobile number. Please try after sometime.")
|
- |
|
| 5658 |
dt = datetime.datetime.now() - datetime.timedelta(minutes=10)
|
5654 |
dt = datetime.datetime.now() - datetime.timedelta(minutes=10)
|
| 5659 |
txns = RechargeTransaction.query.filter(RechargeTransaction.deviceNum == t_recharge.deviceNum).filter(RechargeTransaction.transactionTime > dt).all()
|
5655 |
txns = RechargeTransaction.query.filter(RechargeTransaction.deviceNum == t_recharge.deviceNum).filter(RechargeTransaction.transactionTime > dt).all()
|
| 5660 |
if txns:
|
5656 |
if txns:
|
| 5661 |
raise TransactionServiceException(898, "In last 10 minutes you had already recharged this mobile number. Please try after sometime.")
|
5657 |
raise TransactionServiceException(898, "In last 10 minutes you had already recharged this mobile number. Please try after sometime.")
|
| 5662 |
rechargeTransaction = RechargeTransaction()
|
5658 |
rechargeTransaction = RechargeTransaction()
|