Subversion Repositories SmartDukaan

Rev

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

Rev 7404 Rev 7419
Line 1505... Line 1505...
1505
    return brandInfoMap
1505
    return brandInfoMap
1506
 
1506
 
1507
def update_store_pricing(tsp, allColors):
1507
def update_store_pricing(tsp, allColors):
1508
    validate_store_pricing(tsp)
1508
    validate_store_pricing(tsp)
1509
    item = get_item(tsp.itemId)
1509
    item = get_item(tsp.itemId)
-
 
1510
    activeOnStore = item.activeOnStore
1510
    if allColors:
1511
    if allColors:
1511
        items = get_items_by_catalog_id(item.catalog_item_id)
1512
        items = get_items_by_catalog_id(item.catalog_item_id)
1512
    else:
1513
    else:
1513
        items = [item]
1514
        items = [item]
1514
    for item in items:
1515
    for item in items:
1515
        sp = StorePricing.get_by(item_id = item.id)
1516
        sp = StorePricing.get_by(item_id = item.id)
1516
        if not sp:
1517
        if not sp:
1517
            sp = StorePricing()
1518
            sp = StorePricing()
-
 
1519
        item.activeOnStore = activeOnStore
1518
        sp.recommendedPrice = tsp.recommendedPrice
1520
        sp.recommendedPrice = tsp.recommendedPrice
1519
        sp.minPrice = tsp.minPrice
1521
        sp.minPrice = tsp.minPrice
1520
        sp.minAdvancePrice = tsp.minAdvancePrice
1522
        sp.minAdvancePrice = tsp.minAdvancePrice
1521
        sp.maxPrice = tsp.maxPrice
1523
        sp.maxPrice = tsp.maxPrice
1522
        sp.item_id = item.id
1524
        sp.item_id = item.id