Menu Content

Podpora

> Diskusní fóra, FAQs & placená podpora
Welcome, Guest
Username Password: Remember me

Calc rules not considered when saving
(1 viewing) (1) Guest
Support forum for customers who have purchased this product. Archive only, no new post can be added.

NOTE: This category has been locked. If you have purchased paid version, please, use our Support Ticket system instead. If you are using free edition, please see the Community Support section.
  • Page:
  • 1

TOPIC: Calc rules not considered when saving

Calc rules not considered when saving 11 years, 9 months ago #36639

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...
The topic has been locked.

Re: Calc rules not considered when saving 11 years, 9 months ago #36672

  • miun
  • OFFLINE
  • A pesimist is just a well-informed realist.
  • Posts: 563
Please note there is already VM Invoice 2.0.22 at the moment that fixes some issues that may be related to this, so please make sure to upgrade.

Also your VirtueMart version is not up to date which also may have an effect as they are fixing some errors in it.

So at this moment, I advise you to update to the latest versions and check if the problem persists.
ARTIO Support Team
The topic has been locked.

Re: Calc rules not considered when saving 11 years, 9 months ago #36684

I've upgraded VMInvoice to the 2.0.22, but the error persists.
The topic has been locked.

Re: Calc rules not considered when saving 11 years, 9 months ago #36687

I've upgraded VirtueMart to the 2.0.18a, but the error persists.
The topic has been locked.

Re: Calc rules not considered when saving 11 years, 9 months ago #36742

  • maju
  • OFFLINE
  • Posts: 1107
Hello,

but your product_tax is wrong, isn't it?
ARTIO Support Team
The topic has been locked.

Re: Calc rules not considered when saving 11 years, 9 months ago #36773

maju wrote:
Hello,

but your product_tax is wrong, isn't it?


No, product_tax is right. I have a VatTax of 21%, so
product_final_price = 604 - 60.4 = 543.6
product_price_without_tax = 543.6 / 1.21 = 449.26
product_tax = 543.6 - 449.26 = 94.34
that's the VirtueMart behaviour, the product_tax is calcuated after the discount has been applied.

VMInvoice, instead, calculate the final price as product_item_price + product_tax, and that's wrong cause the product_tax is not product_item_price * .21 but is the product_tax with discount!!
Seems that VMInvoice doesn't follow the VirtueMart behaviour...
The topic has been locked.
  • Page:
  • 1
Přihlášení uživatele Prázdný