Subversion Repositories SmartDukaan

Rev

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

Rev 12343 Rev 12349
Line 234... Line 234...
234
        mpItem = MarketplaceItems.get_by(itemId=autoIncrementItem.item_id,source=OrderSource.SNAPDEAL)
234
        mpItem = MarketplaceItems.get_by(itemId=autoIncrementItem.item_id,source=OrderSource.SNAPDEAL)
235
        if mpItem.maximumSellingPrice is not None and mpItem.maximumSellingPrice > 0:
235
        if mpItem.maximumSellingPrice is not None and mpItem.maximumSellingPrice > 0:
236
            if autoIncrementItem.ourSellingPrice+max(10,.01*autoIncrementItem.ourSellingPrice) > mpItem.maximumSellingPrice:
236
            if autoIncrementItem.ourSellingPrice+max(10,.01*autoIncrementItem.ourSellingPrice) > mpItem.maximumSellingPrice:
237
                markReasonForMpItem(autoIncrementItem,'Price cannot exceed Maximum Selling Price',Decision.AUTO_INCREMENT_FAILED)
237
                markReasonForMpItem(autoIncrementItem,'Price cannot exceed Maximum Selling Price',Decision.AUTO_INCREMENT_FAILED)
238
                continue
238
                continue
239
            avgSalePerDay = (itemSaleMap.get(autoIncrementItem.item_id))[2]
239
        avgSalePerDay = (itemSaleMap.get(autoIncrementItem.item_id))[2]
240
            if (avgSalePerDay==0):
240
        if (avgSalePerDay==0):
241
                markReasonForMpItem(autoIncrementItem,'Average sale per day is zero',Decision.AUTO_INCREMENT_FAILED)
241
            markReasonForMpItem(autoIncrementItem,'Average sale per day is zero',Decision.AUTO_INCREMENT_FAILED)
242
                continue
242
            continue
243
        #oosStatus = inventory_client.getOosStatusesForXDaysForItem(autoIncrementItem.item_id,0,3)
243
        #oosStatus = inventory_client.getOosStatusesForXDaysForItem(autoIncrementItem.item_id,0,3)
244
        #count,sale,daysOfStock = 0,0,0
244
        #count,sale,daysOfStock = 0,0,0
245
        #for obj in oosStatus:
245
        #for obj in oosStatus:
246
        #    if not obj.is_oos:
246
        #    if not obj.is_oos:
247
        #        count+=1
247
        #        count+=1