コード例 #1
0
 def getVATAmount(self):
     """ Compute VATAmount
     """
     try:
         vatamount = self.getTotalPrice() - Decimal(self.getPrice())
     except:
         vatamount = Decimal('0.00')
     return vatamount.quantize(Decimal('0.00'))
コード例 #2
0
ファイル: labproduct.py プロジェクト: nafwa03/olims
 def getVATAmount(self):
     """ Compute VATAmount
     """
     try:
         vatamount = self.getTotalPrice() - Decimal(self.getPrice())
     except:
         vatamount = Decimal('0.00')
     return vatamount.quantize(Decimal('0.00'))
コード例 #3
0
 def getTotalPrice(self):
     """ compute total price """
     price = self.getPrice()
     price = Decimal(price or '0.00')
     vat = Decimal(self.getVAT())
     price = price and price or 0
     vat = vat and vat / 100 or 0
     price = price + (price * vat)
     return price.quantize(Decimal('0.00'))
コード例 #4
0
ファイル: labproduct.py プロジェクト: nafwa03/olims
 def getTotalPrice(self):
     """ compute total price """
     price = self.getPrice()
     price = Decimal(price or '0.00')
     vat = Decimal(self.getVAT())
     price = price and price or 0
     vat = vat and vat / 100 or 0
     price = price + (price * vat)
     return price.quantize(Decimal('0.00'))