Instructions
Instruction video: Stock Internal Transit Valuation
1. Create a new storage location
Navigate to Inventory > Configuration > Settings, and enable the Storage Locations and Multi-Step Routes features. Press Save to store the changes.
Navigate to Inventory > Configuration > Warehouses, and press Create to create the Hai Phong Warehouse. Press Save to store the information.
Then click on Edit and select Resupply From: Main Warehouse.
2. Configure accounting accounts for Transit location
Navigate to Inventory > Configuration > Locations, turn off the default filters, and search for the Transit location. Then, you need to set up the stock valuation accounts for the incoming and outgoing goods.
3. Create and receive products in the main warehouse
Create a new product and activate the following routes:
- Hai Phong Warehouse: Resupply from Main Warehouse;
- Replenish on Order (MTO).
Then you need to create a purchase order and receive products at the Main Warehouse.
Note: You need to un-archive the Replenish on Order (MTO) route.
4. Create a sales order with delivery from another warehouse
Go to Sales > Orders > Quotations to create a sales quotation in the Sales app. In the Other Info tab, set up delivery from the Hai Phong Warehouse.
Press Confirm to have the following 3 warehouse transfers:
- Transfer 1: From Main warehouse to Transit location;
- Transfer 2: From Transit location to Hai Phong warehouse;
- Transfer 3: From Hai Phong warehouse > Customer.
When the first transfer is ready, click Validate to confirm the delivery from the Main warehouse to the Transit location. The respective journal items are created according to the accounting accounts set up on the Transit location.
At this moment, the second transfer will be ready. When stocks are delivered to the Hai Phong warehouse, the warehouse staff go to the transfer slip and press Validate to confirm the incoming stocks at the Hai Phong warehouse. Journal items recording the incoming stocks are created accordingly.
Finally, goods are ready to be delivered to the customer. Press Validate at the third transfer to complete the delivery.
Note: You can use the Minimum stock rule (MTS) for the above workflow. On the other hand, you can also manually create warehouse transfers to the transit location instead of using the automatic replenishment rules.
5. Intercompany transfers — using the shared transit location
Two transit-location scenarios must be distinguished:
- Intra-company transit — the transit location has a Company set
(e.g. the per-company WH/Transit automatically created by System).
Used for multi-step routes and resupply between warehouses of the
same legal entity. Goods stored here are still part of the company's
inventory.
- Intercompany transit — the transit location has no Company
(e.g. the shared Inter-company transit location,
stock.stock_location_inter_wh). Goods stored here belong to no
company in the system; they represent goods that have left one legal
entity but have not yet been received by another.
For the second scenario, System core's _get_dest_account does not
honour the transit location's Stock Valuation Account (Incoming)
and falls back to the product category's Stock Output account
(typically TK 632 - Cost of Goods Sold in the Vietnamese chart). This
is incorrect because no sale has occurred yet — the outbound side of an
intercompany transfer is merely moving inventory across legal entities.
This module overrides _get_dest_account so that:
- When the destination is a transit location without a company, the
configured Stock Valuation Account (Incoming) on the transit
location is used as the debit account on the outbound side
(e.g. TK 151 - Hàng mua đang đi đường or any user-defined holding
account).
- When the destination is anything else (including intra-company
transit, which is handled by the journal-entry pipeline introduced
earlier in this module), core behaviour is preserved.
The symmetric incoming side requires no patching: core's
_get_src_account already honours
location_id.valuation_out_account_id for any usage, so the destination
company correctly credits the transit location's
Stock Valuation Account (Outgoing).
To enable this behaviour, configure both Stock Valuation Account
(Incoming) and Stock Valuation Account (Outgoing) on the shared
Inter-company transit location. Choose accounts that belong to
the appropriate company's chart of accounts — typically a single
holding account (e.g. TK 151) used by both sides.