| Line 119... |
Line 119... |
| 119 |
#saleTime = int(time.mktime(datetime.strptime(order['placedOn'], "%b %d, %Y, %I:%M %p").timetuple()))
|
119 |
#saleTime = int(time.mktime(datetime.strptime(order['placedOn'], "%b %d, %Y, %I:%M %p").timetuple()))
|
| 120 |
aff = list(db.snapdealOrderAffiliateInfo.find({"subTagId":order["subTagId"]}))
|
120 |
aff = list(db.snapdealOrderAffiliateInfo.find({"subTagId":order["subTagId"]}))
|
| 121 |
anotherrow += 1
|
121 |
anotherrow += 1
|
| 122 |
if len(aff) > 0 and order["subTagId"] not in matchedList and int(order["paidAmount"])==int(aff[0]["saleAmount"]):
|
122 |
if len(aff) > 0 and order["subTagId"] not in matchedList and int(order["paidAmount"])==int(aff[0]["saleAmount"]):
|
| 123 |
matchedList.append(order["subTagId"])
|
123 |
matchedList.append(order["subTagId"])
|
| 124 |
aff[0]['reconciled'] = True
|
- |
|
| 125 |
db.snapdealOrderAffiliateInfo.update({"adId":aff[0].get("adId")}, {"$set":{"reconcile":True}}, multi=True)
|
124 |
db.snapdealOrderAffiliateInfo.update({"adId":aff[0].get("adId")}, {"$set":{"reconciled":True}}, multi=True)
|
| 126 |
order['reconciled'] = True
|
125 |
order['reconciled'] = True
|
| 127 |
db.merchantOrder.save(order)
|
126 |
db.merchantOrder.save(order)
|
| 128 |
row += 1
|
127 |
row += 1
|
| 129 |
i=-1
|
128 |
i=-1
|
| 130 |
worksheet.write(row, inc(), orderId)
|
129 |
worksheet.write(row, inc(), orderId)
|