VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: hazael on March 27, 2021, 18:04:00 PM

Title: Bug in conversion from final price to cost price
Post by: hazael 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

Title: Re: Bug in conversion from final price to cost price
Post by: Jörgen 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
Title: Re: Bug in conversion from final price to cost price
Post by: hazael 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



Title: Re: Bug in conversion from final price to cost price
Post by: jenkinhill 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?
Title: Re: Bug in conversion from final price to cost price
Post by: hazael 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
Title: Re: Bug in conversion from final price to cost price
Post by: Jörgen on March 28, 2021, 13:40:44 PM
Please show Your settings.

Jörgen
Title: Re: Bug in conversion from final price to cost price
Post by: hazael on March 28, 2021, 13:48:03 PM
Here are my pricing calculations
Title: Re: Bug in conversion from final price to cost price
Post by: hazael 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
Title: Re: Bug in conversion from final price to cost price
Post by: hazael 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...