| Line 33... |
Line 33... |
| 33 |
boldStyle = xlwt.XFStyle()
|
33 |
boldStyle = xlwt.XFStyle()
|
| 34 |
f = xlwt.Font()
|
34 |
f = xlwt.Font()
|
| 35 |
f.bold = True
|
35 |
f.bold = True
|
| 36 |
boldStyle.font = f
|
36 |
boldStyle.font = f
|
| 37 |
i = -1
|
37 |
i = -1
|
| - |
|
38 |
|
| - |
|
39 |
datetime_format = xlwt.XFStyle()
|
| - |
|
40 |
datetime_format.num_format_str = 'dd/mm/yyyy HH:MM AM/PM'
|
| - |
|
41 |
|
| 38 |
def generateFlipkartReco():
|
42 |
def generateFlipkartReco():
|
| 39 |
global i
|
43 |
global i
|
| 40 |
i = -1
|
44 |
i = -1
|
| 41 |
curs = getOrdersAfterDate(datetime.now() - timedelta(days=30), 2)
|
45 |
curs = getOrdersAfterDate(datetime.now() - timedelta(days=30), 2)
|
| 42 |
db = client.Dtr
|
46 |
db = client.Dtr
|
| Line 395... |
Line 399... |
| 395 |
worksheet1.write(row, i, 'Created On', boldStyle)
|
399 |
worksheet1.write(row, i, 'Created On', boldStyle)
|
| 396 |
worksheet.write(row, inc(), 'Store Id', boldStyle)
|
400 |
worksheet.write(row, inc(), 'Store Id', boldStyle)
|
| 397 |
worksheet1.write(row, i, 'Store Id', boldStyle)
|
401 |
worksheet1.write(row, i, 'Store Id', boldStyle)
|
| 398 |
worksheet.write(row, inc(), 'Merchant Order Id', boldStyle)
|
402 |
worksheet.write(row, inc(), 'Merchant Order Id', boldStyle)
|
| 399 |
worksheet1.write(row, i, 'Merchant Order Id', boldStyle)
|
403 |
worksheet1.write(row, i, 'Merchant Order Id', boldStyle)
|
| - |
|
404 |
worksheet.write(row, inc(), 'Product title', boldStyle)
|
| - |
|
405 |
worksheet1.write(row, i, 'Product title', boldStyle)
|
| 400 |
worksheet.write(row, inc(), 'Amount Paid', boldStyle)
|
406 |
worksheet.write(row, inc(), 'Amount Paid', boldStyle)
|
| 401 |
worksheet1.write(row, i, 'Amount Paid', boldStyle)
|
407 |
worksheet1.write(row, i, 'Amount Paid', boldStyle)
|
| 402 |
worksheet.write(row, inc(), 'Cashback', boldStyle)
|
408 |
worksheet.write(row, inc(), 'Cashback', boldStyle)
|
| 403 |
worksheet1.write(row, i, 'Cashback', boldStyle)
|
409 |
worksheet1.write(row, i, 'Cashback', boldStyle)
|
| 404 |
worksheet.write(row, inc(), 'Order Status', boldStyle)
|
410 |
worksheet.write(row, inc(), 'Order Status', boldStyle)
|
| Line 424... |
Line 430... |
| 424 |
row +=1
|
430 |
row +=1
|
| 425 |
i=-1
|
431 |
i=-1
|
| 426 |
worksheet.write(row, inc(), result[0])
|
432 |
worksheet.write(row, inc(), result[0])
|
| 427 |
worksheet.write(row, inc(), result[-3])
|
433 |
worksheet.write(row, inc(), result[-3])
|
| 428 |
worksheet.write(row, inc(), result[1])
|
434 |
worksheet.write(row, inc(), result[1])
|
| 429 |
worksheet.write(row, inc(), result[-4])
|
435 |
worksheet.write(row, inc(), result[-4], datetime_format)
|
| 430 |
worksheet.write(row, inc(), result[2])
|
436 |
worksheet.write(row, inc(), result[2])
|
| 431 |
worksheet.write(row, inc(), morder.get("merchantOrderId"))
|
437 |
worksheet.write(row, inc(), morder.get("merchantOrderId"))
|
| 432 |
#order.append(subOrder.get("merchantSubOrderId"))
|
438 |
worksheet.write(row, inc(), subOrder.get("productTitle"))
|
| 433 |
worksheet.write(row, inc(), subOrder.get("amountPaid"))
|
439 |
worksheet.write(row, inc(), subOrder.get("amountPaid"))
|
| 434 |
worksheet.write(row, inc(), subOrder.get("cashBackAmount"))
|
440 |
worksheet.write(row, inc(), subOrder.get("cashBackAmount"))
|
| 435 |
worksheet.write(row, inc(), subOrder.get("status"))
|
441 |
worksheet.write(row, inc(), subOrder.get("status"))
|
| 436 |
worksheet.write(row, inc(), subOrder.get("detailedStatus"))
|
442 |
worksheet.write(row, inc(), subOrder.get("detailedStatus"))
|
| 437 |
worksheet.write(row, inc(), subOrder.get("cashBackStatus"))
|
443 |
worksheet.write(row, inc(), subOrder.get("cashBackStatus"))
|
| Line 446... |
Line 452... |
| 446 |
row2 +=1
|
452 |
row2 +=1
|
| 447 |
i=-1
|
453 |
i=-1
|
| 448 |
worksheet1.write(row2, inc(), result[0])
|
454 |
worksheet1.write(row2, inc(), result[0])
|
| 449 |
worksheet1.write(row2, inc(), result[-3])
|
455 |
worksheet1.write(row2, inc(), result[-3])
|
| 450 |
worksheet1.write(row2, inc(), result[1])
|
456 |
worksheet1.write(row2, inc(), result[1])
|
| 451 |
worksheet1.write(row2, inc(), result[-4])
|
457 |
worksheet1.write(row2, inc(), result[-4], datetime_format)
|
| 452 |
worksheet1.write(row2, inc(), result[2])
|
458 |
worksheet1.write(row2, inc(), result[2])
|
| 453 |
worksheet1.write(row2, inc(), morder.get("merchantOrderId"))
|
459 |
worksheet1.write(row2, inc(), morder.get("merchantOrderId"))
|
| - |
|
460 |
worksheet1.write(row2, inc(), subOrder.get("productTitle"))
|
| 454 |
worksheet1.write(row2, inc(), subOrder.get("amountPaid"))
|
461 |
worksheet1.write(row2, inc(), subOrder.get("amountPaid"))
|
| 455 |
worksheet1.write(row2, inc(), subOrder.get("cashBackAmount"))
|
462 |
worksheet1.write(row2, inc(), subOrder.get("cashBackAmount"))
|
| 456 |
worksheet1.write(row2, inc(), subOrder.get("status"))
|
463 |
worksheet1.write(row2, inc(), subOrder.get("status"))
|
| 457 |
worksheet1.write(row2, inc(), subOrder.get("detailedStatus"))
|
464 |
worksheet1.write(row2, inc(), subOrder.get("detailedStatus"))
|
| 458 |
worksheet1.write(row2, inc(), subOrder.get("cashBackStatus"))
|
465 |
worksheet1.write(row2, inc(), subOrder.get("cashBackStatus"))
|