| Line 233... |
Line 233... |
| 233 |
findMap = {"orderId": tr['orderId'], "subOrders.merchantSubOrderId": orderId}
|
233 |
findMap = {"orderId": tr['orderId'], "subOrders.merchantSubOrderId": orderId}
|
| 234 |
updateMap = {}
|
234 |
updateMap = {}
|
| 235 |
updateMap["subOrders.$.detailedStatus"] = order['statusDescription']
|
235 |
updateMap["subOrders.$.detailedStatus"] = order['statusDescription']
|
| 236 |
status = self._getStatusFromDetailedStatus(ORDERSTATUS[order['status']])
|
236 |
status = self._getStatusFromDetailedStatus(ORDERSTATUS[order['status']])
|
| 237 |
closedStatus = status in [Store.ORDER_DELIVERED, Store.ORDER_CANCELLED]
|
237 |
closedStatus = status in [Store.ORDER_DELIVERED, Store.ORDER_CANCELLED]
|
| 238 |
print "status---", status, order['status']
|
- |
|
| 239 |
updateMap["subOrders.$.status"] = status
|
238 |
updateMap["subOrders.$.status"] = status
|
| 240 |
#Check if split
|
239 |
#Check if split
|
| 241 |
if quantity != currentQty:
|
240 |
if quantity != currentQty:
|
| 242 |
updateMap["subOrders.$.quantity"] = currentQty
|
241 |
updateMap["subOrders.$.quantity"] = currentQty
|
| 243 |
updateMap["subOrders.$.amount"] = int((subOrder['amount']*currentQty)/quantity)
|
242 |
updateMap["subOrders.$.amount"] = int((subOrder['amount']*currentQty)/quantity)
|