Jump to content

Advanced stock managemant and available quantity


Recommended Posts

I installed Prestashop 1.6.0.5 with advanced stock management.

When I create a supply order and import supply order details (order status is "in process of creation") the available quantity of products is 0. It's ok.

I change supply order status to "Order validated". Available quantity of products is 0. Okey.

Then I change supply order status to "Pending receipt". Unexpectedly Available quantity of products became the same as I imported. But the products have been not received yet!

Then I Update ongoing receipt of products. Supply order status is changed to "Order received completely". And products available quantity became twice bigger then I imported.

Also I noticed when supply order is big (about some hundreds of products) and updating process fails in the center (white screen) and then continued, available quantity became even thrice bigger.

 

So what do I need to do, to make it work normal?

Link to comment
Share on other sites

This bug was not removed in 1.6.0.6.

For 
B.Köring:

To integrate this fix you need to find this file:

controllers/admin/AdminSupplyOrdersController.php

Remove this text from the lines 1426-1430:

if ($res)
StockAvailable::synchronize($supply_order_detail->id_product);
else
$this->errors[] = Tools::displayError('Something went wrong when adding products to the warehouse.');

 

 

 

Insert after the text "$supply_order->save();" at line 1439:

StockAvailable::synchronize($supply_order_detail->id_product);

 

Caution!!! You need to make this changes again after PS update to the next version (if this fix will not be included).

  • Like 1
Link to comment
Share on other sites

Thank you very much Icy.

 

So great that at least power users are willing to help. Perhaps it would be good advise to the dev team to create an advanced stock management sub forum. This would make crystal clear how problematic this core function still is. Side effect 'd be that users of other shop systems would see at hand that there is an ongoing problem with this. Moreover since it isn't really wanted obviously that we could easily connect PS to a third pary stock management system like, ehem, JTL wawi :)

 

Of importance is more over if this code fix applies to Ps 1.5.6.2, too. Since I am still in doubt whether to update to 1.6 or not.

Edited by B.Köring (see edit history)
Link to comment
Share on other sites

  • 3 weeks later...

Hi, I've tried this change but unfortunately it doesn't work. When I change the status to "Pending receipt" it keeps updating Available quantity but my stock remains to 0.

 

Is there anyone with the same problem???

Nos vemos  B)
 
 

Link to comment
Share on other sites

Sorry for the double post. It seems that the Prestashop dev team knows that strange behavior and they say that is the correct way to do.

 

So the problem about updating the Available quantity is not a problem at all...

 

Nos vemos  B)

Link to comment
Share on other sites

Sorry for the double post. It seems that the Prestashop dev team knows that strange behavior and they say that is the correct way to do.

 

So the problem about updating the Available quantity is not a problem at all...

 

Nos vemos  B)

The solution was got from prestashop git-hub bug solution. So it seams that it should be included in future releases.

Link to comment
Share on other sites

Yes, I suppose the same, but that behavior isn't the correct. If I make an order of 4 products and I only get 2, my stock in the front end will display 4 products. If I never get the other two the people can order 2 products that I will never have.

 

The only way to fix this is manually edit the stock via Stock Management in the back end. That's why I'm a little upset, it's supposed to be a great tool to manage my stock but it doesn't work properly and they don't seem to fins a solution soon because they say that it's not a priority.

 

Nos vemos  B)

Link to comment
Share on other sites

  • 3 weeks later...

I have the same problem on 1.5.6.2. When I add 2 products via supply order I get 4 products in products quantity tab. Switching from "Available quantities for current product and its combinations are based on warehouse stock." to "I want to specify available quantities manually." and back to "Available quantities for current product and its combinations are based on warehouse stock." resolve the problem but this is solution. :(

Link to comment
Share on other sites

×
×
  • Create New...