X-Git-Url: https://scm.cri.ensmp.fr/git/photoprint.git/blobdiff_plain/8db44a89ad1641ae718b6763c0af0a7f08476e03..077104edcbc86919b1ba1bf6318e88201614faa4:/order.py?ds=inline diff --git a/order.py b/order.py index 66d17fa..db19cc0 100755 --- a/order.py +++ b/order.py @@ -337,12 +337,12 @@ class PrintOrder(PortalContent, DefaultDublinCoreImpl) : } if len(self.items) > 1 : - quantitySum = reduce(lambda a, b : a['quantity'] + b['quantity'], self.items) + quantitySum = reduce(lambda a, b : a + b, [item['quantity'] for item in self.items]) else : quantitySum = self.items[0]['quantity'] total = round(self.amountWithFees.getValues()['taxed'], 2) - options['L_PAYMENTREQUEST_0_NAME0'] = 'Commande realis photo ref. %s' % self.getId() + options['L_PAYMENTREQUEST_0_NAME0'] = 'Commande photo ref. %s' % self.getId() if quantitySum == 1 : options['L_PAYMENTREQUEST_0_DESC0'] = "Commande d'un tirage photographique" else :