### Author Topic: Prices not calculating correctly  (Read 195 times)

#### Otakumart

• Beginner
• Posts: 23
• A beginner
##### Prices not calculating correctly
« on: September 07, 2018, 17:18:46 pm »
VirtueMart 3.2.14

I need all my prices to be end in .99 for example \$50.99. To achieve this I set the final price and tick the calculate cost price box before saving. I have a +% calculation of 30% rule which is my markup. Tax is built into this.

Something caught my attention when importing some products with CSVI; The cost price is not being calculated correctly. If I set a final price of \$100.00, tick the calculate cost price box and save, I end up with a cost price of \$76.92308. This is the same whether rules are applied or not and it is the same with all the different tax rules asides from tax per bill etc, if using those cost price is \$100.00 as well as base price and cost price.

Is there anything I'm missing or anyway to achieve this more efficiently?

#### Otakumart

• Beginner
• Posts: 23
• A beginner
##### Re: Prices not calculating correctly
« Reply #1 on: September 07, 2018, 17:22:13 pm »
For clarification, the \$100.00 example above is just to illustrate that the calculation is not working as expected. Cost price should be \$70.00 for this example with the 30% markup rule.

#### Jörgen

• Global Moderator
• Full Member
• Posts: 1922
• VirtueMart Version: 3.2.12
##### Re: Prices not calculating correctly
« Reply #2 on: September 07, 2018, 20:58:55 pm »
This is totally correkt calculated, no doubt about that.

\$70 with 30 precent markup is \$91.

Calculating "backwards" makes \$100 less 30 percent markup of the original cost price, gives cost price => \$100 / 1,3 = \$76,92

best regards

Jörgen @ Kreativ Fotografi
Joomla 3.8.3
Virtuemart 3.2.12
Olympiantheme Hera (customized)