Subversion Repositories SmartDukaan

Rev

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

Rev 13206 Rev 13355
Line 159... Line 159...
159
            if daysOfStock < 5:
159
            if daysOfStock < 5:
160
                markReasonForItem(autoDecrementItem,'Days of stock less than 5',Decision.AUTO_DECREMENT_FAILED)
160
                markReasonForItem(autoDecrementItem,'Days of stock less than 5',Decision.AUTO_DECREMENT_FAILED)
161
                continue
161
                continue
162
        
162
        
163
        if autoDecrementItem.competitiveCategory == CompetitionCategory.COMPETITIVE and not autoDecrementItem.isPromotion:
163
        if autoDecrementItem.competitiveCategory == CompetitionCategory.COMPETITIVE and not autoDecrementItem.isPromotion:
164
            if autoDecrementItem.parentCategoryId in [10006,10009,11001]:
164
            if autoDecrementItem.parentCategoryId in [10001,10009,11001]:
165
                if daysOfStock < 1 :
165
                if daysOfStock < 1 :
166
                    markReasonForItem(autoDecrementItem,'Days of stock less than 1',Decision.AUTO_DECREMENT_FAILED)
166
                    markReasonForItem(autoDecrementItem,'Days of stock less than 1',Decision.AUTO_DECREMENT_FAILED)
167
                    continue
167
                    continue
168
                
168
                
169
            else:
169
            else:
170
                if daysOfStock < 3:
170
                if daysOfStock < 3:
171
                    markReasonForItem(autoDecrementItem,'Days of stock less than 3',Decision.AUTO_DECREMENT_FAILED)
171
                    markReasonForItem(autoDecrementItem,'Days of stock less than 3',Decision.AUTO_DECREMENT_FAILED)
172
                    continue
172
                    continue
173
        
173
        
174
        if autoDecrementItem.competitiveCategory == CompetitionCategory.COMPETITIVE and autoDecrementItem.isPromotion:
174
        if autoDecrementItem.competitiveCategory == CompetitionCategory.COMPETITIVE and autoDecrementItem.isPromotion:
175
            if autoDecrementItem.parentCategoryId in [10006,10009,11001]:
175
            if autoDecrementItem.parentCategoryId in [10001,10009,11001]:
176
                if (amazonLongTermActivePromotions.get(sku).expiryDate - datetime.now()).days >2 and daysOfStock < 1 :
176
                if (amazonLongTermActivePromotions.get(sku).expiryDate - datetime.now()).days >2 and daysOfStock < 1 :
177
                    markReasonForItem(autoDecrementItem,'Promo Item, expiry after 2 days or not enough stock',Decision.AUTO_DECREMENT_FAILED)
177
                    markReasonForItem(autoDecrementItem,'Promo Item, expiry after 2 days or not enough stock',Decision.AUTO_DECREMENT_FAILED)
178
                    continue
178
                    continue
179
                
179
                
180
            else:
180
            else:
Line 786... Line 786...
786
            temp.append(amPricing)
786
            temp.append(amPricing)
787
            cheapest.append(temp)
787
            cheapest.append(temp)
788
            print "val sku cat cheapest ",val.sku
788
            print "val sku cat cheapest ",val.sku
789
            continue
789
            continue
790
        
790
        
791
        if val.parent_category in [10006,10009,11001]:
791
        if val.parent_category in [10001,10009,11001]:
792
            if (amDetails.competitivePrice > amPricing.lowestPossibleSp) and ((((float(float(amDetails.promoPrice) - amDetails.competitivePrice))/float(amDetails.promoPrice))<=.0025) or ((float(amDetails.promoPrice) - amDetails.competitivePrice)<=25)):
792
            if (amDetails.competitivePrice > amPricing.lowestPossibleSp) and ((((float(float(amDetails.promoPrice) - amDetails.competitivePrice))/float(amDetails.promoPrice))<=.0025) or ((float(amDetails.promoPrice) - amDetails.competitivePrice)<=25)):
793
                temp = []
793
                temp = []
794
                temp.append(val)
794
                temp.append(val)
795
                temp.append(amDetails)
795
                temp.append(amDetails)
796
                temp.append(amPricing)
796
                temp.append(amPricing)