VirtueMart Forum

VirtueMart 2 + 3 => Virtuemart Development and bug reports => Topic started by: Venkko on December 28, 2011, 10:39:21 am

Title: Booked, ordered products field get value 4294967295
Post by: Venkko on December 28, 2011, 10:39:21 am
Hi!

Is this a bug or does this 4294967295 mean something?

I am using J 1.5.23 and VM2.0.0 stable.

If I have order where is 1 pcs product xxx123 and on product xxx123 there is stock level quantity 6 and “booked, ordered product” field with value 0.
After changing order status to shipped I get stock quantity 5 (which is correct , 6-1=5) but “booked, ordered product” have value 4294967295.

I know that this situation should not come up in normal situation but on some cases this could be possible and in my case it is problem if I want to get my stock controller to work as I would like to.



[attachment cleanup by admin]
Title: Re: Booked, ordered products field get value 4294967295
Post by: Milbo on December 28, 2011, 22:28:25 pm
haha interesting, thanks :-)

Is almost fixed, nice bug. Afaik we use unsigned int, so when you do 0-1 you get the highest number.
Title: Re: Booked, ordered products field get value 4294967295
Post by: Venkko on December 28, 2011, 23:17:31 pm
So will this be fixed when VM 2.0.1 will be released?
Title: Re: Booked, ordered products field get value 4294967295
Post by: Milbo on December 29, 2011, 16:33:40 pm
oh I just removed the unsigned from the table.... the updater will adjust this. Just change the product_in_stock and product_ordered in __virtuemart_products, remove the unsigned and it should just count -1, which is correct.

When you start from 0, when you see later -5 in your stock, you knwo that you have to order 5.