[FIX] website_quote: Amount before discount with included taxes

The undiscounted amount did not take into account the taxes
included in the price. Included taxes were seen as a discount.

For a quotation with one line with an included tax of 15%,
but no discount, the undiscounted amount must be the line price subtotal,
the price subtotal already removing the taxes from the price unit.

For a quotation with one line with an included tax of 15%,
and a discount of 10%, the undiscounted amount must be the line price subtotal,
plus the amount discounted. That way, the taxes included are already removed
from the price, but the discount is not included.

opw-648388
This commit is contained in:
Denis Ledoux 2015-09-10 14:58:18 +02:00
parent a9757d99c3
commit 428588a8b7
1 changed files with 1 additions and 1 deletions

View File

@ -132,7 +132,7 @@ class sale_order(osv.osv):
for order in self.browse(cr, uid, ids, context=context):
total = 0.0
for line in order.order_line:
total += (line.product_uom_qty * line.price_unit)
total += line.price_subtotal + line.price_unit * ((line.discount or 0.0) / 100.0) * line.product_uom_qty
res[order.id] = total
return res