[FIx]:when using a price included VAT in invoice, the result of Total without TAX...
authorksa (OpenERP) <ksa@tinyerp.com>
Mon, 5 Mar 2012 12:30:29 +0000 (18:00 +0530)
committerksa (OpenERP) <ksa@tinyerp.com>
Mon, 5 Mar 2012 12:30:29 +0000 (18:00 +0530)
lp bug: https://launchpad.net/bugs/946125 fixed

bzr revid: ksa@tinyerp.com-20120305123029-y8s1qywd3q6uusgn

addons/account/report/account_invoice_report.py

index 4da8401..1c559f1 100644 (file)
@@ -113,9 +113,9 @@ class account_invoice_report(osv.osv):
                          ail.quantity / u.factor
                         end) as product_qty,
                     sum(case when ai.type in ('out_refund','in_invoice') then
-                         ail.quantity*ail.price_unit * -1
+                         ail.quantity*ail.price_subtotal * -1
                         else
-                         ail.quantity*ail.price_unit
+                         ail.quantity*ail.price_subtotal
                         end) / cr.rate as price_total,
                     sum(case when ai.type in ('out_refund','in_invoice') then
                          ai.amount_total * -1