Subversion Repositories SmartDukaan

Rev

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

Rev 3559 Rev 3713
Line 7... Line 7...
7
 
7
 
8
BB Playbook 16GB     1090 off
8
BB Playbook 16GB     1090 off
9
BB Playbook 64GB     1690 off
9
BB Playbook 64GB     1690 off
10
HTC P510e Flyer     500 off
10
HTC P510e Flyer     500 off
11
Motorola Xoom WiFi 3G     1700 off
11
Motorola Xoom WiFi 3G     1700 off
12
Samsung P7500 Galaxy Tab     2501 off
12
Samsung P7500 Galaxy Tab     2500 off
13
Spice Mi-720 Tab     1000 off
13
Spice Mi-720 Tab     1500 off
14
'''
14
'''
15
from shop2020.thriftpy.model.v1.user.ttypes import PromotionException, Discount
15
from shop2020.thriftpy.model.v1.user.ttypes import PromotionException, Discount
16
from shop2020.model.v1.user.impl.PromotionRuleDataUtilities import get_coupon_usage_count, get_coupon_usage_count_by_user
16
from shop2020.model.v1.user.impl.PromotionRuleDataUtilities import get_coupon_usage_count, get_coupon_usage_count_by_user
17
from shop2020.clients.CatalogClient import CatalogClient
17
from shop2020.clients.CatalogClient import CatalogClient
18
 
18
 
Line 72... Line 72...
72
            elif line.itemId == 2005:   #Samsung P7500 Galaxy Tab
72
            elif line.itemId == 2005:   #Samsung P7500 Galaxy Tab
73
                
73
                
74
                has_qualified_model = True
74
                has_qualified_model = True
75
                
75
                
76
                if line.actualPrice:
76
                if line.actualPrice:
77
                    line.discountedPrice = line.actualPrice - 2501
77
                    line.discountedPrice = line.actualPrice - 2500
78
                    discount_value = 2501
78
                    discount_value = 2500
79
            
79
            
80
            elif line.itemId == 2022:   #Spice Mi-720 Tab
80
            elif line.itemId == 2022:   #Spice Mi-720 Tab
81
                
81
                
82
                has_qualified_model = True
82
                has_qualified_model = True
83
                
83
                
84
                if line.actualPrice:
84
                if line.actualPrice:
85
                    line.discountedPrice = line.actualPrice - 1000
85
                    line.discountedPrice = line.actualPrice - 1500
86
                    discount_value = 1000
86
                    discount_value = 1500
87
            
87
            
88
            total_selling_price += line.actualPrice * line.quantity
88
            total_selling_price += line.actualPrice * line.quantity
89
            total_discounted_price += line.discountedPrice * line.quantity
89
            total_discounted_price += line.discountedPrice * line.quantity
90
        
90
        
91
            if discount_value > 0:
91
            if discount_value > 0: