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

Adjustement on the behavior of the stock mvt #302

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
9 changes: 9 additions & 0 deletions content/1.7/back-office/catalog/stock/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
title: Stock
menuTitle: Stock
weight: 1
pre: ""
chapter: true
---

{{% children %}}
51 changes: 51 additions & 0 deletions content/1.7/back-office/catalog/stock/stock.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@

---
title: Stock
weight: 1
---
# SPECS Stock & Stock movement

## Product type

In PrestaShop, there is 2 types of products:
- Physical product = pack, simple and combination product
- Virtual product = virtual product

## Stock

As a merchant, I want to know the remaing stock of my product

| Stock's type | Definition | When impacted |
| --- | --- | --- |
| Stock | Number of products that are physically in my stock. | When a merchant can add or remove physical/virtual stock , when ordered products leave or return in stock, ... |
| Reserved stock | Number of products that are part of customer orders that aren’t shipped yet. | When customers order products |
| Available stock | Number of products that are available for sale. Available stock = physical stock - reserved stock | When Physical and Reserved Stock are impacted |

## Stock movement

**User story**

As a merchant, I want to associate a stock edition with a movement type to track of the reason of a given physical stock movement.

| Stock movement | When the stock movement is generated | Impact |
| --- | --- | --- |
| Product return | When a merchant restocks a product from an Order that has been flagged as _shipped_ | The restocked quantity increases the product's physical stock, and implicitly its available stock |
| Employee edition | When the merchant edits the physical stock, without any link to a customer order | The physical stock is increased or decreased |
| Customer Order | When an order has been flagged as shipped, all the physical product in the order generates a customer stock movement. When an order has been flagged as paid, all the virtual product generates a stock movement | The stock is decreased from the reserved quantity from the order |

The stock movement is not applied for virtual product.

An example of the stocks life cycle for one product:

| Action | Order | Operation | Order State | Stock | Reserved Stock | Available Stock | Stock movement |
| --- | --- | --- | --- | --- | --- | --- | --- |
| Create a new product, a TV, with 10 quantities | | Physical stock = 10 | | 10 | 0 | 10 | None |
| A customer orders 5 TV | Order 1 | Reserved Stock = 5 | Paid | 10 | 5 | 5 | None |
| Merchant add 20 more to the stock | | Physical stock = Physical stock + 20 | | 30 | 5 | 25 | Employee Edition |
| The order is sent to the customer | Order 1 | Physical stock = Physical stock - Reserved <br> Reserved = Reserved - 5 | Paid & Shipped | 25 | 0 | 25 | Customer Order |
| The customer returns 1 TV | Order 1 | Physical stock = Physical stock + 1 | Paid | 26 | 0 | 26 | Product Return |
| A customer orders 10 TV | Order 2 | Reserved Stock = 10 | Paid | 26 | 10 | 16 | None |
| Customer cancels the order | Order 2 | Reserved Stock = 0 | Paid | 26 | 0 | 26 | None |
| A customer orders 5 TV | Order 3 | Reserved Stock = 5 | Paid | 26 | 5 | 21 | None |
| The order is sent to the customer | Order 3 | Physical stock = Physical stock - Reserved <br> Reserved = Reserved - 5 | Paid & Shipped | 21 | 0 | 21 | None |
| The customer cancels the order | Order 3 | | Paid & Shipped | 21 | 0 | 21 | None |
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ The statuses page has 2 lists for both the order statuses and the order return s

![page status global](https://user-images.githubusercontent.com/13449658/110355341-67ecde80-8039-11eb-9341-ae46c233bd52.png)

## Order statuses
## 1. Order statuses

![page status](https://user-images.githubusercontent.com/13449658/110355438-84891680-8039-11eb-9047-3d498d272771.png)

Expand Down Expand Up @@ -51,7 +51,7 @@ After clicking on "Delete" button, the selected order statuses are deleted, a su

The **order statuses** list displays all the order statuses.

#### Multistore behavior
### Multistore behavior

The whole listing page can be displayed only in all shops context, the others contexts are not displayed in the header.

Expand Down Expand Up @@ -170,11 +170,35 @@ When **enabled**, a **drop-down menu appears on the bottom of the option** to le

**A preview button** is available to preview the email that is going to be sent.

* **Attach invoice PDF to an email**. Send an email to the customer with the invoice in PDF format attached.
* **Attach a delivery slip PDF to an email**. Send an email to the customer with the delivery slip in PDF format attached.
* **Set the order as shipped.** Be careful: once an order is set as "shipped", it cannot be set back to the previous status.
* **Set the order as paid.** Same here: once an order is set as "paid", it cannot be set back to the previous status.
* **Set the order as in transit.** Displays the delivery PDF.
### Order status properties

* **Attach invoice PDF to an email** - Checkbox

WHEN checked
THEN it sends an email to the customer with the invoice in PDF format attached.

* **Attach a delivery slip PDF to an email** - Checkbox

WHEN checked
THEN it sends an email to the customer with the delivery slip in PDF format attached.

* **Set the order as shipped.** - Checkbox

WHEN checked
THEN the flag **shipped** from the order is activated

* **Set the order as paid.** - Checkbox

WHEN checked
THEN the flag **paid** from the order is activated

* **Set the order as in transit.** - Checkbox -

WHEN checked
THEN the flag **delivery** from the order is activated AND it generates the Delivery Slip.

WHEN a order is set **as paid** OR **as shipped** OR **as in transit**
THEN the flag can't be remove from the order.

Next to the label name and email template preview, there is a drop-down to select the language the user wants to edit or view the information.

Expand Down