News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

Function for calculating cost price not working for Child products

Started by lindapowers, October 10, 2014, 15:36:31 PM

Previous topic - Next topic

lindapowers

VirtueMart 2.6.10 and Joomla! 2.5.25

The function where you click "calculate cost price" and you enter the price with tax works fine in parent products and normal products but not in child products, keeps adding the tax. Check it yourself.

Regards


MarioP


lindapowers

Ill explain with images:


This is a normal product:

I want 1.70 € as price with tax.



And perfect, result shows 1.70 € (rounded in frontpage)




Now the problem commented here:

Child Product, I try to do the same, I want 6.50 as price with tax.



But in this case the tax is added to the price as you can see:





Regards




MarioP

Hmm - first example ( tax 4%) is ok.
- price with tax - 1,7
- price without tax - 1,6346

The second one (tax 10%) - seems to be something wrong
The tax on 6,5 €  wasn't simply added, because
- price with tax - 6,5
- price without tax - 5.9090
- tax - 0,591
So: 6,5+0,591 isn't equal 7,15
Your tax rule just adds tax to the final price: 6,5 + 10% = 7,15 and then it calculates the cost price.
I don't know why...I'm not able to recreate that situation for the children

Do you use different taxes for parent and its childs? :o Or do we have a parent and a child not related with each other in the example you've presented?

lindapowers

Hi Mario

I use tax per categories, therefore 4% is assigned to a few categories and 10% to others.

The parent of the second example has 10% tax also (VatTax both our rules)

But thinking about this, the child has no category assigned and mabe that is causing a problem in the calculation for this function?


Milbo

That is right. They dont have categories. They are different loaded in the FE and have for calculation the categories of the father.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/