Author Topic: Bug in conversion from final price to cost price  (Read 1275 times)

hazael

  • Jr. Member
  • **
  • Posts: 53
    • Biżuteria etniczna i orientalna
  • VirtueMart Version: 3.8.9
Bug in conversion from final price to cost price
« on: March 27, 2021, 18:04:00 pm »
I have a problem with converting the final price to the cost price - Even if though I have all Taxes & Calculation Rules disabled.
In the absence of rules, the net and gross price should be the same - unfortunately this is not the case.
For example, when I enter the gross price of 100, the gross value will change to 43.47826 after conversion into the net price...
Calculating net to gross price works fine


Jörgen

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 3731
    • Kreativ Fotografi
  • VirtueMart Version: 3.4.x
Re: Bug in conversion from final price to cost price
« Reply #1 on: March 27, 2021, 23:03:48 pm »
You examples are very confusing what is the problem ? 

You can not make this in one step. First remove tax and rules, save. The enter final price, tick calculate cost price and save.
Does this product have a parent with tax and calculation rules ?

Jörgen @ Kreatuv Fotografi
Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.

hazael

  • Jr. Member
  • **
  • Posts: 53
    • Biżuteria etniczna i orientalna
  • VirtueMart Version: 3.8.9
Re: Bug in conversion from final price to cost price
« Reply #2 on: March 28, 2021, 13:06:24 pm »
I have an online store based on Virtuemart from version 1.0. I know all these rules perfectly well and there was never a problem with it.
This problem appeared in the last Virtuemart update. Incorrectly calculates the net price after entering the gross price.

This product It is not inherited.
In the photo in the attachment I showed an example of the price without tax and calculation rules - Absolutely no calculation rules.
I enter the final price of 100 and the cost price should also be 100. Unfortunately, after saving 43.47826 appears - in both places

UPDATE
I found a dependency for this problem and it is a bug.
The recalculation problem occurs when I enable the rules for the manufacturer "China". My product has the manufacturer "Afghanistan". These rules should not affect each other





jenkinhill

  • UK Web Developer & Consultant
  • Global Moderator
  • Super Hero
  • *
  • Posts: 28224
  • Always on vacation
    • Jenkin Hill Internet
Re: Bug in conversion from final price to cost price
« Reply #3 on: March 28, 2021, 13:13:08 pm »
I tried entering your values but go the expected results. VirtueMart 3.8.9 10473
Do you clear caches after changing tax rule? More than one currency?
Kelvyn

Jenkin Hill Internet,
Lowestoft, Suffolk, UK

Unsolicited PMs/emails will be ignored.

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

Currently using VirtueMart 3.8.9.10473 on Joomla 3.9.28 PHP 7.4.14

hazael

  • Jr. Member
  • **
  • Posts: 53
    • Biżuteria etniczna i orientalna
  • VirtueMart Version: 3.8.9
Re: Bug in conversion from final price to cost price
« Reply #4 on: March 28, 2021, 13:23:28 pm »
I found a dependency for this problem and it is a bug.
The recalculation problem occurs when I enable the rules for the manufacturer "China". My product has the manufacturer "Afghanistan". These rules should not affect each other.

After enabling this rule for a specific manufacturer - "China". The system miscalculates the price of the product, even if it excludes all rules directly in the product and the product has a different manufacturer

Jörgen

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 3731
    • Kreativ Fotografi
  • VirtueMart Version: 3.4.x
Re: Bug in conversion from final price to cost price
« Reply #5 on: March 28, 2021, 13:40:44 pm »
Please show Your settings.

Jörgen
Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.

hazael

  • Jr. Member
  • **
  • Posts: 53
    • Biżuteria etniczna i orientalna
  • VirtueMart Version: 3.8.9
Re: Bug in conversion from final price to cost price
« Reply #6 on: March 28, 2021, 13:48:03 pm »
Here are my pricing calculations

hazael

  • Jr. Member
  • **
  • Posts: 53
    • Biżuteria etniczna i orientalna
  • VirtueMart Version: 3.8.9
Re: Bug in conversion from final price to cost price
« Reply #7 on: March 28, 2021, 13:51:32 pm »
Here is my product.

I noticed that this problem occurs  when I just indicate a manufacturer in the calculations. If I additionally add a category, the problem disappears

hazael

  • Jr. Member
  • **
  • Posts: 53
    • Biżuteria etniczna i orientalna
  • VirtueMart Version: 3.8.9
Re: Bug in conversion from final price to cost price
« Reply #8 on: March 28, 2021, 14:03:09 pm »
At a price of 100 without calculation rules, I select "Calculate the Cost price" and i save this.
After saving, the price appears 43.47826. A totally illogical value...