Subversion Repositories SmartDukaan

Rev

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

Rev 19482 Rev 19484
Line 2404... Line 2404...
2404
                Mongo.sendNotification([user_id], 'Batch Credit', 'Cashback Credited for %ss'%(str(refundType)), 'Rs.%s has been added to your wallet'%(value),'url', 'http://api.profittill.com/cashbacks/mine?user_id=%s'%(user_id), '2999-01-01', True, "TRAN_SMS Dear Customer, Cashback Credited for %ss. Rs.%s has been added to your wallet"%(refundType,value))
2404
                Mongo.sendNotification([user_id], 'Batch Credit', 'Cashback Credited for %ss'%(str(refundType)), 'Rs.%s has been added to your wallet'%(value),'url', 'http://api.profittill.com/cashbacks/mine?user_id=%s'%(user_id), '2999-01-01', True, "TRAN_SMS Dear Customer, Cashback Credited for %ss. Rs.%s has been added to your wallet"%(refundType,value))
2405
                resp.body = "{\"result\":\"success\"}"
2405
                resp.body = "{\"result\":\"success\"}"
2406
            else:
2406
            else:
2407
                resp.body = "{\"result\":\"failed\"}"
2407
                resp.body = "{\"result\":\"failed\"}"
2408
        elif status == utils.REFUND_ADJUSTMENT_MAP.get(2):
2408
        elif status == utils.REFUND_ADJUSTMENT_MAP.get(2):
2409
            Mongo.updateCrmWalletStatus(status, _id,user_id)
2409
            Mongo.updateCrmWalletStatus(status, _id,user_id,None)
2410
            resp.body = "{\"result\":\"success\"}"
2410
            resp.body = "{\"result\":\"success\"}"
2411
        else:
2411
        else:
2412
            resp.body = "{\"result\":\"failed\"}"
2412
            resp.body = "{\"result\":\"failed\"}"
2413
                            
2413
                            
2414
def main():
2414
def main():
Line 2417... Line 2417...
2417
    otherContacts = [r for r, in session.query(RetailerContacts.mobile_number).filter_by(retailer_id=retailer.id).order_by(RetailerContacts.contact_type).all()]
2417
    otherContacts = [r for r, in session.query(RetailerContacts.mobile_number).filter_by(retailer_id=retailer.id).order_by(RetailerContacts.contact_type).all()]
2418
    print json.dumps(todict(getRetailerObj(retailer, otherContacts, 'fresh')), encoding='utf-8')
2418
    print json.dumps(todict(getRetailerObj(retailer, otherContacts, 'fresh')), encoding='utf-8')
2419
    
2419
    
2420
if __name__ == '__main__':
2420
if __name__ == '__main__':
2421
    #main()
2421
    #main()
2422
    print getTinInfo('07740388453')
-
 
2423
        
-
 
2424
2422
    print getTinInfo('07740388453')                
-
 
2423
2425
2424