| Line 99... |
Line 99... |
| 99 |
if mrp != "" and mop != "" and mrp < mop:
|
99 |
if mrp != "" and mop != "" and mrp < mop:
|
| 100 |
raise Exception("[BAD MRP and MOP:] for {0} {1} {2} {3}. MRP={4}. MOP={5}".format(product_group, brand, model_number, color, mrp, mop))
|
100 |
raise Exception("[BAD MRP and MOP:] for {0} {1} {2} {3}. MRP={4}. MOP={5}".format(product_group, brand, model_number, color, mrp, mop))
|
| 101 |
|
101 |
|
| 102 |
if mop != "" and xfer_price != "" and xfer_price > mop:
|
102 |
if mop != "" and xfer_price != "" and xfer_price > mop:
|
| 103 |
raise Exception("[BAD MOP and TP:] for {0} {1} {2} {3}. TP={4}. MOP={5}".format(product_group, brand, model_number, color, xfer_price, mop))
|
103 |
raise Exception("[BAD MOP and TP:] for {0} {1} {2} {3}. TP={4}. MOP={5}".format(product_group, brand, model_number, color, xfer_price, mop))
|
| 104 |
if mrp != "":
|
104 |
# if mrp != "":
|
| 105 |
if item.mrp == None or item.mrp >= mrp:
|
105 |
# if item.mrp == None or item.mrp >= mrp:
|
| 106 |
item.mrp = mrp
|
106 |
# item.mrp = mrp
|
| 107 |
else:
|
107 |
# else:
|
| 108 |
raise Exception("[NEW MRP MORE THAN old MRP:] for {0} {1} {2} {3}. Old mrp={4}. New MRP={5}".format(product_group, brand, model_number, color, item.mrp, mrp))
|
108 |
# raise Exception("[NEW MRP MORE THAN old MRP:] for {0} {1} {2} {3}. Old mrp={4}. New MRP={5}".format(product_group, brand, model_number, color, item.mrp, mrp))
|
| 109 |
|
109 |
|
| 110 |
if mop != "":
|
110 |
if mop != "":
|
| 111 |
item.mop = mop
|
111 |
item.mop = mop
|
| 112 |
item.sellingPrice = mop
|
112 |
item.sellingPrice = mop
|
| 113 |
|
113 |
|