projects
/
photoprint.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
2902c4f
)
Bugfix : reduce non homogène.
author
Benoît Pin
<benoit.pin@gmail.com>
Mon, 1 Sep 2014 15:24:45 +0000
(17:24 +0200)
committer
Benoît Pin
<benoit.pin@gmail.com>
Mon, 1 Sep 2014 15:24:45 +0000
(17:24 +0200)
order.py
patch
|
blob
|
history
diff --git
a/order.py
b/order.py
index
66d17fa
..
db19cc0
100755
(executable)
--- a/
order.py
+++ b/
order.py
@@
-337,12
+337,12
@@
class PrintOrder(PortalContent, DefaultDublinCoreImpl) :
}
if len(self.items) > 1 :
}
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)
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 :
if quantitySum == 1 :
options['L_PAYMENTREQUEST_0_DESC0'] = "Commande d'un tirage photographique"
else :