Subversion Repositories SmartDukaan

Rev

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

Rev 14571 Rev 14601
Line 128... Line 128...
128
            i=-1 
128
            i=-1 
129
            worksheet.write(row, inc(), orderId)
129
            worksheet.write(row, inc(), orderId)
130
            worksheet1.write(anotherrow, i, orderId)
130
            worksheet1.write(anotherrow, i, orderId)
131
            worksheet.write(row, inc(), row1[1])
131
            worksheet.write(row, inc(), row1[1])
132
            worksheet1.write(anotherrow, i, row1[1])
132
            worksheet1.write(anotherrow, i, row1[1])
-
 
133
            worksheet.write(row, inc(), row1[-2])
-
 
134
            worksheet1.write(anotherrow, i, row1[-2])
133
            worksheet.write(row, inc(), row1[-1])
135
            worksheet.write(row, inc(), row1[-1])
134
            worksheet1.write(anotherrow, i, row1[-1])
136
            worksheet1.write(anotherrow, i, row1[-1])
135
            worksheet.write(row, inc(), order['merchantOrderId'])
137
            worksheet.write(row, inc(), order['merchantOrderId'])
136
            worksheet1.write(anotherrow, i, order['merchantOrderId'])
138
            worksheet1.write(anotherrow, i, order['merchantOrderId'])
137
            worksheet.write(row, inc(), order['subTagId'])
139
            worksheet.write(row, inc(), order['subTagId'])
Line 144... Line 146...
144
            worksheet1.write(anotherrow, i, aff[0]['saleDate'])
146
            worksheet1.write(anotherrow, i, aff[0]['saleDate'])
145
            worksheet.write(row, inc(), aff[0]['saleAmount'])
147
            worksheet.write(row, inc(), aff[0]['saleAmount'])
146
            worksheet1.write(anotherrow, i, aff[0]['saleAmount'])
148
            worksheet1.write(anotherrow, i, aff[0]['saleAmount'])
147
            worksheet.write(row, inc(), aff[0]['payOut'])
149
            worksheet.write(row, inc(), aff[0]['payOut'])
148
            worksheet1.write(anotherrow, i, aff[0]['payOut'])
150
            worksheet1.write(anotherrow, i, aff[0]['payOut'])
-
 
151
            worksheet.write(row, inc(), aff[0]['ip'])
-
 
152
            worksheet1.write(anotherrow, i, aff[0]['ip'])
149
            k = i
153
            k = i
150
            row -= 1
154
            row -= 1
151
            anotherrow -= 1
155
            anotherrow -= 1
152
            for subOrder in order['subOrders']:
156
            for subOrder in order['subOrders']:
153
                i = k
157
                i = k
Line 168... Line 172...
168
 
172
 
169
        else:
173
        else:
170
            i=-1
174
            i=-1
171
            worksheet1.write(anotherrow, inc(), orderId)
175
            worksheet1.write(anotherrow, inc(), orderId)
172
            worksheet1.write(anotherrow, inc(), row1[1])
176
            worksheet1.write(anotherrow, inc(), row1[1])
-
 
177
            worksheet1.write(anotherrow, inc(), row1[-2])
173
            worksheet1.write(anotherrow, inc(), row1[-1])
178
            worksheet1.write(anotherrow, inc(), row1[-1])
174
            worksheet1.write(anotherrow, inc(), order['merchantOrderId'])
179
            worksheet1.write(anotherrow, inc(), order['merchantOrderId'])
175
            worksheet1.write(anotherrow, inc(), order['subTagId'])
180
            worksheet1.write(anotherrow, inc(), order['subTagId'])
176
            worksheet1.write(anotherrow, inc(), order['placedOn'])
181
            worksheet1.write(anotherrow, inc(), order['placedOn'])
177
            worksheet1.write(anotherrow, inc(), int(order['paidAmount']))
182
            worksheet1.write(anotherrow, inc(), int(order['paidAmount']))
Line 253... Line 258...
253
        affNotReconciledSheet.write(row, inc(), offer.get("subTagId")) 
258
        affNotReconciledSheet.write(row, inc(), offer.get("subTagId")) 
254
        affNotReconciledSheet.write(row, inc(), offer.get("saleDate")) 
259
        affNotReconciledSheet.write(row, inc(), offer.get("saleDate")) 
255
        affNotReconciledSheet.write(row, inc(), offer.get("saleAmount")) 
260
        affNotReconciledSheet.write(row, inc(), offer.get("saleAmount")) 
256
        affNotReconciledSheet.write(row, inc(), offer.get("payOut")) 
261
        affNotReconciledSheet.write(row, inc(), offer.get("payOut")) 
257
        affNotReconciledSheet.write(row, inc(), offer.get("conversionStatus"))
262
        affNotReconciledSheet.write(row, inc(), offer.get("conversionStatus"))
-
 
263
        affNotReconciledSheet.write(row, inc(), offer.get("ip"))
258
 
264
 
259
        workbook.save(XLS_FILENAME)
265
        workbook.save(XLS_FILENAME)
260
            
266
            
261
def sendmail(email, message, title):
267
def sendmail(email, message, title):
262
    if email == "":
268
    if email == "":
Line 294... Line 300...
294
    row = 0
300
    row = 0
295
    global i
301
    global i
296
    i=-1    
302
    i=-1    
297
    worksheet.write(row, inc(), 'Order Id', boldStyle)
303
    worksheet.write(row, inc(), 'Order Id', boldStyle)
298
    worksheet.write(row, inc(), 'User Id', boldStyle)
304
    worksheet.write(row, inc(), 'User Id', boldStyle)
-
 
305
    worksheet.write(row, inc(), 'Version Code', boldStyle)
299
    worksheet.write(row, inc(), 'Username', boldStyle)
306
    worksheet.write(row, inc(), 'Username', boldStyle)
300
    worksheet.write(row, inc(), 'Merchant Order Id', boldStyle)
307
    worksheet.write(row, inc(), 'Merchant Order Id', boldStyle)
301
    worksheet.write(row, inc(), 'SubtagId', boldStyle)
308
    worksheet.write(row, inc(), 'SubtagId', boldStyle)
302
    worksheet.write(row, inc(), 'Sale Date', boldStyle)
309
    worksheet.write(row, inc(), 'Sale Date', boldStyle)
303
    worksheet.write(row, inc(), 'Sale Amount', boldStyle)
310
    worksheet.write(row, inc(), 'Sale Amount', boldStyle)
304
    worksheet.write(row, inc(), 'Aff Sale Date', boldStyle)
311
    worksheet.write(row, inc(), 'Aff Sale Date', boldStyle)
305
    worksheet.write(row, inc(), 'Aff Sale Amt', boldStyle)
312
    worksheet.write(row, inc(), 'Aff Sale Amt', boldStyle)
306
    worksheet.write(row, inc(), 'Aff PayOut', boldStyle)
313
    worksheet.write(row, inc(), 'Aff PayOut', boldStyle)
-
 
314
    worksheet.write(row, inc(), 'IP', boldStyle)
307
    worksheet.write(row, inc(), 'Product Title', boldStyle)
315
    worksheet.write(row, inc(), 'Product Title', boldStyle)
308
    worksheet.write(row, inc(), 'Price', boldStyle)
316
    worksheet.write(row, inc(), 'Price', boldStyle)
309
    worksheet.write(row, inc(), 'Quantity', boldStyle)
317
    worksheet.write(row, inc(), 'Quantity', boldStyle)
310
    worksheet.write(row, inc(), 'Status', boldStyle)
318
    worksheet.write(row, inc(), 'Status', boldStyle)
311
    worksheet.write(row, inc(), 'Cashback Status', boldStyle)
319
    worksheet.write(row, inc(), 'Cashback Status', boldStyle)
312
    worksheet.write(row, inc(), 'CashBack', boldStyle)
320
    worksheet.write(row, inc(), 'CashBack', boldStyle)
313
 
321
 
314
    i = -1
322
    i = -1
315
    worksheet1.write(row, inc(), 'Order Id', boldStyle)
323
    worksheet1.write(row, inc(), 'Order Id', boldStyle)
316
    worksheet1.write(row, inc(), 'User Id', boldStyle)
324
    worksheet1.write(row, inc(), 'User Id', boldStyle)
-
 
325
    worksheet1.write(row, inc(), 'Version Code', boldStyle)
317
    worksheet1.write(row, inc(), 'Username', boldStyle)
326
    worksheet1.write(row, inc(), 'Username', boldStyle)
318
    worksheet1.write(row, inc(), 'Merchant Order Id', boldStyle)
327
    worksheet1.write(row, inc(), 'Merchant Order Id', boldStyle)
319
    worksheet1.write(row, inc(), 'SubtagId', boldStyle)
328
    worksheet1.write(row, inc(), 'SubtagId', boldStyle)
320
    worksheet1.write(row, inc(), 'Sale Date', boldStyle)
329
    worksheet1.write(row, inc(), 'Sale Date', boldStyle)
321
    worksheet1.write(row, inc(), 'Sale Amount', boldStyle)
330
    worksheet1.write(row, inc(), 'Sale Amount', boldStyle)
322
    worksheet1.write(row, inc(), 'Aff Sale Date', boldStyle)
331
    worksheet1.write(row, inc(), 'Aff Sale Date', boldStyle)
323
    worksheet1.write(row, inc(), 'Aff Sale Amt', boldStyle)
332
    worksheet1.write(row, inc(), 'Aff Sale Amt', boldStyle)
324
    worksheet1.write(row, inc(), 'Aff PayOut', boldStyle)
333
    worksheet1.write(row, inc(), 'Aff PayOut', boldStyle)
-
 
334
    worksheet1.write(row, inc(), 'IP', boldStyle)
325
    worksheet1.write(row, inc(), 'Product Title', boldStyle)
335
    worksheet1.write(row, inc(), 'Product Title', boldStyle)
326
    worksheet1.write(row, inc(), 'Price', boldStyle)
336
    worksheet1.write(row, inc(), 'Price', boldStyle)
327
    worksheet1.write(row, inc(), 'Quantity', boldStyle)
337
    worksheet1.write(row, inc(), 'Quantity', boldStyle)
328
    worksheet1.write(row, inc(), 'Status', boldStyle)
338
    worksheet1.write(row, inc(), 'Status', boldStyle)
329
    worksheet1.write(row, inc(), 'Cashback Status', boldStyle)
339
    worksheet1.write(row, inc(), 'Cashback Status', boldStyle)
Line 349... Line 359...
349
    affNotReconciledSheet.write(row, inc(), 'subTagId', boldStyle) 
359
    affNotReconciledSheet.write(row, inc(), 'subTagId', boldStyle) 
350
    affNotReconciledSheet.write(row, inc(), 'Sale Date', boldStyle) 
360
    affNotReconciledSheet.write(row, inc(), 'Sale Date', boldStyle) 
351
    affNotReconciledSheet.write(row, inc(), 'Sale Amount', boldStyle) 
361
    affNotReconciledSheet.write(row, inc(), 'Sale Amount', boldStyle) 
352
    affNotReconciledSheet.write(row, inc(), 'Pay Out', boldStyle) 
362
    affNotReconciledSheet.write(row, inc(), 'Pay Out', boldStyle) 
353
    affNotReconciledSheet.write(row, inc(), 'Status', boldStyle) 
363
    affNotReconciledSheet.write(row, inc(), 'Status', boldStyle) 
-
 
364
    affNotReconciledSheet.write(row, inc(), 'IP', boldStyle)
354
 
365
 
355
def getUserAmountReconciled():
366
def getUserAmountReconciled():
356
    pass
367
    pass
357
 
368
 
358
 
369
 
Line 362... Line 373...
362
    return i
373
    return i
363
    
374
    
364
def main():
375
def main():
365
    generateSnapDealReco()
376
    generateSnapDealReco()
366
    #generateFlipkartReco()
377
    #generateFlipkartReco()
367
    sendmail(["amit.gupta@shop2020.in"], "", "DTR Affiliate Reco")
378
    #sendmail(["amit.gupta@shop2020.in"], "", "DTR Affiliate Reco")
368
 
379
 
369
if __name__ == '__main__':
380
if __name__ == '__main__':
370
    main()
381
    main()
371
    
382
    
372
383