Subversion Repositories SmartDukaan

Rev

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

Rev 13136 Rev 13168
Line 1658... Line 1658...
1658
    if insurerId ==1:
1658
    if insurerId ==1:
1659
        #itemInsurerMapping = ItemInsurerMapping.query.filter(ItemInsurerMapping.itemId == itemId).filter(ItemInsurerMapping.insurerId == insurerId).first()
1659
        #itemInsurerMapping = ItemInsurerMapping.query.filter(ItemInsurerMapping.itemId == itemId).filter(ItemInsurerMapping.insurerId == insurerId).first()
1660
        #if itemInsurerMapping:
1660
        #if itemInsurerMapping:
1661
            #Default insurance premium is 1.5%
1661
            #Default insurance premium is 1.5%
1662
        #    return round(price * (1.5/100) * quantity)
1662
        #    return round(price * (1.5/100) * quantity)
1663
        return round(price * (1.5/100) * quantity)
1663
        return round(price * (1.5/100))* quantity
1664
        '''insuranceAmount = 0.0
1664
        '''insuranceAmount = 0.0
1665
        if itemInsurerMapping.premiumType == PremiumType._NAMES_TO_VALUES.get("PERCENT"):
1665
        if itemInsurerMapping.premiumType == PremiumType._NAMES_TO_VALUES.get("PERCENT"):
1666
            insuranceAmount = price * (itemInsurerMapping.premiumAmount/100) * quantity
1666
            insuranceAmount = price * (itemInsurerMapping.premiumAmount/100) * quantity
1667
        else :
1667
        else :
1668
            insuranceAmount = itemInsurerMapping.premiumAmount * quantity
1668
            insuranceAmount = itemInsurerMapping.premiumAmount * quantity