Subversion Repositories SmartDukaan

Rev

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

Rev 10146 Rev 10298
Line 602... Line 602...
602
    advance_amount = orders[0].advanceAmount
602
    advance_amount = orders[0].advanceAmount
603
    saddress = ""
603
    saddress = ""
604
    bcc = []
604
    bcc = []
605
    if advance_amount  > 0:
605
    if advance_amount  > 0:
606
        store = get_hotspot_store(orders[0].storeId, "")
606
        store = get_hotspot_store(orders[0].storeId, "")
607
        bcc = bcc + store.approvalEmail.split(';')  + [store.email,  "rajveer.singh@shop2020.in", "rajneesh.arora@shop2020.in", "anupam.singh@shop2020.in", "amit.sirohi@shop2020.in"]
607
        bcc = bcc + store.approvalEmail.split(';')  + [store.email,  "rajveer.singh@shop2020.in", "rajneesh.arora@shop2020.in", "kshitij.sood@shop2020.in", "amit.sirohi@shop2020.in"]
608
        saddress += " at our store " + __get_hotspot_store_address_html(store)
608
        saddress += " at our store " + __get_hotspot_store_address_html(store)
609
    otgLink = ""
609
    otgLink = ""
610
    inOrderOtg = "<div>On Time Guarantee<br><span style=color:red>We pay if we delay</span></div>"
610
    inOrderOtg = "<div>On Time Guarantee<br><span style=color:red>We pay if we delay</span></div>"
611
    if len(transaction.orders) == 1:
611
    if len(transaction.orders) == 1:
612
        inOrderOtg = ""
612
        inOrderOtg = ""
Line 3227... Line 3227...
3227
            if "Saved Successfully" in resp:
3227
            if "Saved Successfully" in resp:
3228
                cs.pushedToOcr = True
3228
                cs.pushedToOcr = True
3229
                cs.pushedAt = datetime.datetime.now()
3229
                cs.pushedAt = datetime.datetime.now()
3230
                session.commit()
3230
                session.commit()
3231
            elif "Error in Saving Data" in resp:
3231
            elif "Error in Saving Data" in resp:
3232
                mail_html("cnc.center@shop2020.in", "5h0p2o2o", ["rajveer.singh@shop2020.in", "anupam.singh@shop2020.in", "rajneesh.arora@shop2020.in"], "Problem while pushing store collection to OCR", resp, [])
3232
                mail_html("cnc.center@shop2020.in", "5h0p2o2o", ["rajveer.singh@shop2020.in", "kshitij.sood@shop2020.in", "rajneesh.arora@shop2020.in"], "Problem while pushing store collection to OCR", resp, [])
3233
            else: 
3233
            else: 
3234
                mail_html("cnc.center@shop2020.in", "5h0p2o2o", ["rajveer.singh@shop2020.in", "anupam.singh@shop2020.in", "rajneesh.arora@shop2020.in"], "Problem while pushing store collection to OCR", resp, [])
3234
                mail_html("cnc.center@shop2020.in", "5h0p2o2o", ["rajveer.singh@shop2020.in", "kshitij.sood@shop2020.in", "rajneesh.arora@shop2020.in"], "Problem while pushing store collection to OCR", resp, [])
3235
    except:
3235
    except:
3236
        print "Problem while pushing to ocr"
3236
        print "Problem while pushing to ocr"
3237
 
3237
 
3238
def __push_collection_to_hotspot(order, type, storeOrder = False):
3238
def __push_collection_to_hotspot(order, type, storeOrder = False):
3239
    try:
3239
    try:
Line 4683... Line 4683...
4683
    amounts['(e) Discount Balance'] = tda[0]
4683
    amounts['(e) Discount Balance'] = tda[0]
4684
    amounts['Saholic Mismatch = (a+b+f-c-d)'] = tpa[0] + gwa[0] + tda[0] - tra[0] - twa[0] + 57607
4684
    amounts['Saholic Mismatch = (a+b+f-c-d)'] = tpa[0] + gwa[0] + tda[0] - tra[0] - twa[0] + 57607
4685
    
4685
    
4686
    '''
4686
    '''
4687
    if amounts['SpiceDeck Mismatch = (d-e)'] != -739:
4687
    if amounts['SpiceDeck Mismatch = (d-e)'] != -739:
4688
        mail(mail_user, mail_password, ['rajneesh.arora@shop2020.in', 'rajveer.singh@shop2020.in', 'anupam.singh@shop2020.in'], "SpiceDeck Account mismatch of amount " + str(amounts['SpiceDeck Mismatch = (d-e)']), "", [], [], [])
4688
        mail(mail_user, mail_password, ['rajneesh.arora@shop2020.in', 'rajveer.singh@shop2020.in', 'kshitij.sood@shop2020.in'], "SpiceDeck Account mismatch of amount " + str(amounts['SpiceDeck Mismatch = (d-e)']), "", [], [], [])
4689
    if amounts['Saholic Mismatch = (a+b-c-d)'] != -1919:
4689
    if amounts['Saholic Mismatch = (a+b-c-d)'] != -1919:
4690
        mail(mail_user, mail_password, ['rajneesh.arora@shop2020.in', 'rajveer.singh@shop2020.in', 'anupam.singh@shop2020.in'], "Saholic Recharge Account mismatch of amount " + str(amounts['Saholic Mismatch = (a+b-c-d)']), "", [], [], [])
4690
        mail(mail_user, mail_password, ['rajneesh.arora@shop2020.in', 'rajveer.singh@shop2020.in', 'kshitij.sood@shop2020.in'], "Saholic Recharge Account mismatch of amount " + str(amounts['Saholic Mismatch = (a+b-c-d)']), "", [], [], [])
4691
    '''
4691
    '''
4692
                
4692
                
4693
    rs.statusCounts = statusCounts
4693
    rs.statusCounts = statusCounts
4694
    rs.operatorCounts = operatorCounts    
4694
    rs.operatorCounts = operatorCounts    
4695
    rs.currentOrders = currentOrders
4695
    rs.currentOrders = currentOrders
Line 5675... Line 5675...
5675
    wh.referenceNumber =  get_next_invoice_number(OrderType.WALLETCREDIT)
5675
    wh.referenceNumber =  get_next_invoice_number(OrderType.WALLETCREDIT)
5676
    wh.description = "Wallet Credited"
5676
    wh.description = "Wallet Credited"
5677
    
5677
    
5678
    wallet.amount += amount
5678
    wallet.amount += amount
5679
    session.commit()
5679
    session.commit()
5680
    mail("cnc.center@shop2020.in", "5h0p2o2o", ["rajveer.singh@shop2020.in", "anupam.singh@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.", "", [], [], [])
5680
    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.", "", [], [], [])
5681
    return wallet.amount
5681
    return wallet.amount
5682
 
5682
 
5683
def get_wallet_balance_for_company(companyId):
5683
def get_wallet_balance_for_company(companyId):
5684
    return WalletForCompany.get_by(companyId = companyId).amount
5684
    return WalletForCompany.get_by(companyId = companyId).amount
5685
 
5685