Add rounding in the generated reports

This commit is contained in:
Alexis Métaireau 2019-04-22 15:29:44 +02:00
parent 5e933ec775
commit 14ebdab7c8

View file

@ -52,8 +52,8 @@ def full(delivery):
ws.append(row)
footer = (
["Total", "", ""]
+ [o.total(delivery.products) for o in delivery.orders.values()]
+ [delivery.total]
+ [round(o.total(delivery.products),2) for o in delivery.orders.values()]
+ [round(delivery.total, 2)]
)
ws.append(footer)
return save_virtual_workbook(wb)