Subversion Repositories SmartDukaan

Rev

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

Rev 10298 Rev 10399
Line 498... Line 498...
498
    wamt = int(dit2[0])- int(dit[0])
498
    wamt = int(dit2[0])- int(dit[0])
499
    wallet.amount = wamt
499
    wallet.amount = wamt
500
    session.commit()
500
    session.commit()
501
 
501
 
502
    maildata += "</tbody></table></body></html>"
502
    maildata += "</tbody></table></body></html>"
503
    mail_html("cnc.center@shop2020.in", "5h0p2o2o", ["rajveer.singh@shop2020.in", "kshitij.sood@shop2020.in", "Ashwani.Kumar@spiceretail.co.in","parveen.mittal@spiceretail.co.in","pardeep.panwar@spiceretail.co.in","adarsh.verma@spiceretail.co.in","j.p.gupta@shop2020.in", "rajneesh.arora@shop2020.in", "amit.tyagi@spiceretail.co.in"], "MIS :- SpiceRetail  (Date - " + todate.strftime("%d-%m-%Y") + ")   (Wallet Amount - " + str(wallet.amount) + ")    (Total Recharge - " + str(trecharge) + ")", maildata, []) 
503
    mail_html("cnc.center@shop2020.in", "5h0p2o2o", ["rajveer.singh@shop2020.in", "kshitij.sood@shop2020.in", "digamber.chauhan@spiceretail.co.in","parveen.mittal@spiceretail.co.in","pardeep.panwar@spiceretail.co.in","adarsh.verma@spiceretail.co.in","j.p.gupta@shop2020.in", "rajneesh.arora@shop2020.in", "amit.tyagi@spiceretail.co.in"], "MIS :- SpiceRetail  (Date - " + todate.strftime("%d-%m-%Y") + ")   (Wallet Amount - " + str(wallet.amount) + ")    (Total Recharge - " + str(trecharge) + ")", maildata, []) 
504
    try:
504
    try:
505
        push_recharge_collection_to_ocr()
505
        push_recharge_collection_to_ocr()
506
    except:
506
    except:
507
        mail_html("cnc.center@shop2020.in", "5h0p2o2o", ["rajveer.singh@shop2020.in", "kshitij.sood@shop2020.in", "rajneesh.arora@shop2020.in"], "Problem while pushing recharge collection to OCR", "", [])
507
        mail_html("cnc.center@shop2020.in", "5h0p2o2o", ["rajveer.singh@shop2020.in", "kshitij.sood@shop2020.in", "rajneesh.arora@shop2020.in"], "Problem while pushing recharge collection to OCR", "", [])
508
    finally:
508
    finally:
Line 579... Line 579...
579
    wh.referenceNumber =  get_next_invoice_number(OrderType.WALLETCREDIT)
579
    wh.referenceNumber =  get_next_invoice_number(OrderType.WALLETCREDIT)
580
    wh.description = "Wallet Credited"
580
    wh.description = "Wallet Credited"
581
    
581
    
582
    wallet.amount += amount
582
    wallet.amount += amount
583
    session.commit()
583
    session.commit()
584
    mail("cnc.center@shop2020.in", "5h0p2o2o", ["rajveer.singh@shop2020.in", "kshitij.sood@shop2020.in", "Ashwani.Kumar@spiceretail.co.in","parveen.mittal@spiceretail.co.in","pardeep.panwar@spiceretail.co.in","adarsh.verma@spiceretail.co.in","j.p.gupta@shop2020.in", "rajneesh.arora@shop2020.in", "amit.tyagi@spiceretail.co.in"] , company.name + " wallet topped up by " +  str(amount) + " rupees.", "", [], [], [])
584
    mail("cnc.center@shop2020.in", "5h0p2o2o", ["rajveer.singh@shop2020.in", "kshitij.sood@shop2020.in", "digamber.chauhan@spiceretail.co.in","parveen.mittal@spiceretail.co.in","pardeep.panwar@spiceretail.co.in","adarsh.verma@spiceretail.co.in","j.p.gupta@shop2020.in", "rajneesh.arora@shop2020.in", "amit.tyagi@spiceretail.co.in"] , company.name + " wallet topped up by " +  str(amount) + " rupees.", "", [], [], [])
585
 
585
 
586
def compute_website_recharge_collection(cdate, oldBalance, newBalance):
586
def compute_website_recharge_collection(cdate, oldBalance, newBalance):
587
    startTime = datetime.datetime(cdate.year, cdate.month, cdate.day)
587
    startTime = datetime.datetime(cdate.year, cdate.month, cdate.day)
588
    endTime = startTime + timedelta(days=1)
588
    endTime = startTime + timedelta(days=1)
589
    tamount = 0
589
    tamount = 0