示例#1
0
 def shipping(self, items):
     shippings = Shippings(self.context)
     shipping = shippings.get(self.shipping_method)
     try:
         return {
             'label': shipping.label,
             'description': shipping.description,
             'net': shipping.net(items),
             'vat': shipping.vat(items),
         }
     # B/C for bda.plone.shipping < 0.4
     except NotImplementedError:
         return {
             'label': shipping.label,
             'description': shipping.description,
             'net': shipping.calculate(items),
             'vat': Decimal(0),
         }
示例#2
0
 def shipping(self, items):
     shippings = Shippings(self.context)
     shipping = shippings.get(self.shipping_method)
     try:
         return {
             'label': shipping.label,
             'description': shipping.description,
             'net': shipping.net(items),
             'vat': shipping.vat(items),
         }
     # B/C for bda.plone.shipping < 0.4
     except NotImplementedError:
         return {
             'label': shipping.label,
             'description': shipping.description,
             'net': shipping.calculate(items),
             'vat': Decimal(0),
         }
示例#3
0
 def shipping(self, items):
     shippings = Shippings(self.context)
     shipping = shippings.get(self.shipping_method)
     return shipping.calculate(items)