Hi,
I'm using PHP 5.3.10, Joomla 2.5.6 with VirtueMart 2.0.14 and VMInvoice 2.0.19.
Sadly I've found that saving an order, which have a DBTax order calc rule associated, results in a
product_basePriceWithTax wrong update (calculated as
product_item_price +
product_tax without calc rules consideration).
Here more details:
I have a VatTax of 21% and a calc rule that applies -10% discount to a product category. When I purchase a product of that category, I have these values in db:
+--------------------+-------------+--------------------------+---------------------+---------------------------+---------------------------+
| product_item_price | product_tax | product_basePriceWithTax | product_final_price | product_subtotal_discount | product_subtotal_with_tax |
+--------------------+-------------+--------------------------+---------------------+---------------------------+---------------------------+
| 499.17355 | 94.34000 | 604.00000 | 543.60000 | -60.40000 | 543.60000 |
+--------------------+-------------+--------------------------+---------------------+---------------------------+---------------------------+
If I click "Save", without changing any value, totals chages in this way:
+--------------------+-------------+--------------------------+---------------------+---------------------------+---------------------------+
| product_item_price | product_tax | product_basePriceWithTax | product_final_price | product_subtotal_discount | product_subtotal_with_tax |
+--------------------+-------------+--------------------------+---------------------+---------------------------+---------------------------+
| 499.17355 | 94.34000 | 593.51355 | 653.91355 | -60.40000 | 533.11355 |
+--------------------+-------------+--------------------------+---------------------+---------------------------+---------------------------+
Printing the invoice results in a 18.9% wrong product tax...
The 10% discount is regularly stored in
#__virtuemart_order_calc_rules table but seems not to be considered.
Waiting for a feedback, best regards...