View
5
Download
0
Category
Preview:
Citation preview
inventory_management_magento2
version
BoostMyShop
février 14, 2020
ContentsInventory Management for Magento2 1
1. Overview 1
2. Installation 1
Installation 1
Upgrade 2
Uninstallation 2
Disable module 2
Reset data 3
3. Concepts 3
Warehouses 3
Stock movements 4
Sellable quantity 4
Warning / Ideal stock levels 5
Sales order item routing 5
Stock reservation 5
4. Configuration 6
Magento Configuration 6
Inventory management configuration 6
General 6
Attributes 6
Pending Orders 6
Stock levels 7
Front end 7
Stock Discrepencies 7
5. Warehouses Management 7
Warehouses Settings 7
General 8
Figures 8
Products 9
Orders to ship 9
Import 9
Warehouses Routing 10
6. Stock Helper 12
7. Product view 13
How to access 13
Available tabs 13
Overview 13
Stock settings per website 14
Orders to ship 14
Attributes 15
8. Order view 16
9. Mass stock editor 16
10. Stock Take 17
1. Creation 17
2. Scan Products 19
3. Import Products 20
4. Print 20
5. Apply the stocktake 20
11. Stock Transfer 21
1. Creation 21
2. Add products 22
3. Products tab 22
4. Apply / Receive the transfer 23
12. Stock Discrepancies 24
Description 24
Probes 25
Missing Warehouse items 25
Missing Stock for website (table cataloginventory_stock) 25
Unconsistant Stock for website (table cataloginventory_stock) 26
Missing Stock items (table cataloginventory_stock_item) 27
Warehouse items with negative physical quantity 27
Stock items with negative physical quantity 27
Quantity in stock item 27
Quantity stored in warehouse item doesn’t match to the stock movements 27
Quantity to ship in warehouse item doesn’t match to the pending orders 27
Unconsistant reserved quantity at warehouse item level 27
Missing extended information for sales order item 27
Wrong extended information for sales order item 28
Stock items with quantity NULL (not zero) 28
Products with a quantity sellable but out of stock 28
Products without stock, no backorder, but sellable 28
98. FAQ 28
1. Incompatibility with Magento version 2.3.x 28
2. Some tabs disappeared in ERP products view and orders view 29
3. Unable to access product ERP view 29
4. Stock settings per website - Index missing 29
5. ‘On hand’ qty field is not decreased after a shipment 30
6. Configurable product configurations not appearing in some ERP views 30
7. Stock movement not created for simple products through a bundle product after ashipment
31
8. Backorders bulk update process 31
9. Stock take scanned items not considered 32
10. Unexplained stock movement(s) “Quantity changed event” 32
99. Technical resources 32
Command lines 32
Stock Discrepencies 33
Fix Reservation 34
Refresh Qty To Ship 34
Refresh Sellable Qty 34
Refresh Sales History 34
Import Warehouse Stock 34
Export Warehouse Stock 35
Inventory Management for Magento2
1. Overview
Warning
From Magento version 2.3, Magento Multi-Sources Inventory modules are installed and enabled.
Our Embedded ERP modules are not compatible with these modules.
To make it work correctly, you will need to disable them all, following Magento 2 official documentation.
Inventory Management extension for Magento2 features a full Warehouse Management System in Magento, bringingthe following features :
• Multiple warehouses support
• Stock movement support
• Warning & ideal stock levels support
• Mass stock Editor, Stock Helper
• Stock reservation for pending orders
2. Installation
Warning
From Magento version 2.3, Magento Multi-Sources Inventory modules are installed and enabled.
Our Embedded ERP modules are not compatible with these modules.
To make it work correctly, you will need to disable them all, following Magento 2 official documentation.
Also, these modules have to be disabled to ensure a good working of Inventory Management :
• Amasty Improved Sorting (module code : Amasty_Sorting)
• Firebear Configurable Products (module code : Firebear_ConfigurableProducts)
• LanthopusX List View (module code : LanthopusX_ListView)
InstallationTo install correctly Inventory Management in your Magento 2, here are the steps to follow :
1. Download the extension (provided as a ZIP archive) from your BoostMyShop account, My Downloads section.
2. Unzip the downloaded archive, then upload extracted files to your server, into the Magento root folder.
Note
If files upload have been done correctly, a module folder named “AdvancedStock” should be visible indirectory app/code/BoostMyShop/.
3. Connect to your server via SSH, then run the following command lines :
Inventory Management for Magento2
1
php bin/magento setup:upgradephp bin/magento setup:di:compilephp bin/magento setup:static-content:deployphp bin/magento bms_advancedstock:flush_stock_indexphp bin/magento indexer:reindexphp bin/magento cache:flush
Note
These commands will install the module in Magento.
4. Once done, run these additional commands to initialize module data :
php bin/magento bms_advancedstock:refresh_quantity_to_shipphp bin/magento bms_advancedstock:refresh_sales_historyphp bin/magento bms_advancedstock:refresh_sellable_quantityphp bin/magento bms_advancedstock:fix_reservationphp bin/magento bms_advancedstock:check_stock_discrepencies --fixphp bin/magento bms_advancedstock:check_stock_discrepenciesphp bin/magento bms_advancedstock:flush_stock_indexphp bin/magento indexer:reindex cataloginventory_stock
Note
More informations on the stock discrepencies command line : Stock Discrepancies.
Warning
Once Inventory Management has been installed, two Magento configuration options need to be set to “No” toensure good stock management workflow.
These options are the following one :
• Stores > Configuration > Catalog > Inventory > Stock Options > Decrease Stock When Order is Placed
• Stores > Configuration > Catalog > Inventory > Product Stock Options > Automatically Return Credit Memo Item to Stock
UpgradeThe upgrade process is exactly the same as the installation process.
Uninstallation
Disable module
You can disable the Advanced Stock module using Magento module:disable command line via SSH :
php bin/magento module:disable BoostMyShop_AdvancedStock
Inventory Management for Magento2
2
Warning
Once Inventory Management has been uninstalled, two Magento configuration options need to be set back to“Yes” to ensure good Magento stock management workflow.
These options are the following one :
• Stores > Configuration > Catalog > Inventory > Stock Options > Decrease Stock When Order is Placed
• Stores > Configuration > Catalog > Inventory > Product Stock Options > Automatically Return Credit Memo Item to Stock
Reset data
In order to reset all Inventory Management data, please run these SQL commands in your database.
Note
Following this script execution, all product stocks will be reset to 0.
UPDATE cataloginventory_stock_item SET qty = 0;
-- Clean Inventory Management tables
TRUNCATE bms_advancedstock_extended_sales_flat_order_item;TRUNCATE bms_advancedstock_routing_store;TRUNCATE bms_advancedstock_routing_store_warehouse;TRUNCATE bms_advancedstock_sales_history;TRUNCATE bms_advancedstock_stock_movement;TRUNCATE bms_advancedstock_transfer;TRUNCATE bms_advancedstock_transfer_item;TRUNCATE bms_advancedstock_warehouse;TRUNCATE bms_advancedstock_warehouse_item;
3. ConceptsThis page explains the main concept for the inventory management extension.
First of all, this extension uses every existing Magento features about the inventory management, and extend them.So you can still use the settings available in the product view, under the “advanced inventory” tab.
WarehousesThe inventory management extension supports multiple warehouses : by default, after installation, one warehousealready exists. This default warehouses is technically required by the extension, can not be deleted and EVERYproducts created in magento will be associated to that warehouse (with a quantity of 0 by default). You can renamethat first warehouse, and we do encourage you to use it as your main warehouse.
One warehouse can contain products : several information are available at the product / warehouse level :
• Physical Stock level : this is the quantity in the warehouse
• Qty to ship : this is the quantity to ship for opened sales order
• Qty available : physical quantity minus the quantity to ship
• Shelf location : location of the product in the warehouse
The best way to edit product / warehouse details is to use the mass stock editor but this information are alsoavailable in the “Inventory management” tab in the product view.
3. Concepts
3
Stock movementsEach time the physical stock level of any product changes in one of its warehouse, a stock movement MUST becreated to process this stock change.
Stock movements are automatically created in some cases :
• When an order is shipped
• When a purchase order is received (available when our Procurement or Embedded ERP extension isinstalled)
• If you manually change the stock level from the Mass stock editor, a “System” stock movement will becreated.
Warning
It is mandatory that for each product, its physical quantity matches to the sum of its stock movement qty.
If it is not the case, you may experience unexpected behaviours.
So, when you need to update a product physical stock level (for any reason), the best practice is to go within theproduct view and then create a new stock movement from there.
A stock movement is composed of the following information:
• From : This is the warehouse where the product comes from : it can be empty if the product comes from awarehouse that you do not manage (from a supplier for a purchase order reception, or from a customer fora customer return)
• To : This is the warehouse where the product goes to : it can be empty if the warehouse is out of yourcontrol (when you ship an order to a customer for instance)
• Quantity : This is the stock movement quantity. This quantity will be decreased from the “From”warehouse, and increased in the “To” warehouse. .. warning:: The quantity must always be positive. Evenfor outgoing stock movements, qty must be positive as only the “From” and “To” fields of the stockmovement form will manage how the stock movement qtuantity will be managed.
• Category : This is the stock movement category, used for information only, having no impact on the stockmovement itself.
• Comment : This is a mandatory little note added for each stock movement. You must explain there thestock movement creation purpose.
Finally, all stock movements already created can be found in one of ERP grids, available from menuEmbedded ERP > Inventory Management > Stock Movements.
Sellable quantityMagento supports the sellable quantity at the website level, so our extension fits to this design. To know the sellablequantity for one product, you must go within the product view, and select “Inventory management” tab : you have thequantity available for sale per website in the first grid “Quantity sellable per website”.
The sellable quantity for one website is updated this way :
• Use every warehouses for which the “Use for sales” option is enabled in the “Warehouse routing” screen (this isconfigurable per website)
• Then, the system calculates the sum of the available quantity for each warehouse, and update the total sellablequantity at the website level.
This very flexible engine allows to support different scenarios :
• Sellable quantity on your website can be the sum of your warehouse + a physical store, but the sellable quantityin the store is only the quantity in the “shop” warehouse
• Sellable quantity can be the sum of your warehouse + a drop shipping warehouse
3. Concepts
4
• If you create a “RMA” or “Defective” Warehouse, do NOT enable the “Use for sales” option !
Once everything is configured, inventory management will update the sellable quantity when :
• A new order is placed
• Physical quantity in one warehouse changes
Warning / Ideal stock levelsThe warning & ideal stock levels are used to raise notifications when a product stock level goes low. Those levels areconfigurable at the warehouse level.
The concept is the following : when the quantity AVAILABLE for one product in one warehouse goes BELOW thewarning stock level, then a notification is raised to reach the ideal stock level, here are some examples :
Available Qty Warning stock level Ideal stock level Notification
10 15 20 Buy 10
10 5 8 Buy 0
10 15 15 Buy 5
To get a quick view about the products to reorder, use the stock helper screen.
Sales order item routingWhen a new order is placed, the extension will assign a warehouse to each order item : this is the warehouse fromwhich the product will be dispatched : this flexible engines allows to get an order dispatched from different location,depending of the stock levels in warehouses, or of the client location.
You can check or change the warehouses associated to order items in the order view (inventory tab).
The rule configuration for the warehouse routing can be defined in the “Warehouse routing” screen.
In the first versions, 2 rules are available :
• Warehouse with stock, order by priority : in that case, the system browse the warehouses having the “Usefor shipments” option enabled, sorted by priority (1 => 9999). Then, it will use the first warehouse that hasenough available stock to dispatch the order item
• Always priority one : in that case, order items are always assigned to the warehouse having the “Use forshipments” option enabled AND a priority of 1.
Warning
Warning : if you change that configuration, it will apply ONLY for future orders, not for existing ones.
Stock reservationThe Inventory extension includes a mechanism to reserve inventory (if available) when an order is placed, here ishow it works :
• Let’s consider a product P in warehouse W, with a physical quantity of 2 : at this stage the available quantity is2. Backorders are enabled for this product
• A customer place an order with 1 product P, the order item is assigned to warehouse W. Then, the systemchecks if product P is available in the warehouse W: yes it is, so it reserve the product for the order, and theproduct available quantity becomes 1.
• Another customer places the same order, product is also reserved for this order, and the available quantitybecomes 0
3. Concepts
5
• As backorders are enabled in magento, a third customer can purchase the same product. However, when theorder is placed, the system can not find any available product, and then the quantity is NOT reserved for thisthird order.
• A few days after, you receive a purchase order and increase the stock to 10 : at this moment, the system looksfor order pending this product, and then, reserve the product for this third order.
This way, you always know what orders are fullfillable or not, and also what quantity of your inventory is reserved forfuture shipment.
Note
Note : if an order is cancelled, the product is released and assigned to another pending order.
4. Configuration
Magento ConfigurationThe inventory management extension does not change the way magento handles inventory, but here are a fewpoints / thoughts :
• You can still use options available in store > configuration > catalog > inventory, they are all compatible with ourextension
• You can not have negative quantities anymore in Magento, as it now contains the quantity sellable, so in theworst case (for products not in stock allowing back orders), the magento quantity will be 0
Inventory management configurationInventory Management settings are available from menuStores > Configuration > Boostmyshop > Inventory Management.
General
Option Description
Disable logs Record logs in Inventory Management extension
Log stock movementstacktrace
Keep a stacktrace of each stock movement. Useful for debug if you haveunexplained stock movements.
Attributes
Option Description
Barcode attribute Select there the product attribute containing its barcode (EAN or UPC type)
Manufacturer attribute Select there your manufacturer attribute
Pending Orders
Option Description
Pendingordersstatuses
Select all order statuses that you consider as “opened orders” : these orders will reserve stock(if available) and so update the quantity to ship
4. Configuration
6
Note
If you change selected statuses, you’ll need to run the following command line to update correctly quantities toship :
php bin/magento bms_advancedstock:refresh_quantity_to_ship
Stock levels
Option Description
Default value for Warning stock level Default “Warning stock level” value for products not having a customone
Default value for Ideal stock level Default “Ideal stock level” value for products not having a custom one
Weeks for sales history range #X Number of week(s) to consider for Sales history update
Front end
Option Description
Displaystocks
If enabled, a new “Stock” tab will be added to each product page on your website frontend, with thewarehouses stock levels summary displayed in it
Note
Only stock from warehouses having “Display on front” option enabled will be displayed. More information on thewarehouse option “Display on front” : Warehouses Settings
Stock Discrepencies
Option Description
Stockdiscrepencyreport
Display the “Stock discrepencies” report. It will show a report listing all Inventory errors, witha “Fix” button allowing to fix them
5. Warehouses ManagementYou can create warehouses for every product container, relevant cases are :
• A building
• A shop
• A supplier
• A shelf in the warehouse that contains defective products
• For products reserved (for instance for a show room, or for internal usage)
Warehouses SettingsThe warehouses management screen is available from menuEmbedded ERP > Inventory Management > Warehouses.
5. Warehouses Management
7
From there, you get the possibility to create, delete or modify any warehouse.
Note
Be careful to never delete your default warehouse (the one with the ID 1), as it will cause serious problemsinside ERP.
If you click on any warehouse row in the grid, or click on the Add new warehouse button located at the top-rightcorner of the grid, the warehouse edition screen will be displayed.
Here is a description of each tab available from this edition screen.
General
Option Description
Name Name of your carehouse, displayed in ERP grids and screens.
Contact Contact name in the warehouse.
Email Email address to contact.
Status Enabled / Disbaled. If the warehouse is disabled, it is hidden from ERP screens and grids.
Fulfillmentmethod
Defines the warehouse type. More informations below.
Primary Define a warehouse as “default target one” for all incoming stock movements made by third partyextensions.
Displayon front
If enabled, the warehouse available quantity will be displayed on the website frontend, at product viewlevel (global setting must also be enabled fromStores > Configuration > BoostMyShop > Inventory Management > Frontend).
Use forsupplyneeds
Consider this warehouse for the Supply Needs calculation.
Website Not used.
Notes Extra notes about this warehouse.
Openhours
Warehouse working hours.
Addressfields
These fields will be used to display warehosue address on front end if Display on front option isenabled.
Note
The fulfillment method will define in which screen the ordered products associated to the warehouse will bedisplayed and managed.
• Warehouses with Shipping fulfillment method will be managable through ERP Order preparation screen.
• Warehouses with Drophip fulfillment method will be managable through Drop Shipping orders screen, ifDropShip extension is installed.
You have to keep at least one warehouse with a “Shipping” fulfillment method to be able to processorders through ERP order preparation screen.
Figures
5. Warehouses Management
8
Field Description
Skus instock
Count of products currently affected to this warehouse, being in stock.
Totalproducts
Sum of all products physical qty affected to this warehouse. For example, if product A has 5 on handqty, and product B has 3 on hand qty, this field will display 8.
Totalvalue
Total cost of all products currently affected to this warehouse (for each product :total_product_cost = product_cost * product_physical_qty).
Note
In the case where the full ERP package is installed and a product is associated to multiple suppliers, thecost used to calculate “Total value” field is the one from the supplier with setting “Primary” set to “Yes”.
Note
The Total products value is the sum of physical quantity of each product in the warehouse.
For example if your warehouse contains 2 products, product A with 5 physical qty and product B with 3 physicalqty, the Total products value will be equal to 5 + 3 = 8.
Products
This tab summarizes stock levels of all products associated to the warehouse.
Note
In order to understand how are working stock levels, please take a look at the Concepts section.
Note
You can export this grid into a CSV file, using the Export button available above the grid.
Orders to ship
This grid displays order items to be shipped from this warehouse.
Once an order is shipped, order items will be removed from this grid.
Import
This feature should be used to update stock levels of warehouse products.
Expected file format and file specifications are described in the Import tab.
As a reminder, here are important points :
• File extension : CSV / TXT
• Separator : Semi-colon (; or ,)
• Mandatory column : sku
5. Warehouses Management
9
Warning
When importing csv file make sure that the encoding type is in UTF-8.
Warning
Only SKU(s) already associated to the current warehouse are importable.
Note
Please use column names as described in the Import tab, using only lowercase letters.
As a reminder, usable column names in the import file are :
• sku (mandatory or use barcode instead)
• barcode (mandatory or use sku instead)
• qty
• shelf_location
• warning_stock_level
• use_config_warning_stock_level
• ideal_stock_level
• use_config_ideal_stock_level
That means you cannot associate new products to this warehouse using this import, but only change stock levelof already existing ones.
If you try to import a SKU not already associated to the warehouse, the import will not process this row but willstill process other ones.
CSV file example
sku;qty;shelf_location;24-MB01;1;A124-MB02;10;D4
Once your file is correctly formatted, simply select it with the Choisir un fichier button, then click onSave Warehouse.
This will process the import and display a message saying how many stock level have been correctly updated, andhow many were not updated.
Note
If the file is not well formatted, it will display an error message to let you know what’s wrong with the current file.
Warehouses RoutingThese screen is used to configure the system and decide how the warehouses are used.
There are 2 important roles for a warehouse :
• Stocks in the warehouse are available for sales on the website, and are used to calculate the sellable quantity
5. Warehouses Management
10
• Warehouse is used to dispatch order item
Both roles are configurable at the website level (store and store view levels are NOT available).
If you want to use a warehouse stock levels to sell on a website, you must enable the “Use for sales” option for thewebsite / warehouse. Then, the quantity available for sales on the website will be the sum of the quantity available inthe warehouses having “use for sales” enabled.
To select the warehouse to dispatch an order item, the configuration is a bit more complex: you must first enable theoption” Use for shipments” for warehouses that can dispatch, and then configure the method and the priority :
• Warehouse with stock, order by priority : in that case, the system browse the warehouses having the “Usefor shipments” option enabled, sorted by priority (1 => 9999). Then, it will use the first warehouse that hasenough available stock to dispatch the order item
• Always priority one : in that case, order items are always assigned to the warehouse having the “Use forshipments” option enabled AND a priority of 1.
Here is an example of warehouses configuration. In that example, we do have 2 websites :
• Main website is your online website.
• Paris shop is a store, on the “Champs Elysees” in Paris
• For the main website, the quantity sellable is the SUM of quantity available in warehouse default, drop ship andparis shop
• For the Paris shop website, the quantity sellable is ONLY the quantity available in the paris shop website
When an order is placed on the “Paris shop” website, it is only dispatched from the “Paris shop” warehouse (it is theonly one that has the “Use for sales” option enabled, and it is priority 1
When an order is placed on the main website, the systems checks if there are stocks in the default warehouse, if so itassociated the default warehouse to the order item. If there is no stock in the default warehouse, then it checks thedrop ship warehouse. If there is no stock at all, then the warehouse with the priority 1 will be used (default in thatcase)
Note
an order placed on the main website will NEVER be dispatched from the paris shop, even if we use thatwarehouse to calculate the sellable quantity. If the product is only available in the paris shop, you will have totransfer the stock to the default warehouse to dispatch the order.
5. Warehouses Management
11
6. Stock HelperThe stock helper screen has been designed to help you to optimize your products ideal & warning stock levelsdepending of procurement and sales history data.
Warning
Only simple and virtual products will be displayed in this grid, as others kind of products should not be stockmanaged, meaning they don’t have any ideal or warning stock level.
Note
Please take a look at the Concepts section to better understand how are working warning & ideal stock levels.
By the same way, simple and virtual products having the Magento inventory option “Manage stock” set to “No”will not be displayed in this screen. The “Manage stock” option of each product can be found going intoCatalog > Products grid, selecting a product, then going into Advanced Inventory popup > Manage stock.
In the stock helper grid, you will find one row by product by warehouse associated.
It is composed by the following columns :
Column Description
Image Product image.
Sku Product sku.
Product Product name.
Warehouse Warehouse associated to the product.
Available Qty Quantity available for the product, in the warehouse of the previous column.
History Sales history of the product.
Avg per week Number of sales per week (calculated from sales history).
Lead time Number of days needed by the supplier associated to the product for sending (supplier supplydelay + supplier shipping delay).
Run out (days) Number of days until the product will be out of stock (calculed from its available qty & avg salesper week).
Warning stocklevel
Product warning stock level. See “Concepts” section for more information.
Ideal stocklevel
Product ideal stock level. See “Concepts” section for more information.
Qty to order Suggested qty to order (calculated from pending backorders, product warning stock level & qtyto receive).
Suppliers Suppliers associated to the product.
Discontinued Product “discontinued” attribute. See “Procurement” documentation for more explainations.
The Avg per week value is calculated as following : (sales_history_range_1_value + sales_history_range_2_value + sales_history_range_3_value) / total_number_of_weeks_of_sales_history)
6. Stock Helper
12
Note
The sales history are not automatically updated, they only get updated with the execution of an SSH commandline.
You can add a cron task on this command line if you wish to get them automatically updated at a specific interval.
Note
You can export the stock helper data into a CSV file using the Export button located in the top-right corner ofthe screen.
7. Product viewInventory management extension adds a few new functions useful for products stock management, availabledirectly from product pages.
How to accessDepending on whether it has been installed as it or with the full ERP package, the way to access thesefunctions will be a little bit different :
• If you have only installed Inventory extension as it, a new products grid will be available from menuCatalog > Inventory Management > Products.
From this grid you will be able to access ERP view of products simply clicking on any row.
• If you have the full ERP package installed, a new link will appear in Magento product page header,called “Switch to ERP View” :
Available tabsOnce you have reached the advanced product view, you’ll find some sections related to Advanced Stockfunctionalities.
Overview
The overview tab purpose is to display a quick summary of product stock data.
Here are descriptions of all available sections of this tab :
7. Product view
13
Section name (ERP full package /Inventory Management extension only) Description
Stock settings per website / Availablestock per website
Quantity sellable for each website, being the sum of eachwarehouse available qty.
Warehouses / Warehouses Summary of stock levels in the different warehouses. Moreinformation in the “Concepts” section.
Orders to ship (tab) / Pending orders Current opened orders for the product. You can also see from whichwarehouse orders will be dispatched from there.
New stock movement / Create a newstock movement
Stock movement creation interface. More information in the“Concepts” section.
Stock movements (tab) / Stockmovements
History of each stock movement done for the current product
Stock settings per website
This section displays the product stock summary by website, with useful informations.
It looks like :
As shown on above screenshot, the stock settings section will display stock data for each website created inMagento, and an “Admin” additional one.
For each website, you’ll be able from there to change the “backorders” setting.
Note
The “Admin” website represents the Magento backoffice.
For example, “Admin” website data will be used when you create an order from the Magento backoffice(Sales > Orders > Create New Order).
All products will be sellable through Magento backoffice order creation screen, no matter what theiravailability status is (Magento default behavior)
Please keep in mind that the “backorders” option set for the “Admin” website will not apply for other websites, asexplained before.
You can also update this setting for multiple products at the same time using Magento functionality “Updateattributes”. More informations : FAQ - Backorders bulk update process
Note
If an “Index Status” column states “Index missing”, you can correct it following : FAQ - Stock settings per website- Index missing
Orders to ship
This tab will allow you to check all pending orders for the current product, where at least 1 qty to ship is found.
7. Product view
14
You will also find there a usefull function (available from ERP v-1.3.8) called “Stock allocation”.
This function will allow you to “move” stock reservation between 2 orders to ship.
Let’s take an example :
In this example, we can see that the current product have 4 pending orders where at least 1 qty to ship is found.
Among these orders, we can see that order #000000017 has 1 qty to ship which is not reserved yet has theproduct has no available qty anymore.
In the same time, 3 other orders to ship have qty reserved for this same product.
The stock allocation function will then allow you to “prioritirize” some orders to be able to ship them first, by“moving” the reserved qty between them.
In our example, we will take the reserved qty from order #000000035, and move it to order #000000017.
In the top drop down menu, we select in this case to allocate stock from order #000000035 to order #000000017.
Then, the qty reserved for order #000000035 (red framed on the previous screenshot) will be allocated to order#000000017 (green framed on the previous screenshot).
The final result after clicking on Save will be :
Attributes
The attribute tab helps you to quickly set some product attributes that will be used through ERP.
These attributes can be defined from Inventory Management configuration.
7. Product view
15
Note
If you have the full ERP package installed, you will also find attributes definable from Order Preparationconfiguration
Here is the list and description of each available attribute :
Attribute Description
Barcode Product barcode, used in all screen where scan function is available
Weight Product weight, used in the packing step available through the order preparation process
Volume Product volume, used in the picking list available through the order preparation process
Package number Number of packages required, retrieved in shipping label templates available codes
Discontinued Set a product as discontinued if you don’t sell it anymore
Warning
Only attributes having mapping correctly done from configuration will be displayed in this tab.
8. Order viewA new tab is available in the order view : this is the “Inventory” tab.
This tab lists every order products, and give details about the dispatch :
• Quantity to ship : This is the quantity remaining to ship. If an order item is cancelled or refunded or shipped, itwill go to 0
• Quantity reserved : This is the quantity reserved for this order in the warehouse (please read the conceptssection to understand about the reservation process)
• Warehouse : Warehouse from which the order item is dispatched
• Shelf location : Product location in the warehouse
• Qty in the warehouse : Available quantity and physical quantity for this product in the warehouse
From here, you can change the warehouse : select another warehouse in the drop down menu and click on the“save” button
9. Mass stock editorThe mass stock editor is designed to easily update inventory level and shelf location for products.
8. Order view
16
It contains the following columns :
• Sku / Product / Status : Product information
• Qty in the warehouse : Physical quantity in the warehouse.
• Qty to ship : Quantity to ship in pending orders.
• Available quantity : Physical quantity minus quantity to ship
• Shelf location : Product location in the warehouse
To update values here, change the value in the text box and click on the save button.
Note
If you manually change the stock level, there will discrepancy between the sum of the stock movement and thequantity stored. To avoid this problem, the extension will automatically create a stock movement to make surethat the sum of the stock movement matches to the new quantity. This stock movement will be titled “From massstock editor”
10. Stock TakeThe Stock Take feature has been made to help you realize your stocktakes.
It’s available from menu Embedded ERP > Inventory Management > Stock Take.
1. CreationTo create a new stock transfer, access its main screen first(Embedded ERP > Inventory Management > Stock Take).
Then once the grid is displayed, click on New Stock Take button located at the top-right of the grid.
This will load a new screen called “Create new Stock Take” :
10. Stock Take
17
Here is the description of each field displayed on this screen :
Field Description
Label Name of the stock take
Warehouse Warehouse where the stock take is processed
Status Stock take current status
Website Not managed at the moment
Use binlocations
Allows to process the stock take location by location. Useful in the Scan screen, especially whenthe Product Selection option is set on “All”
ProductSelection
Select the stock take processing method
Manufacturers
Only enabled if the Product Selection method is set on “Manufacturer”. Allow to chose productsmanufacturer(s) to process the stock take on
Notes Add personnal notes about this stock take
10. Stock Take
18
Warning
Set the Product Selection option on “All” can throw time out errors on the “Scan products” screen, as productscollection loaded can become really big.
We advise you to use a “Random” or “Manufacturer” value for the Products selection option, in order to limit theproducts collection size and prevent time out problems.
If you still want to process a stock take on all your products at the same time setting the Products Selectionoption on “All”, please also enable the option Use bin locations. This will add a “Location scan” step at the“Scan” page load, limiting the products to scan to the chosen location, and so prevent time out errors.
2. Scan ProductsYou can also scan products you want to add to the stock take using your barcode scanner, with the “Scan” function.
This function is available clicking on the Scan Products button, located next to the Save button.
The “Scan” screen looks like :
From this screen, simply scan your products barcode to add them to the stock take.
Note
You can also use the + and - buttons to increase or decrease the quantity manually.
Note
If it seems that barcodes are not well recognized, please check :
10. Stock Take
19
• That ERP can correctly find them by typping their barcode using your keyboard, making sure nothing isfocused when you type the code.
• That your barcode scanner is correctly adding a cariage return at the end of each barcode scanned.
Use the “Save” button to validate your scans. Then you can check what have been scanned in the “Products” tab.
3. Import ProductsIf you don’t want to scan your products, you can also import a csv file with the scanned quantity.
It can be done in the “Import / Export” tab.
4. PrintThe “Print” button allows to print a PDF file with all products in the stocktake and their status.
5. Apply the stocktakeOnce your stocktake is complete, you can apply it using the “Apply” button.
All stock movements that will be created are listed in a grid in order to check what is going to be applied.
10. Stock Take
20
You can then use the “Create stock movements” button to update your stock levels.
Note
If some products you scanned during the Scan step are missing from the Apply grid, it can be due to some PHPsettings that need to be increased.
More information in the FAQ - Stock take scanned items not considered
11. Stock TransferThe Stock transfer feature is designed to help you to transfer stock between warehouses.
It’s available from menu Embedded ERP > Inventory Management > Stock transfer.
Here is described how to process a stock transfer.
1. CreationTo create a new stock transfer, access its main screen first(Embedded ERP > Inventory Management > Stock transfer).
Then once the grid is displayed, click on New button located at the top-right of the grid.
This will load a new screen called “Create new Stock Transfer” :
Here is the description of each field displayed on this screen :
Field Description
Reference Name of the stock transfer
11. Stock Transfer
21
From warehouse Warehouse which stock is taken from
To warehouse Warehouse which stock goes to
Status Stock transfer current status
Website Not managed at the moment
Notes Allow to add personal notes
To be able to save the stock transfer, please fill all these fields, once done click on Save.
2. Add productsNow that the stock transfer has been correctly created and saved, you can start to select products to add.
To do it, a tab will be useful in the stock transfer interface : the Add products tab.
This tab helps you to select products to add to the current stock transfer.
Once the tab is opened, you should see a grid contaning all products associated to the “From warehouse” of thestock transfer.
Note
You can click on the link from the SKU column to access the selected product page.
Select products you want to add to the current stock transfer by filling the “Qty to transfer” field.
Once done, simply click on Save to add selected products to the current stock trasnfer.
3. Products tabAt anytime, you can see which products have already been managed by the current stock transfer, going into theProducts tab.
This tab will display a products grid looking like :
11. Stock Transfer
22
4. Apply / Receive the transferOnce your transfer is ready, you can apply/receive it using the “Apply” button.
All products from the transfer are listed. You can process the reception manually, using the + and - button on theright, or you can also use a barcode scanner.
A quicker way to receive all products is to use the “Fill all quantities” button.
At any time, you can see how many products have been processed and how many products are left to receive.
Once your reception is complete, just click on “Save”, ERP will create the stock movements to synchronize yourstock.
11. Stock Transfer
23
Note
Products reception can be done step by step, meaning you don’t have to receive all of them at the same time.
To process products reception in multiple times, you simply need to repeat the reception process as many timeas necessary.
12. Stock Discrepancies
DescriptionThis report is available fromStores > Configuration > Inventory Management > Stock Discrepancies by clicking on theDisplay button.
It can be updated :
• Using the Update Report button at the top right corner, for small products catalog.
• Running the following command line, for large products catalog :
bin/magento bms_advancedstock:check_stock_discrepencies
If some errors are displayed once report has been updated, you can try to fix them automatically :
• Using the Fix errors button, for small products catalog.
• Adding the --fix option to the previous command line, for large products catalog :
bin/magento bms_advancedstock:check_stock_discrepencies --fix
Warning
If you only run the command line :
bin/magento bms_advancedstock:check_stock_discrepencies --fix
Errors will be fixed, but the report will not be updated and still display them. To update it please run the commandline again.
Note
You can execute/fix each probe of the stock discrepencies separately.
For it, add an --analyser PROBE_CODE instruction at the end of the basic command line, as following :
bin/magento bms_advancedstock:check_stock_discrepencies --fix --analyser PROBE_CODE
Where PROBE_CODE has to be replaced by the code of the probe you want to execute/fix.
For reference, here are each probe code :
Probe Name Probe Code
Missing Warehouse items missing_warehouse_items
12. Stock Discrepancies
24
Missing Stock for website (table cataloginventory_stock) missing_stock
Unconsistant Stock for website (tablecataloginventory_stock)
unconsistant_stock
Missing Stock items (table cataloginventory_stock_item) missing_stock_items
Warehouse items with negative physical quantity wrong_warehouse_item_quantity
Stock items with negative physical quantity negative_stock
Quantity in stock item wrong_stock_item_quantity
Quantity to ship in warehouse item doesn’t match to thepending orders
wrong_quantity_to_ship
Unconsistant reserved quantity at warehouse item level unconsistant_reserved_quantity
Missing extended information for sales order item missing_extended_sales_flat_order_items
Wrong extended information for sales order item wrong_extended_sales_flat_order_items
Stock items with quantity NULL (not zero) stock_item_with_null_quantity
Products with a quantity sellable but out of stock products_not_sellable
Products without stock, no backorder, but sellable products_sellable_that_should_not
Note
If you get a “memory exhausted” error executing the stock discrepencies command line, like :
Fatal error: Allowed memory size of XXX bytes exhausted (tried to allocate XXX bytes)
You can solve this problem setting a “-d memory_limit” instruction at the start of the php command line :
php -d memory_limit=2G bin/magento bms_advancedstock:check_stock_discrepencies --fix
If the problem persists, please increase the value from “2G” to an higher one, until it’s solved.
ProbesHere is described the role of each probe of the stock discrepencies report.
Missing Warehouse items
Every products should have an entry in the table bms_advancedstock_warehouse_item for each ERPwarehouses.
If some entries are missing, the Fix errors button will try to recreate them automatically.
Missing Stock for website (table cataloginventory_stock)
The cataloginventory_stock table must contain 1 row for each website created in Magento, and anaditional row named “Admin”(this row show the total sellable qty, the one available when creating ordersfrom the backend).
12. Stock Discrepancies
25
Note
Websites list is available from menu Stores > All Stores.
Let’s take the following screenshot as example :
As we can see, 2 websites have been created : “Main website” and “Website 2”.
Following this example, the cataloginventory_stock table must contain these values :
• We find a first row at the top of the table, with a website_id equals to 0, which respresent the “Admin”data.
• Then, we find one new row per website created in Magento, with the “website_id” column containingtheir ID in Magento.
In our example there were 2 websites created, so we find 2 more lines in thecataloginventory_stock table.
Warning
Each “website_id” and “stock_id” value must be unique in the table.
You must not have for example 2 lines with the same “website_id”, or the same “stock_id”.
Unconsistant Stock for website (table cataloginventory_stock)
As explained in the “Missing Stock for website” section, the cataloginventory_stock table should have 1 rowper Magento website.
It can happen, after a Magento 1 data import for example, to have some “website_id” added to this table withouteven existing in Magento 2 stores list (Stores > All Stores), due to the fact websites were existing in Magento1 but have not been created yet in Magento 2.
These rows have to be removed from this table to prevent any problem in Magento.
12. Stock Discrepancies
26
Warning
The stock discrepencies “Fix” button will not correct this kind of error itself, a manual database intervention will berequired.
Missing Stock items (table cataloginventory_stock_item)
Every products should have an entry in the table cataloginventory_stock_item for each Magento website.
If some entries are missing, the “Fix errors” button will try to recreate them automatically.
Warehouse items with negative physical quantity
This probe will detect if some of your products have a negative quantity in the tablebms_advancedstock_warehouse_item.
The “Fix errors” button will update these entries to a 0 quantity value.
Stock items with negative physical quantity
This probe will detect if some of your products have a negative quantity in the table cataloginventory_stock_item.
The “Fix errors” button will update these entries to a 0 quantity value.
Quantity in stock item
As a reminder, in ERP Magento 2 version, the cataloginventory_stock_item table contains 1 row per websitefor each product.
We will store in these rows the sum of warehouses available qty (the ones allowed for sales), for each website.
As example, it can happens that some third party modules will update qty values in thecataloginventory_stock_item table directly, making it impossible for ERP to detect these changes.
Result will be a difference between the sum of warehouses available qty (stored in thebms_advancedstock_warehouse_item table) and the qty value stored in cataloginventory_stock_itemtable.
This probe will list these stock differences, and fix it by calculating again the sum of warehouses available qty (theones allowed for sales), then copying this value in the cataloginventory_stock_item table.
Quantity stored in warehouse item doesn’t match to the stock movements
This probe will compare, for each product and by warehouse, the “wi_physical_quantity” value stored inbms_advancedstock_warehouse_item table with the sum of stock movements, calculated using column“sm_qty” of bms_advancedstock_stock_movement table.
Quantity to ship in warehouse item doesn’t match to the pending orders
As a reminder, for each pending order (depending of Pending orders configuration), ERP will assign a“Preparation warehouse” to each ordered item.
This probe will compare, for each product and by warehouse, the sum of ordered qty with the “qty_to_ship”value, sotred in bms_advancedstock_warehouse_item table.
Unconsistant reserved quantity at warehouse item level
Available soon.
Missing extended information for sales order item
Available soon.
12. Stock Discrepancies
27
Wrong extended information for sales order item
Available soon.
Stock items with quantity NULL (not zero)
This probe will detect if some entries of the table cataloginventory_stock_item have been created with a NULLquantity.
The “Fix errors” button will replace NULL by 0.
Products with a quantity sellable but out of stock
This probe will detect all products having a qty greater than their Out-of-Stock Threshold, but being out ofstock.
Note
The Out-of-Stock Threshold can be defined for each product from its page, opening the “AdvancedInventory” pop-up :
Products without stock, no backorder, but sellable
This probe will detect all products having 0 qty, no backorders, but being in stock.
98. FAQ
1. Incompatibility with Magento version 2.3.xERP is compatible with Magento version 2.3.0 since its version 1.3.4.
If you’ve got a lower version, please update it to the last one available.
Also, Magento released their own inventory management system through version 2.3.0.
This system called ‘MSI’ is not compatible with our ERP stock management system.
That means if you want to make ERP work on version 2.3.0, you will have to disable all modules part of the MSIsystem.
You can find a way to disable them all through CLI command lines in the Magento developer documentation, pleasecheck the following link : Disable Inventory Management
98. FAQ
28
2. Some tabs disappeared in ERP products view and orders view
Note
This has been fixed in ERP, since version 1.4.2.
Due to a know bug of the new versions of Magento 2, some tabs added by ERP will not be visible anymore after aMagento upgrade.
The solution to solve it is the following :
• Open the file : /vendor/magento/module-backend/Block/Widget/Tabs.php
• Change the following line (should be around line 302, in function applyTabsCorrectOrder) :
$positionFactor = 1;
• By this one :
$positionFactor += 1;
3. Unable to access product ERP viewIf you’re unable to access Advanced stock view, please check the following points :
• Have you got the full ERP package installed, or only Inventory management extension ?
In fact, the way to access Advanced stock view is a little bit different depending of that.
Please read : Advanced stock view access
• Is the extension correctly installed and enabled ?
To check it, please run the following command line :
php bin/magento module:status BoostMyShop_AdvancedStock
If the Advanced stock extension is shown as disabled, you can enable it using :
php bin/magento module:enable BoostMyShop_AdvancedStock
4. Stock settings per website - Index missingIt can happen, after a first installation, warehouse(s) or website(s) modification, that you get an “Index missing”error in the “Stock settings per website / Available stock per website” section :
To correct it, please run the following command lines via SSH, from your Magento root path :
php bin/magento bms_advancedstock:flush_stock_indexphp bin/magento indexer:reindex
This should reindex all products and correct that kind of errors.
98. FAQ
29
5. ‘On hand’ qty field is not decreased after a shipmentYou shipped your order and when you check the product from from the magento product view in the Advanced stocksection you note that the ‘Quantity’ has not been decreased correctly and the stock movement for the relatedshipment not created ?
You can find theese informations in each ERP product view looking at the ‘On Hand’ column value, and also in theStock movements tab.
In most of the case this problem occurs because the option “Manage stock” is set to “No” on your(s)product(s). Products must manage stock under ERP stock management system to make it work correctly.
To check if your product(s) manage stock :
• Check your settings inStores > configuration > Catalog > Inventory > Product Stock Options > Manage Stock.
• Check your product settings individually :Catalog > Products > Quantity : link 'Advanced Inventory' > Manage Stock.
6. Configurable product configurations not appearing in some ERP viewsSome configurable product configurations may not be displayed in some ERP view (as example the Mass StockEditor, “Add products” tab of purchase orders…).
This is due to the fact they’ve been created as “Virtual” products, and most of ERP grids only display“Simple” ones.
In fact, if you use the Magento 2 wizard to create configurations for your configurable products :
Once all wizard steps are completed and so configurations have been created, you should see a summary grid ofthese configurations :
As you can see, there’s a weight column in this grid, allowing you to set weight for each of these configurations.
The thing to know is that Magento 2 will create all configurations not having weight as Virtual products.
To switch their type to “Simple” products, you just need to set a weight for each of them,as that’s the wayMagento 2 differenciate simple and virtual products.
Once weight have been set for these configurations, they’ll be set as Simple products, and so well displayed &managed in all ERP screens.
98. FAQ
30
7. Stock movement not created for simple products through a bundle productafter a shipmentIf stock movement are not created from simple products into a bundle product when this one is shipped. This occurswhen the bundle product has the option ‘Ship Bundle Items’ in the ‘Bundle Items’ section set to ‘Together’.
If the version of your AdvancedStock module is older than v-1.1.15, you can simply update the module to the lastversion where a fix has been included.
Note
You can check the current module version by editing fileapp\code\BoostMyShop\AdvancedStock\composer.json
To get the last version of the module, log in to your BoostMyShop account, then go to sectionMy Downloads > ERP Inventory
To process an upgrade of the module, please take a look at the Upgrade documentation.
8. Backorders bulk update processMagento provides a native solution to bulk update the backorder setting from the Catalog > Products grid.
To do it, simply select products to update from the grid, then use the “Update attributes” mass action :
A new screen will be displayed, where you will be able to update any attribute for all products previously selected.
To find the backorders setting, go then to the “Advanced Inventory” tab.
98. FAQ
31
Note
At the top-right corner is located a “Store View” drop-down menu.
If you don’t change the default option selected (All Store Views), the backorders will only be updated for website“Admin”.
If you want to change the backorders setting for a specific website, please select it from the “Store View”drop-down menu before following next steps.
More informations : Product view - Stock settings per website
To update the backorders setting, please uncheck Use Config settings and check Change located just underit.
Then, select a new backorder setting using the drop-down list.
Once done, click on Save to apply changes to the selected product(s).
9. Stock take scanned items not consideredIt can happens that some products you added to a Stock take using the “Scan” function are then not correctlyconsidered, like they disappeared between the “Scan” screen and the Stock take “Scanned products” list.
The reason is probably some PHP settings not being enough increased to allow data of all scanned productsto be correctly transferred between the “Scan” screen and the database.
If you’ve got this problem, you will then need to increase these settings in your php.ini file (please ask a developperto process such operation).
Here are the values we recommend :
• post_max_size = 128M
• max_input_vars = 50000
• upload_max_filesize = 128M
10. Unexplained stock movement(s) “Quantity changed event”This kind of stock movement is created by the Stock discrepancies tool when a product available quantity is notmatching the sum of the available qty of all its warehouse available for sales (see Warehouses routing for moreexplainations about warehouses available for sales).
It usually happens when the product quantity is changed directly from the Magento product page, instead ofby creating a stock movement or doing it from any ERP screen.
Note
This occurs only is you have defined as “Primary” one of your warehouses.
More information : Warehouses configuration
As a reminder, when ERP is installed, product stock quantity should not be updated anymore from the “Qty”field available from each “Magento product view.
99. Technical resources
Command linesInventory management extension comes with a few command lines.
99. Technical resources
32
They can be executed in console mode using php bin/magento CMD, where “CMD” has to be replaced with oneof the available commands.
Warning
• If you get this error running one of the following command lines : “Area code is already set”
Please open the php file containing the command code (these files are located inapp\code\BoostMyShop\AdvancedStock\Console\Command\, and named as command lines names)
Then, find and replace the following line :
$this->_state->setAreaCode('adminhtml');
by :
try{ $this->_state->setAreaCode('adminhtml');}catch(\Exception $ex){}
Stock Discrepencies
php bin/magento bms_advancedstock:check_stock_discrepencies
Runs a report to check and display possible stock errors, available fromStores > Configuration > Boostmyshop > Advanced inventory > Stock discrepencies.
Note
You can also run this command line preceded by the same one with the --fix option at the end, to try to fix allerrors found :
php bin/magento bms_advancedstock:check_stock_discrepencies --fixphp bin/magento bms_advancedstock:check_stock_discrepencies
More information on the stock discrepancies different probes : Stock discrepancies documentation
Note
If you get a “memory exhausted” error executing the stock discrepencies command line, like :
Fatal error: Allowed memory size of XXX bytes exhausted (tried to allocate XXX bytes)
You can solve this problem setting a “-d memory_limit” instruction at the start of the php command line :
php -d memory_limit=2G bin/magento bms_advancedstock:check_stock_discrepencies --fix
If the problem persists, please increase the value from “2G” to an higher one, until it’s solved.
99. Technical resources
33
Fix Reservation
php bin/magento bms_advancedstock:fix_reservation
Check if there are some reservation problems (products over/under reserved).
Refresh Qty To Ship
php bin/magento bms_advancedstock:refresh_quantity_to_ship
Update products “quantity to ship” for all warehouses.
Refresh Sellable Qty
php bin/magento bms_advancedstock:refresh_sellable_quantity
Update products “Sellable quantity” in Magento, based on the quantity available in the different warehouses.
Refresh Sales History
php bin/magento bms_advancedstock:refresh_sales_history
Refresh products “Sales History” statistics.
Note
Statistics are NOT updated automatically by default, you have to create a cron task to automate this update.
Import Warehouse Stock
php bin/magento bms_advancedstock:warehouse_import --warehouse_id X --file_path /path_to_CSV_file/
This command executes the same import than the Warehouse stock import, but can be run with big import fileswithout timeout errors.
Simply replace “X” and “/path_to_CSV_file/” by correct values to run the import.
Note
For example :
• If the stock should be imported for the “Default” warehouse which ID is “1”
• If the CSV file containing stock to import is located in the var/ folder and is named“Warehouse_1_stock.csv”
The correct command line should be :
php bin/magento bms_advancedstock:warehouse_import --warehouse_id 1 --file_path var/Warehouse_1_stock.csv
99. Technical resources
34
Export Warehouse Stock
php bin/magento bms_advancedstock:warehouse_export --warehouse_id X --date YYYY-MM-DD
This command executes the same export than the warehouse stock export available from the Products tab ofwarehouse edit screen, but can be run with big export files without timeout errors.
Simply replace “X” and “YYYY-MM-DDD” by correct values to run the export.
The “date” setting is optionnal, meaning if not setting is provided the stock will be exported as it is at thetime of the export.
Note
For example :
• If the stock that should be exported in the one from the “Default” warehouse which ID is “1”
• If the stock should be exported how it was at June 12th, 2018
The correct command line should be :
php bin/magento bms_advancedstock:warehouse_export --warehouse_id 1 --date 2018-06-12
99. Technical resources
35
Recommended