| Line 452... |
Line 452... |
| 452 |
sh1.write(row3, inc(), morder.get("merchantOrderId"))
|
452 |
sh1.write(row3, inc(), morder.get("merchantOrderId"))
|
| 453 |
sh1.write(row3, inc(), subOrder.get("productTitle"))
|
453 |
sh1.write(row3, inc(), subOrder.get("productTitle"))
|
| 454 |
inc()
|
454 |
inc()
|
| 455 |
if int(subOrder.get("quantity")) > 0:
|
455 |
if int(subOrder.get("quantity")) > 0:
|
| 456 |
sh1.write(row3, i, int(subOrder.get("amountPaid"))/int(subOrder.get("quantity")))
|
456 |
sh1.write(row3, i, int(subOrder.get("amountPaid"))/int(subOrder.get("quantity")))
|
| - |
|
457 |
if morder.get("storeId") in (1,2,4,5):
|
| 457 |
res = db1.MasterData.find_one({"source_id":morder.get("storeId"), "identifier":subOrder.get("productCode")})
|
458 |
skuData = db1.MasterData.find_one({'identifier':subOrder.get("productCode").strip(), 'source_id':morder.get("storeId")})
|
| - |
|
459 |
elif morder.get("storeId") == 3:
|
| - |
|
460 |
skuData = db1.MasterData.find_one({'secondaryIdentifier':subOrder.get("productCode").strip(), 'source_id':morder.get("storeId")})
|
| 458 |
if res is not None:
|
461 |
if skuData is not None:
|
| 459 |
sh1.write(row3, inc(), res.get("brand"))
|
462 |
sh1.write(row3, inc(), skuData.get("brand"))
|
| 460 |
sh1.write(row3, inc(), res.get("model_name"))
|
463 |
sh1.write(row3, inc(), skuData.get("model_name"))
|
| 461 |
sh1.write(row3, inc(), subOrder.get("category"))
|
464 |
sh1.write(row3, inc(), skuData.get("category"))
|
| 462 |
if subOrder.get("cashBackStatus") == Store.CB_APPROVED or subOrder.get("cashBackStatus") == Store.CB_PENDING:
|
465 |
if subOrder.get("cashBackStatus") == Store.CB_APPROVED or subOrder.get("cashBackStatus") == Store.CB_PENDING:
|
| 463 |
row +=1
|
466 |
row +=1
|
| 464 |
i=-1
|
467 |
i=-1
|
| 465 |
worksheet.write(row, inc(), result[0])
|
468 |
worksheet.write(row, inc(), result[0])
|
| 466 |
worksheet.write(row, inc(), result[-3])
|
469 |
worksheet.write(row, inc(), result[-3])
|