Example #1
0
 def get_price(self):
     """ calculate price """
     try:
         return float(self.price) * float(Constant.get_const('currency'))
     except TypeError:
         return float(self.price)
Example #2
0
 def get_total_price(self):
     """ return item total price """
     try:
         return float(self.price) * float(self.quantity) * float(Constant.get_const('currency'))
     except TypeError:
         return float(self.price) * float(self.quantity)