Subversion Repositories SmartDukaan

Rev

Rev 22971 | Rev 22973 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 22971 Rev 22972
Line 205... Line 205...
205
            today = datetime.today()
205
            today = datetime.today()
206
            datestr = str(today.year) + "-" + str(today.month)+ "-"+str(today.day)+"-" +associate['emailId']
206
            datestr = str(today.year) + "-" + str(today.month)+ "-"+str(today.day)+"-" +associate['emailId']
207
            filename = "/tmp/sales-associate-" + datestr + ".xls"
207
            filename = "/tmp/sales-associate-" + datestr + ".xls"
208
            wbk.save(filename)
208
            wbk.save(filename)
209
            email_text = get_email_text(associate['name'], str(get_cut_off().year) + "-" + str(get_cut_off().month)+ "-"+str(get_cut_off().day))
209
            email_text = get_email_text(associate['name'], str(get_cut_off().year) + "-" + str(get_cut_off().month)+ "-"+str(get_cut_off().day))
210
            EmailAttachmentSender.mail_send_grid("sales-associates@profitmandi.com","apikey", "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", [associate['emailId']], "Order Summary Report "+associate['emailId'],email_text , [get_attachment_part(filename)],["kamini.sharma@profitmandi.com","tarun.verma@profitmandi.com"],["amit.gupta@saholic.com","kshitij.sood@saholic.com"])              
210
            #EmailAttachmentSender.mail_send_grid("sales-associates@profitmandi.com","apikey", "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", [associate['emailId']], "Order Summary Report "+associate['emailId'],email_text , [get_attachment_part(filename)],["kamini.sharma@profitmandi.com","tarun.verma@profitmandi.com"],["amit.gupta@saholic.com","kshitij.sood@saholic.com"])              
211
            #EmailAttachmentSender.mail_send_grid("sales-associates@profitmandi.com","apikey", "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", ['kshitij.sood@saholic.com'], "Order Summary Report "+associate['emailId'],email_text , [get_attachment_part(filename)],[],["amit.gupta@saholic.com","kshitij.sood@saholic.com"])              
211
            EmailAttachmentSender.mail_send_grid("sales-associates@profitmandi.com","apikey", "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", [associate['emailId']], "Order Summary Report "+associate['emailId'],email_text , [get_attachment_part(filename)],[],[])              
212
                              
212
                              
213
                                
213
                                
214
def get_formatted_date(datetime_obj):
214
def get_formatted_date(datetime_obj):
215
    try:
215
    try:
216
        return str(datetime_obj.day)+"-"+str(datetime_obj.month)+"-"+str(datetime_obj.year)
216
        return str(datetime_obj.day)+"-"+str(datetime_obj.month)+"-"+str(datetime_obj.year)