| Line 978... |
Line 978... |
| 978 |
for r in result:
|
978 |
for r in result:
|
| 979 |
TotalActivations=r[0]
|
979 |
TotalActivations=r[0]
|
| 980 |
worksheet.write(26,1,r[0],center_alignment)
|
980 |
worksheet.write(26,1,r[0],center_alignment)
|
| 981 |
|
981 |
|
| 982 |
workbook.save(TMP_FILE)
|
982 |
workbook.save(TMP_FILE)
|
| 983 |
#sendmail(["manas.kapoor@shop2020.in"], "", TMP_FILE, SUBJECT)
|
983 |
#sendmail(["rajender.singh@shop2020.in"], "", TMP_FILE, SUBJECT)
|
| 984 |
|
984 |
|
| 985 |
|
985 |
|
| 986 |
def generateAgentWiseFreshCallingReport():
|
986 |
def generateAgentWiseFreshCallingReport():
|
| 987 |
|
987 |
|
| 988 |
agentId=3
|
988 |
agentId=3
|
| Line 1593... |
Line 1593... |
| 1593 |
hours=averageCallDuration/3600
|
1593 |
hours=averageCallDuration/3600
|
| 1594 |
minutesLeft=(averageCallDuration%3600)/60
|
1594 |
minutesLeft=(averageCallDuration%3600)/60
|
| 1595 |
worksheet.write(14,1,str(int(hours))+':'+str(int(minutesLeft)),center_alignment)
|
1595 |
worksheet.write(14,1,str(int(hours))+':'+str(int(minutesLeft)),center_alignment)
|
| 1596 |
workbook.save(TMP_FILE)
|
1596 |
workbook.save(TMP_FILE)
|
| 1597 |
|
1597 |
|
| 1598 |
#sendmail(["manas.kapoor@shop2020.in"], "", TMP_FILE, SUBJECT)
|
1598 |
#sendmail(["rajender.singh@shop2020.in"], "", TMP_FILE, SUBJECT)
|
| 1599 |
|
1599 |
|
| 1600 |
|
1600 |
|
| 1601 |
def generateAgentWiseOnboardingCallingReport():
|
1601 |
def generateAgentWiseOnboardingCallingReport():
|
| 1602 |
|
1602 |
|
| 1603 |
agentId=3
|
1603 |
agentId=3
|
| Line 1758... |
Line 1758... |
| 1758 |
generateAgentWiseFreshCallingReport()
|
1758 |
generateAgentWiseFreshCallingReport()
|
| 1759 |
generateFollowUpCallingReport()
|
1759 |
generateFollowUpCallingReport()
|
| 1760 |
generateAgentWiseFollowupCallingReport()
|
1760 |
generateAgentWiseFollowupCallingReport()
|
| 1761 |
generateOnBoardingCallingReport()
|
1761 |
generateOnBoardingCallingReport()
|
| 1762 |
generateAgentWiseOnboardingCallingReport()
|
1762 |
generateAgentWiseOnboardingCallingReport()
|
| 1763 |
#sendmail(["manas.kapoor@shop2020.in"], "", TMP_FILE, SUBJECT)
|
1763 |
#sendmail(["rajender.singh@shop2020.in"], "", TMP_FILE, SUBJECT)
|
| 1764 |
sendmail(["amit.sirohi@shop2020.in","rajneesh.arora@saholic.com","ritesh.chauhan@shop2020.in", "shailesh.kumar@shop2020.in","utkarsh@coreoutsourcingservices.com","gupta.varun@coreoutsourcingservices.com","manas.kapoor@shop2020.in"], "", TMP_FILE, SUBJECT)
|
1764 |
sendmail(["amit.sirohi@shop2020.in","rajneesh.arora@saholic.com","ritesh.chauhan@shop2020.in", "shailesh.kumar@shop2020.in","utkarsh@coreoutsourcingservices.com","gupta.varun@coreoutsourcingservices.com","rajender.singh@shop2020.in"], "", TMP_FILE, SUBJECT)
|
| 1765 |
if options.reporttype == 'retention':
|
1765 |
if options.reporttype == 'retention':
|
| 1766 |
generateAccessoriesCartReport()
|
1766 |
generateAccessoriesCartReport()
|
| 1767 |
generateAccessoriesTabsReport()
|
1767 |
generateAccessoriesTabsReport()
|
| 1768 |
generateAccessoriesOrderReport()
|
1768 |
generateAccessoriesOrderReport()
|
| 1769 |
#sendmailretention(["manas.kapoor@shop2020.in"], "", RET_FILE, RET_SUBJECT)
|
1769 |
#sendmailretention(["rajender.singh@shop2020.in"], "", RET_FILE, RET_SUBJECT)
|
| 1770 |
sendmailretention(["amit.sirohi@shop2020.in","rajneesh.arora@saholic.com", "shailesh.kumar@shop2020.in","chaitnaya.vats@shop2020.in","manas.kapoor@shop2020.in"], "", RET_FILE, RET_SUBJECT)
|
1770 |
sendmailretention(["amit.sirohi@shop2020.in","rajneesh.arora@saholic.com", "shailesh.kumar@shop2020.in","chaitnaya.vats@shop2020.in","rajender.singh@shop2020.in"], "", RET_FILE, RET_SUBJECT)
|
| 1771 |
|
1771 |
|
| 1772 |
def sendmail(email, message, fileName, title):
|
1772 |
def sendmail(email, message, fileName, title):
|
| 1773 |
if email == "":
|
1773 |
if email == "":
|
| 1774 |
return
|
1774 |
return
|
| 1775 |
mailServer = smtplib.SMTP(SMTP_SERVER, SMTP_PORT)
|
1775 |
mailServer = smtplib.SMTP(SMTP_SERVER, SMTP_PORT)
|
| Line 1791... |
Line 1791... |
| 1791 |
fileMsg.set_payload(file(TMP_FILE).read())
|
1791 |
fileMsg.set_payload(file(TMP_FILE).read())
|
| 1792 |
encoders.encode_base64(fileMsg)
|
1792 |
encoders.encode_base64(fileMsg)
|
| 1793 |
fileMsg.add_header('Content-Disposition', 'attachment;filename=' + fileName)
|
1793 |
fileMsg.add_header('Content-Disposition', 'attachment;filename=' + fileName)
|
| 1794 |
msg.attach(fileMsg)
|
1794 |
msg.attach(fileMsg)
|
| 1795 |
|
1795 |
|
| 1796 |
MAILTO = ['amit.sirohi@shop2020.in','rajneesh.arora@saholic.com', 'shailesh.kumar@shop2020.in','gupta.varun@coreoutsourcingservices.com','utkarsh@coreoutsourcingservices.com','manas.kapoor@shop2020.in']
|
1796 |
MAILTO = ['amit.sirohi@shop2020.in','rajneesh.arora@saholic.com', 'shailesh.kumar@shop2020.in','gupta.varun@coreoutsourcingservices.com','utkarsh@coreoutsourcingservices.com','rajender.singh@shop2020.in']
|
| 1797 |
#MAILTO = ['manas.kapoor@saholic.com']
|
1797 |
#MAILTO = ['rajender.singh@saholic.com']
|
| 1798 |
mailServer.login(SENDER, PASSWORD)
|
1798 |
mailServer.login(SENDER, PASSWORD)
|
| 1799 |
try:
|
1799 |
try:
|
| 1800 |
mailServer.sendmail(SENDER, MAILTO, msg.as_string())
|
1800 |
mailServer.sendmail(SENDER, MAILTO, msg.as_string())
|
| 1801 |
except:
|
1801 |
except:
|
| 1802 |
m = Email('localhost')
|
1802 |
m = Email('localhost')
|
| Line 1934... |
Line 1934... |
| 1934 |
fileMsg.set_payload(file(RET_FILE).read())
|
1934 |
fileMsg.set_payload(file(RET_FILE).read())
|
| 1935 |
encoders.encode_base64(fileMsg)
|
1935 |
encoders.encode_base64(fileMsg)
|
| 1936 |
fileMsg.add_header('Content-Disposition', 'attachment;filename=' + fileName)
|
1936 |
fileMsg.add_header('Content-Disposition', 'attachment;filename=' + fileName)
|
| 1937 |
msg.attach(fileMsg)
|
1937 |
msg.attach(fileMsg)
|
| 1938 |
|
1938 |
|
| 1939 |
MAILTO = ['amit.sirohi@shop2020.in','rajneesh.arora@saholic.com', 'shailesh.kumar@shop2020.in','chaitnaya.vats@shop2020.in','manas.kapoor@shop2020.in']
|
1939 |
MAILTO = ['amit.sirohi@shop2020.in','rajneesh.arora@saholic.com', 'shailesh.kumar@shop2020.in','chaitnaya.vats@shop2020.in','rajender.singh@shop2020.in']
|
| 1940 |
#MAILTO = ['manas.kapoor@saholic.com']
|
1940 |
#MAILTO = ['rajender.singh@saholic.com']
|
| 1941 |
mailServer.login(SENDER, PASSWORD)
|
1941 |
mailServer.login(SENDER, PASSWORD)
|
| 1942 |
try:
|
1942 |
try:
|
| 1943 |
mailServer.sendmail(SENDER, MAILTO, msg.as_string())
|
1943 |
mailServer.sendmail(SENDER, MAILTO, msg.as_string())
|
| 1944 |
except:
|
1944 |
except:
|
| 1945 |
m = Email('localhost')
|
1945 |
m = Email('localhost')
|