Commit 9819fb7b authored by Xiaowu Zhang's avatar Xiaowu Zhang

erp5_accounting: match real invoice

parent 7e656786
......@@ -50,7 +50,10 @@ for line, account_type_list in six.iteritems(account_type_dict):
break
def roundLine(resource, get_method, set_method, exchange_ratio):
precision = context.getQuantityPrecisionFromResource(resource)
if resource == 'currency_module/EUR':
precision = 2
else:
precision = context.getQuantityPrecisionFromResource(resource)
total_quantity = 0.0
for line in line_list:
line_quantity = round(getattr(line, get_method)() or 0, precision)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment