| Line 510... |
Line 510... |
| 510 |
worksheet.write(18,column, 'Average Dialed Out per agent', style)
|
510 |
worksheet.write(18,column, 'Average Dialed Out per agent', style)
|
| 511 |
|
511 |
|
| 512 |
contactableData=0
|
512 |
contactableData=0
|
| 513 |
nonContactableData=0
|
513 |
nonContactableData=0
|
| 514 |
global ACCS_TAB_WILL_PLACE_ORDER
|
514 |
global ACCS_TAB_WILL_PLACE_ORDER
|
| - |
|
515 |
ACCS_TAB_WILL_PLACE_ORDER=0
|
| 515 |
for r in result:
|
516 |
for r in result:
|
| 516 |
row = accsDispositionMap.get(r[0])
|
517 |
row = accsDispositionMap.get(r[0])
|
| 517 |
if accsDispositionMap.get(r[0]) == 2 or accsDispositionMap.get(r[0]) == 3 or accsDispositionMap.get(r[0]) == 4:
|
518 |
if accsDispositionMap.get(r[0]) == 2 or accsDispositionMap.get(r[0]) == 3 or accsDispositionMap.get(r[0]) == 4:
|
| 518 |
nonContactableData+=int(r[1])
|
519 |
nonContactableData+=int(r[1])
|
| 519 |
else:
|
520 |
else:
|
| Line 1635... |
Line 1636... |
| 1635 |
heading = "Accessories Cart Users(Project 1)"
|
1636 |
heading = "Accessories Cart Users(Project 1)"
|
| 1636 |
message="No. of Agents " + str(ACCS_CART_LOGIN)
|
1637 |
message="No. of Agents " + str(ACCS_CART_LOGIN)
|
| 1637 |
message1="Total Calls attempted " + str(ACCS_CART_TOTAL)
|
1638 |
message1="Total Calls attempted " + str(ACCS_CART_TOTAL)
|
| 1638 |
message2="Total Successful calls " + str(ACCS_CART_SUCCESSFUL)
|
1639 |
message2="Total Successful calls " + str(ACCS_CART_SUCCESSFUL)
|
| 1639 |
message3="Will Order "+ str(ACCS_CART_WILL_PLACE_ORDER)
|
1640 |
message3="Will Order "+ str(ACCS_CART_WILL_PLACE_ORDER)
|
| - |
|
1641 |
if ACCS_CART_TOTAL!=0:
|
| 1640 |
message4="Will Order % " +str(round((ACCS_CART_WILL_PLACE_ORDER/float(ACCS_CART_TOTAL))*100,2))
|
1642 |
message4="Will Order % " +str(round((ACCS_CART_WILL_PLACE_ORDER/float(ACCS_CART_TOTAL))*100,2))
|
| - |
|
1643 |
else:
|
| - |
|
1644 |
message4="Will Order % 0"
|
| 1641 |
return "<u>" + heading + "</u><br>" +message+"<br>"+message1+"<br>"+message2+"<br>"+message3+"<br>"+message4+"<br>"
|
1645 |
return "<u>" + heading + "</u><br>" +message+"<br>"+message1+"<br>"+message2+"<br>"+message3+"<br>"+message4+"<br>"
|
| 1642 |
|
1646 |
|
| 1643 |
def getAccsTabHtml():
|
1647 |
def getAccsTabHtml():
|
| 1644 |
heading = "Accessories Active Users(Project 2)"
|
1648 |
heading = "Accessories Active Users(Project 2)"
|
| 1645 |
message="No. of Agents " + str(ACCS_TAB_LOGIN)
|
1649 |
message="No. of Agents " + str(ACCS_TAB_LOGIN)
|
| 1646 |
message1="Total Calls attempted " + str(ACCS_TAB_TOTAL)
|
1650 |
message1="Total Calls attempted " + str(ACCS_TAB_TOTAL)
|
| 1647 |
message2="Total Successful calls " + str(ACCS_TAB_SUCCESSFUL)
|
1651 |
message2="Total Successful calls " + str(ACCS_TAB_SUCCESSFUL)
|
| 1648 |
message3="Will Order "+ str(ACCS_TAB_WILL_PLACE_ORDER)
|
1652 |
message3="Will Order "+ str(ACCS_TAB_WILL_PLACE_ORDER)
|
| - |
|
1653 |
if ACCS_TAB_TOTAL!=0:
|
| 1649 |
message4="Will Order % " +str(round((ACCS_TAB_WILL_PLACE_ORDER/float(ACCS_TAB_TOTAL))*100,2))
|
1654 |
message4="Will Order % " +str(round((ACCS_TAB_WILL_PLACE_ORDER/float(ACCS_TAB_TOTAL))*100,2))
|
| - |
|
1655 |
else:
|
| - |
|
1656 |
message4="Will Order % 0"
|
| 1650 |
return "<br><br><u>" + heading + "</u><br>" +message+"<br>"+message1+"<br>"+message2+"<br>"+message3+"<br>"+message4+"<br>"
|
1657 |
return "<br><br><u>" + heading + "</u><br>" +message+"<br>"+message1+"<br>"+message2+"<br>"+message3+"<br>"+message4+"<br>"
|
| 1651 |
|
1658 |
|
| 1652 |
def getAccsCartOrders():
|
1659 |
def getAccsCartOrders():
|
| 1653 |
datesql = "select date(now() - interval 1 day), count(distinct user_id),count(distinct order_id), sum(quantity),sum(amount_paid) from allorder where store_id='spice' and category='Accs' and date(created_on)=date(now() - interval 1 day) and user_id in (select user_id from usercrmcallingdata where project_id=1 and date(created)>=date(now()- interval 7 day));"
|
1660 |
datesql = "select date(now() - interval 1 day), count(distinct user_id),count(distinct order_id), sum(quantity),sum(amount_paid) from allorder where store_id='spice' and category='Accs' and date(created_on)=date(now() - interval 1 day) and user_id in (select user_id from usercrmcallingdata where project_id=1 and date(created)>=date(now()- interval 7 day));"
|
| 1654 |
conn = getDbConnection()
|
1661 |
conn = getDbConnection()
|