| Line 2360... |
Line 2360... |
| 2360 |
mpHistoryItems = session.query(MarketPlaceHistory,Item).join((Item,MarketPlaceHistory.item_id==Item.id)).filter(MarketPlaceHistory.timestamp==timestamp).filter(MarketPlaceHistory.source==OrderSource.FLIPKART).all()
|
2360 |
mpHistoryItems = session.query(MarketPlaceHistory,Item).join((Item,MarketPlaceHistory.item_id==Item.id)).filter(MarketPlaceHistory.timestamp==timestamp).filter(MarketPlaceHistory.source==OrderSource.FLIPKART).all()
|
| 2361 |
for val in mpHistoryItems:
|
2361 |
for val in mpHistoryItems:
|
| 2362 |
temp = []
|
2362 |
temp = []
|
| 2363 |
temp.append(val[0].ourSellingPrice)
|
2363 |
temp.append(val[0].ourSellingPrice)
|
| 2364 |
temp.append(xstr(val[1].brand)+" "+xstr(val[1].model_name)+" "+xstr(val[1].model_number)+" "+xstr(val[1].color))
|
2364 |
temp.append(xstr(val[1].brand)+" "+xstr(val[1].model_name)+" "+xstr(val[1].model_number)+" "+xstr(val[1].color))
|
| 2365 |
temp.append(val.ourInventory)
|
2365 |
temp.append(val[0].ourInventory)
|
| 2366 |
flipkartPricing[val[0].item_id] = temp
|
2366 |
flipkartPricing[val[0].item_id] = temp
|
| 2367 |
mpHistoryItems[:] = []
|
2367 |
mpHistoryItems[:] = []
|
| 2368 |
mpItems = session.query(MarketplaceItems).filter(MarketplaceItems.source==OrderSource.FLIPKART).all()
|
2368 |
mpItems = session.query(MarketplaceItems).filter(MarketplaceItems.source==OrderSource.FLIPKART).all()
|
| 2369 |
for val in mpItems:
|
2369 |
for val in mpItems:
|
| 2370 |
saholicPricing[val.itemId] = val.currentSp
|
2370 |
saholicPricing[val.itemId] = val.currentSp
|
| Line 2374... |
Line 2374... |
| 2374 |
flipkartSellingPrice = v[0]
|
2374 |
flipkartSellingPrice = v[0]
|
| 2375 |
ourSellingPrice = saholicPricing.get(k)
|
2375 |
ourSellingPrice = saholicPricing.get(k)
|
| 2376 |
if ourSellingPrice!=flipkartSellingPrice:
|
2376 |
if ourSellingPrice!=flipkartSellingPrice:
|
| 2377 |
mismatches.append(k)
|
2377 |
mismatches.append(k)
|
| 2378 |
print "mismatches are ",mismatches
|
2378 |
print "mismatches are ",mismatches
|
| - |
|
2379 |
if len(mismatches)==0:
|
| - |
|
2380 |
return
|
| 2379 |
for item in mismatches:
|
2381 |
for item in mismatches:
|
| 2380 |
netInventory=''
|
2382 |
netInventory=''
|
| 2381 |
if not inventoryMap.has_key(item):
|
2383 |
if not inventoryMap.has_key(item):
|
| 2382 |
netInventory='Info Not Available'
|
2384 |
netInventory='Info Not Available'
|
| 2383 |
else:
|
2385 |
else:
|