| Line 19... |
Line 19... |
| 19 |
|
19 |
|
| 20 |
if __name__ == '__main__' and __package__ is None:
|
20 |
if __name__ == '__main__' and __package__ is None:
|
| 21 |
import os
|
21 |
import os
|
| 22 |
sys.path.insert(0, os.getcwd())
|
22 |
sys.path.insert(0, os.getcwd())
|
| 23 |
|
23 |
|
| 24 |
from shop2020.thriftpy.model.v1.order.ttypes import RechargeOrderStatus
|
24 |
from shop2020.thriftpy.model.v1.order.ttypes import RechargeOrderStatus,\
|
| - |
|
25 |
OrderType
|
| 25 |
from shop2020.model.v1.order.impl.DataAccessors import get_recharge_orders_for_status, update_recharge_order_status,\
|
26 |
from shop2020.model.v1.order.impl.DataAccessors import get_recharge_orders_for_status, update_recharge_order_status,\
|
| 26 |
update_recharge_transaction_status, get_next_invoice_number
|
27 |
update_recharge_transaction_status, get_next_invoice_number
|
| 27 |
from shop2020.model.v1.order.impl import DataService
|
28 |
from shop2020.model.v1.order.impl import DataService
|
| 28 |
from shop2020.model.v1.order.impl.DataService import RechargeTransaction, HotspotStore,\
|
29 |
from shop2020.model.v1.order.impl.DataService import RechargeTransaction, HotspotStore,\
|
| 29 |
WalletForCompany, WalletHistoryForCompany
|
30 |
WalletForCompany, WalletHistoryForCompany
|
| Line 239... |
Line 240... |
| 239 |
wh.walletId = wallet.id
|
240 |
wh.walletId = wallet.id
|
| 240 |
wh.openingBal = wallet.amount
|
241 |
wh.openingBal = wallet.amount
|
| 241 |
wh.closingBal = wallet.amount + amount
|
242 |
wh.closingBal = wallet.amount + amount
|
| 242 |
wh.amount = amount
|
243 |
wh.amount = amount
|
| 243 |
wh.transactionTime = datetime.datetime.now()
|
244 |
wh.transactionTime = datetime.datetime.now()
|
| 244 |
wh.referenceNumber = get_next_invoice_number(5)
|
245 |
wh.referenceNumber = get_next_invoice_number(OrderType.WALLETCREDIT)
|
| 245 |
wh.description = "Wallet Credited"
|
246 |
wh.description = "Wallet Credited"
|
| 246 |
|
247 |
|
| 247 |
wallet.amount += amount
|
248 |
wallet.amount += amount
|
| 248 |
session.commit()
|
249 |
session.commit()
|
| 249 |
mail("cnc.center@shop2020.in", "5h0p2o2o", ["rajveer.singh@shop2020.in", "anupam.singh@shop2020.in", "rajneesh.arora@shop2020.in"], "Wallet topped up by " + str(amount) + "rupees.", "", [], [], [])
|
250 |
mail("cnc.center@shop2020.in", "5h0p2o2o", ["rajveer.singh@shop2020.in", "anupam.singh@shop2020.in", "rajneesh.arora@shop2020.in"], "Wallet topped up by " + str(amount) + "rupees.", "", [], [], [])
|