Subversion Repositories SmartDukaan

Rev

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

Rev 9911 Rev 9912
Line 115... Line 115...
115
                continue
115
                continue
116
            totalReserved = totalReserved+reserve
116
            totalReserved = totalReserved+reserve
117
        if (totalAvailability-totalReserved)<=0:
117
        if (totalAvailability-totalReserved)<=0:
118
            markReasonForMpItem(mpHistory,'Our stock is not enough',Decision.AUTO_DECREMENT_FAILED)
118
            markReasonForMpItem(mpHistory,'Our stock is not enough',Decision.AUTO_DECREMENT_FAILED)
119
            continue
119
            continue
-
 
120
        if (avgSalePerDay==0):
-
 
121
            markReasonForMpItem(mpHistory,'Average sale per day is zero',Decision.AUTO_DECREMENT_FAILED)
-
 
122
            continue
120
        daysOfStock = (float(totalAvailability-totalReserved))/avgSalePerDay
123
        daysOfStock = (float(totalAvailability-totalReserved))/avgSalePerDay
121
        if daysOfStock<2:
124
        if daysOfStock<2:
122
            markReasonForMpItem(mpHistory,'Our stock is not enough',Decision.AUTO_DECREMENT_FAILED)
125
            markReasonForMpItem(mpHistory,'Our stock is not enough',Decision.AUTO_DECREMENT_FAILED)
123
            continue
126
            continue
124
 
127
 
Line 162... Line 165...
162
                continue
165
                continue
163
            totalReserved = totalReserved+reserve
166
            totalReserved = totalReserved+reserve
164
        if (totalAvailability-totalReserved)<=0:
167
        if (totalAvailability-totalReserved)<=0:
165
            markReasonForMpItem(mpHistory,'Our stock is 0',Decision.AUTO_INCREMENT_FAILED)
168
            markReasonForMpItem(mpHistory,'Our stock is 0',Decision.AUTO_INCREMENT_FAILED)
166
            continue
169
            continue
-
 
170
        if (avgSalePerDay==0):
-
 
171
            markReasonForMpItem(mpHistory,'Average sale per day is zero',Decision.AUTO_DECREMENT_FAILED)
-
 
172
            continue
167
        daysOfStock = (float(totalAvailability-totalReserved))/avgSalePerDay
173
        daysOfStock = (float(totalAvailability-totalReserved))/avgSalePerDay
168
        if daysOfStock>5:
174
        if daysOfStock>5:
169
            markReasonForMpItem(mpHistory,'Our stock is enough',Decision.AUTO_INCREMENT_FAILED)
175
            markReasonForMpItem(mpHistory,'Our stock is enough',Decision.AUTO_INCREMENT_FAILED)
170
            continue
176
            continue
171
 
177