| Line 63... |
Line 63... |
| 63 |
from shop2020.model.v1.order.impl.model.ServiceProvider import ServiceProvider
|
63 |
from shop2020.model.v1.order.impl.model.ServiceProvider import ServiceProvider
|
| 64 |
from shop2020.model.v1.order.impl.model.DTHRechargeOrder import DTHRechargeOrder
|
64 |
from shop2020.model.v1.order.impl.model.DTHRechargeOrder import DTHRechargeOrder
|
| 65 |
from shop2020.model.v1.order.impl.model.TelecomCircle import TelecomCircle
|
65 |
from shop2020.model.v1.order.impl.model.TelecomCircle import TelecomCircle
|
| 66 |
from shop2020.model.v1.order.impl.model.RechargeDenomination import RechargeDenomination
|
66 |
from shop2020.model.v1.order.impl.model.RechargeDenomination import RechargeDenomination
|
| 67 |
from shop2020.clients.PromotionClient import PromotionClient
|
67 |
from shop2020.clients.PromotionClient import PromotionClient
|
| - |
|
68 |
from decimal import Decimal
|
| 68 |
|
69 |
|
| 69 |
logging.basicConfig(level=logging.DEBUG)
|
70 |
logging.basicConfig(level=logging.DEBUG)
|
| 70 |
|
71 |
|
| 71 |
sourceId = int(ConfigClient().get_property("sourceid"))
|
72 |
sourceId = int(ConfigClient().get_property("sourceid"))
|
| 72 |
mail_user = 'cnc.center@shop2020.in'
|
73 |
mail_user = 'cnc.center@shop2020.in'
|
| Line 3604... |
Line 3605... |
| 3604 |
twa = session.query(func.sum(UserWallet.amount)).one()
|
3605 |
twa = session.query(func.sum(UserWallet.amount)).one()
|
| 3605 |
tra = session.query(func.sum(RechargeOrder.totalAmount)).filter(RechargeOrder.status == RechargeOrderStatus.RECHARGE_SUCCESSFUL).one()
|
3606 |
tra = session.query(func.sum(RechargeOrder.totalAmount)).filter(RechargeOrder.status == RechargeOrderStatus.RECHARGE_SUCCESSFUL).one()
|
| 3606 |
gwa = session.query(func.sum(UserWalletHistory.amount)).filter(UserWalletHistory.orderId > 100000).one()
|
3607 |
gwa = session.query(func.sum(UserWalletHistory.amount)).filter(UserWalletHistory.orderId > 100000).one()
|
| 3607 |
#tpa = session.query(func.sum(UserWalletHistory.amount)).filter(UserWalletHistory.orderId < 100000).one()
|
3608 |
#tpa = session.query(func.sum(UserWalletHistory.amount)).filter(UserWalletHistory.orderId < 100000).one()
|
| 3608 |
tpa = session.query(func.sum(RechargeOrder.totalAmount-RechargeOrder.walletAmount)).filter(RechargeOrder.status.in_((RechargeOrderStatus.RECHARGE_SUCCESSFUL, RechargeOrderStatus.RECHARGE_FAILED, RechargeOrderStatus.PAYMENT_SUCCESSFUL, RechargeOrderStatus.RECHARGE_FAILED_REFUNDED))).one()
|
3609 |
tpa = session.query(func.sum(RechargeOrder.totalAmount-RechargeOrder.walletAmount)).filter(RechargeOrder.status.in_((RechargeOrderStatus.RECHARGE_SUCCESSFUL, RechargeOrderStatus.RECHARGE_FAILED, RechargeOrderStatus.PAYMENT_SUCCESSFUL, RechargeOrderStatus.RECHARGE_FAILED_REFUNDED))).one()
|
| - |
|
3610 |
|
| - |
|
3611 |
balance = Decimal(RechargeService.getBalance())
|
| - |
|
3612 |
amounts['(a) Total Payment Amount'] = tpa[0]
|
| - |
|
3613 |
amounts['(b) Gift Wallet Amount'] = gwa[0]
|
| 3609 |
amounts['Total Wallet Amount'] = twa[0]
|
3614 |
amounts['(c) Total Wallet Amount'] = twa[0]
|
| 3610 |
amounts['Total Recharge Amount'] = tra[0]
|
3615 |
amounts['(d) Total Recharge Amount'] = tra[0]
|
| 3611 |
amounts['Gift Wallet Amount'] = gwa[0]
|
3616 |
amounts['(e) Account Balance'] = balance
|
| 3612 |
#amounts['Total Payment Amount'] = tra[0] + twa[0] - gwa[0]
|
3617 |
#amounts['Total Payment Amount'] = tra[0] + twa[0] - gwa[0]
|
| 3613 |
amounts['Total Payment Amount'] = tpa[0]
|
3618 |
amounts['Saholic Mismatch = (a+b-c-d)'] = tpa[0] + gwa[0] - tra[0] - twa[0]
|
| 3614 |
amounts['Mismatch'] = tpa[0] + gwa[0] - tra[0] - twa[0]
|
3619 |
amounts['SpiceDeck Mismatch = (d-e)'] = 100000 - tra[0] - balance
|
| - |
|
3620 |
|
| - |
|
3621 |
|
| - |
|
3622 |
|
| 3615 |
|
3623 |
|
| 3616 |
rs.statusCounts = statusCounts
|
3624 |
rs.statusCounts = statusCounts
|
| 3617 |
rs.operatorCounts = operatorCounts
|
3625 |
rs.operatorCounts = operatorCounts
|
| 3618 |
rs.currentOrders = currentOrders
|
3626 |
rs.currentOrders = currentOrders
|
| 3619 |
rs.amounts = amounts
|
3627 |
rs.amounts = amounts
|