Subversion Repositories SmartDukaan

Rev

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

Rev 14525 Rev 14527
Line 230... Line 230...
230
        for order in orders:
230
        for order in orders:
231
            if notReconciled.has_key(order[0]):
231
            if notReconciled.has_key(order[0]):
232
                (roww, column, paidAmount, timestamp1, oSubTagId) = notReconciled[order[0]]
232
                (roww, column, paidAmount, timestamp1, oSubTagId) = notReconciled[order[0]]
233
                if paidAmount==int(offer.get("saleAmount")) and timestamp1 <= saleTime and timestamp1 + 120 >= saleTime:
233
                if paidAmount==int(offer.get("saleAmount")) and timestamp1 <= saleTime and timestamp1 + 120 >= saleTime:
234
                    i = column
234
                    i = column
235
                    try:
-
 
236
                        worksheet1.write(roww, inc(), subTagId)        
235
                    worksheet1.write(roww, inc(), subTagId)        
237
                        worksheet1.write(roww, inc(), offer.get("saleAmount"))        
236
                    worksheet1.write(roww, inc(), offer.get("saleAmount"))        
238
                        worksheet1.write(roww, inc(), offer.get("payOut"))
237
                    worksheet1.write(roww, inc(), offer.get("payOut"))
239
                        print "found match for user", order[1] 
238
                    del notReconciled[order[0]]
240
                    except:
-
 
241
                        print "found another match for user", order[1] 
239
                    print "found match for user", order[1] 
242
                        i=17
-
 
243
                        worksheet1.write(roww, inc(), subTagId)        
-
 
244
                        worksheet1.write(roww, inc(), offer.get("saleAmount"))        
-
 
245
                        worksheet1.write(roww, inc(), offer.get("payOut"))
-
 
246
        
240
        
247
         
241
         
248
        workbook.save(XLS_FILENAME)
242
        workbook.save(XLS_FILENAME)
249
            
243
            
250
def sendmail(email, message, title):
244
def sendmail(email, message, title):
Line 351... Line 345...
351
    return i
345
    return i
352
    
346
    
353
def main():
347
def main():
354
    generateSnapDealReco()
348
    generateSnapDealReco()
355
    #generateFlipkartReco()
349
    #generateFlipkartReco()
356
    sendmail(["amit.gupta@shop2020.in"], "", "DTR Affiliate Reco")
350
    #sendmail(["amit.gupta@shop2020.in"], "", "DTR Affiliate Reco")
357
 
351
 
358
if __name__ == '__main__':
352
if __name__ == '__main__':
359
    main()
353
    main()
360
    
354
    
361
355