Subversion Repositories SmartDukaan

Rev

Rev 13109 | Rev 13480 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 13109 Rev 13130
Line 91... Line 91...
91
    else:
91
    else:
92
        lastOutOfStock = to_amazonFbaSaleSnapshot(None)
92
        lastOutOfStock = to_amazonFbaSaleSnapshot(None)
93
    if lastOutOfStock.dateOfSale == 0:
93
    if lastOutOfStock.dateOfSale == 0:
94
        return lastOutOfStock, 0, 0
94
        return lastOutOfStock, 0, 0
95
    else:
95
    else:
96
        return lastOutOfStock, getInStockAmazonFbaSalesLatestSnapshotForItemLocationWise(item_id,fcLocation,lastOutOfStock.dateOfSale)
96
        totalSale, noOfDays =getInStockAmazonFbaSalesLatestSnapshotForItemLocationWise(item_id,fcLocation,lastOutOfStock.dateOfSale)
-
 
97
        return lastOutOfStock, totalSale, noOfDays 
97
    
98
    
98
def getLatestHourlySnapshot():
99
def getLatestHourlySnapshot():
99
    fbaHourlySnapshot = []
100
    fbaHourlySnapshot = []
100
    collection = get_mongo_connection().AmazonSaleSnapshot.AmazonHourlySaleSnapshot
101
    collection = get_mongo_connection().AmazonSaleSnapshot.AmazonHourlySaleSnapshot
101
    r = collection.find().sort([('snapshotTime',pymongo.DESCENDING)]).limit(1)
102
    r = collection.find().sort([('snapshotTime',pymongo.DESCENDING)]).limit(1)