Stock update audit log for tracability

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
4 years ago
My requirement is quite simple, but I feel it'll be a useful feature for stock visibility and reporting. In brief what I would like to do is write a log entry whenever a stock is updated for a product. The end result is if I get a report it should be something like below (a simple format).

Date       | SKU/Product | StockIn | StockOut
10/04/2019 | ABCDEF      |    10   |
10/04/2019 | ABC123      |    10   |
11/04/2019 | ABCDEF      |         |     2
12/04/2019 | ABC123      |         |     5
13/04/2019 | ABC123      |     5   |    

Basically this tracks what products came in and went out(we assume those are sold) each day. I couldn't find a plugin for this and I don't think we can get such report from current system.

Any idea where I should start if I am to write a plugin?
4 years ago
The inventory tracking system is out of box. But you can create your own plugin. Whenever the quantity of the product updated(whatever by a user or any other POS system or any API) you can keep it to a separate database table with ProductId, CreatedDate, StockInQty, StockOutQty. In nopcommerce when order placed the quantity of the ordered product reduced. When order canceled the ordered product quantity added to the current stock quantity of the ordered product. When the admin user adds a new product the quantity again reduced proportionately to the entered quantity. When updating the quantity of the ordered product the current quantity of the ordered product also gets impacted. it can be reduced or increased depending on the entered quantity. You should also need to consider the quantity of the attribute.

Hope this will help.
3 years ago
sina.islam wrote:
The inventory tracking system is out of box. But you can create your own plugin. Whenever the quantity of the product updated(whatever by a user or any other POS system or any API) you can keep it to a separate database table with ProductId, CreatedDate, StockInQty, StockOutQty. In nopcommerce when order placed the quantity of the ordered product reduced. When order canceled the ordered product quantity added to the current stock quantity of the ordered product. When the admin user adds a new product the quantity again reduced proportionately to the entered quantity. When updating the quantity of the ordered product the current quantity of the ordered product also gets impacted. it can be reduced or increased depending on the entered quantity. You should also need to consider the quantity of the attribute.

Hope this will help.


Thanks for the input. Plugin seems to be the way to go with it's own separate table like a log history. I am wondering whether this information is not useful for many others. Because I couldn't find any commercial plugin either. Thanks anyway.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.