Subversion Repositories SmartDukaan

Rev

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

Rev 12370 Rev 12371
Line 228... Line 228...
228
            state_id = 1
228
            state_id = 1
229
        elif fbaInventoryItem.location==1:
229
        elif fbaInventoryItem.location==1:
230
            sku = 'FBB'+fbaInventoryItem.item_id
230
            sku = 'FBB'+fbaInventoryItem.item_id
231
            state_id = 2
231
            state_id = 2
232
        else:
232
        else:
-
 
233
            print "continue*****"
233
            continue
234
            continue
234
        cc = computeCourierCost(it.weight)
235
        cc = computeCourierCost(it.weight)
235
        if amazonAsinPrice.get(sku) is None:
236
        if amazonAsinPrice.get(sku) is None:
236
            asin = None
237
            asin = None
-
 
238
            print "no asin****"
237
        amazonItemInfo = __AmazonItemInfo(amazonAsinPrice.get(sku).asin, wanlc,cc, sku, it.product_group, it.brand, it.model_name, it.model_number, it.color, it.weight, category.parent_category_id, it.risky, None, runType, parent_category.display_name,sourcePercentage,fbaInventoryItem.availability,state_id)
239
        amazonItemInfo = __AmazonItemInfo(amazonAsinPrice.get(sku).asin, wanlc,cc, sku, it.product_group, it.brand, it.model_name, it.model_number, it.color, it.weight, category.parent_category_id, it.risky, None, runType, parent_category.display_name,sourcePercentage,fbaInventoryItem.availability,state_id)
-
 
240
        print amazonItemInfo
238
        itemInfo.append(amazonItemInfo)
241
        itemInfo.append(amazonItemInfo)
239
    amPromotions = AmazonPromotion.query.filter(AmazonPromotion.startDate<=time).filter(AmazonPromotion.endDate>=time).filter(AmazonPromotion.promotionType==AmazonPromotionType.LONGTERM).filter(AmazonPromotion.promotionActive==True) \
242
    amPromotions = AmazonPromotion.query.filter(AmazonPromotion.startDate<=time).filter(AmazonPromotion.endDate>=time).filter(AmazonPromotion.promotionType==AmazonPromotionType.LONGTERM).filter(AmazonPromotion.promotionActive==True) \
240
    .group_by(AmazonPromotion.sku).order_by(desc(AmazonPromotion.addedOn)).all()
243
    .group_by(AmazonPromotion.sku).order_by(desc(AmazonPromotion.addedOn)).all()
241
    for amPromotion in amPromotions:
244
    for amPromotion in amPromotions:
242
        amazonLongTermActivePromotions.append(amPromotion.sku)
245
        amazonLongTermActivePromotions.append(amPromotion.sku)