yggdrasil Posted October 2, 2015 Share Posted October 2, 2015 In the docs it says the following: Stock Control - Can be used if you have a specific quantity of an item available (for example servers) or a limited special offer product - tick to enable and enter a quantity remaining and WHMCS will stop orders when it reaches zero. When a stock controlled item is cancelled (either by cancellation request or clicking "Cancel Order" on an order) the stock level will automatically increase. However if a member of staff manually changes the product to cancelled or terminated status it will not re-add stock to the product. So can someone explain how you reduce stock or change stock when you terminate an account manually? This seems like the numbers would be wrong, as I do terminate accounts manually as well. Example, a fraud order which was activated. The customer would not send a cancellation form, and someone in the staff would terminate the account manually. Also, in v5 last time I tried to use the stock option for a product it showed the quantity available in the order forms. I can see this as useful for some products but not for others. Example, in some services I would like to use the stock options, for internal reasons and so it can't be ordered anymore when the stock is depleted, but I don't want customers to see the total number available. I guess I have to edit the order forms for this? 0 Quote Link to comment Share on other sites More sharing options...
Kian Posted October 2, 2015 Share Posted October 2, 2015 Use Hooks:AfterModuleTerminate to run a query that updates the stock quantity to +1. 0 Quote Link to comment Share on other sites More sharing options...
yggdrasil Posted October 2, 2015 Author Share Posted October 2, 2015 Use Hooks:AfterModuleTerminate to run a query that updates the stock quantity to +1. This does not make any sense. Should not the automation system do this by its own because its logic to do so? Hooks, API, etc, are there to customize things or do tasks which usually the software does not do. Not to fix bugs. If you enable the stock option, it makes sense to decrease or increase the number when accounts are activated manually as well. 0 Quote Link to comment Share on other sites More sharing options...
Kian Posted October 2, 2015 Share Posted October 2, 2015 (edited) Yep, I understand your point but sadly stock control is supposed to work in this way. The quantity doesn't change when you perform actions through the admin area. At least, like I said, you can quickly and easily solve this issue with a very simple action hook. Edited October 2, 2015 by Kian 0 Quote Link to comment Share on other sites More sharing options...
sentq Posted October 2, 2015 Share Posted October 2, 2015 as the feature description says Stock Control - ...... However if a member of staff manually changes the product to cancelled or terminated status it will not re-add stock to the product. If you apply manual action you need to use Action Hooks as Kian suggestion to increase the stock level 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.