-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Add documentation for stock items and stock movements #2539
Conversation
There was a problem hiding this 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!
guides/inventory/stock-items.md
Outdated
|
||
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. |
There was a problem hiding this comment.
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 correspondingSpree::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.
guides/inventory/stock-items.md
Outdated
|
||
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`, |
There was a problem hiding this comment.
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?
guides/inventory/stock-items.md
Outdated
|
||
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. |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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!
b32812f
to
939a23a
Compare
@kennyadsl Thanks for the review. I've addressed all your comments. 👍 |
939a23a
to
9bc3811
Compare
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.
This pull request adds articles about
Spree::StockItem
s andSpree::StockMovement
s. (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.