diff --git a/addons/point_of_sale/point_of_sale.py b/addons/point_of_sale/point_of_sale.py index 25a62395be8..cc51b8823ea 100644 --- a/addons/point_of_sale/point_of_sale.py +++ b/addons/point_of_sale/point_of_sale.py @@ -1169,6 +1169,9 @@ class pos_order(osv.osv): # Create an move for each order line cur = order.pricelist_id.currency_id + round_per_line = True + if order.company_id.tax_calculation_rounding_method == 'round_globally': + round_per_line = False for line in order.lines: tax_amount = 0 taxes = [] @@ -1178,14 +1181,14 @@ class pos_order(osv.osv): computed_taxes = account_tax_obj.compute_all(cr, uid, taxes, line.price_unit * (100.0-line.discount) / 100.0, line.qty)['taxes'] for tax in computed_taxes: - tax_amount += cur_obj.round(cr, uid, cur, tax['amount']) + tax_amount += cur_obj.round(cr, uid, cur, tax['amount']) if round_per_line else tax['amount'] if tax_amount < 0: group_key = (tax['ref_tax_code_id'], tax['base_code_id'], tax['account_collected_id'], tax['id']) else: group_key = (tax['tax_code_id'], tax['base_code_id'], tax['account_collected_id'], tax['id']) group_tax.setdefault(group_key, 0) - group_tax[group_key] += cur_obj.round(cr, uid, cur, tax['amount']) + group_tax[group_key] += cur_obj.round(cr, uid, cur, tax['amount']) if round_per_line else tax['amount'] amount = line.price_subtotal