Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add documentation for stock items and stock movements #2539

Conversation

benjaminwil
Copy link
Contributor

This pull request adds articles about Spree::StockItems and Spree::StockMovements. (Stock locations documentation is summarized in #2538.)

This is part a larger project to improve Solidus's documentation. See this gist with the high-level table of contents. Where and how this documentation will exist is still up for discussion.

Copy link
Member

@kennyadsl kennyadsl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left some comments, thanks a lot!


On-hand inventory is tracked using the `Spree::StockItem` model. Each
`Spree::Variant` in a store has a corresponding `Spree::StockItem` object with a
`count_on_hand` value that represents the number of items you have in stock.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Each Spree::Variant in a store has a corresponding Spree::StockItem object

it has a corresponding Spree::StockItem object for each stock location present in the store. So the same variant can have more than one Spree::StockItem associated objects.


Whenever an administrator updates the count on hand, they are discarding the old
value completely. So, if a stock item is
[backorderable](#backorderable-stock-items) and its `count_on_hand` is `-5`,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for the sake of the example, is it relevant to say that the item should be backorderable? Maybe it's more clear if we remove this concept from here and use a positive number for the initial count_on_hand. WDYT?


If a `Spree::StockItem` is `backorderable`, then customers can continue to order
it after the product is sold out. When a sold out product continues to sell, the
`count_on_hand` would become a negative integer.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe here we should say that orders that contains backorderable stock item/inventory units (not sure which concept it's better to mention here in order to not increase complexity) can not be shipped until that stock item has been restocked in the stock location. Not sure if we have other guide for this topic, maybe we can just link there?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There aren't any other guides on this topic yet, so I'm going to add a bit more information here. Thanks for pointing this out!

@benjaminwil benjaminwil force-pushed the stock_management_inventory_documentation branch from b32812f to 939a23a Compare February 14, 2018 21:36
@benjaminwil
Copy link
Contributor Author

@kennyadsl Thanks for the review. I've addressed all your comments. 👍

@benjaminwil benjaminwil force-pushed the stock_management_inventory_documentation branch from 939a23a to 9bc3811 Compare February 14, 2018 22:56
This commit adds two articles: "Stock items" and "Stock movements".
Stock locations documentation will be merged as part of another pull
request (in the inventory overview article).
This clarifies some information about `Spree::StockItem`s after a
review by kennyadsl. Specifically, it confirms how many `StockItem`s
should exist if there are multiple `StockLocation`s, and it details how
backorderable stock items are handled.
@jhawthorn jhawthorn merged commit 5fedcf4 into solidusio:master Feb 15, 2018
@benjaminwil benjaminwil deleted the stock_management_inventory_documentation branch April 30, 2018 18:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants