-
Update by csv
When we upload csv, only update (replace the quantity) catalog_supplier_stock
catalog_warehouse_stock (own stock) | catalog_supplier_stock( supplier stock) | reserved | available stock |
---|---|---|---|
10 | 10 | 0 | 20 |
csv: GR843EL85HVILAVEN-68580:3
catalog_warehouse_stock (own stock) | catalog_supplier_stock( supplier stock) | reserved | available stock |
---|---|---|---|
10 | 3 | 0 | 13 |
2 Update by Webservice
curl -X POST -H 'Content-Type:application/json' -d '{"skus":[{"sku":"GR843EL85HVILAVEN-68580","quantity":"1","source":4}],"key":"ebbb2e77befbf548373597477603431db59ba51f"}' https://userauth_basic:[email protected]/stock/webservice/update-stock/ -v
The data is like this '{"sku":"GR843EL85HVILAVEN-68580","quantity":"1","source":2}'
if (source == 2 ) add that quantity to catalog_warehouse_stock Example:
catalog_warehouse_stock (own stock) | catalog_supplier_stock( supplier stock) | reserved | available stock |
---|---|---|---|
10 | 10 | 0 | 20 |
update {"sku":"GR843EL85HVILAVEN-68580","quantity":"1","source":2}
catalog_warehouse_stock (own stock) | catalog_supplier_stock( supplier stock) | reserved | available stock |
---|---|---|---|
11 | 10 | 0 | 21 |
if (source == 4 || source==1 ) Extract stock quantity from catalog_supplier_stock and add that quantity to catalog_warehouse_stock Example:
Before webservice
catalog_warehouse_stock (own stock) | catalog_supplier_stock( supplier stock) | reserved | available stock |
---|---|---|---|
10 | 10 | 0 | 20 |
update {"sku":"GR843EL85HVILAVEN-68580","quantity":"1","source":4}
after webservice
catalog_warehouse_stock (own stock) | catalog_supplier_stock( supplier stock) | reserved | available stock |
---|---|---|---|
11 | 9 | 0 | 20 |
3 Sync stock by Webservice
curl -X POST -H 'Content-Type:application/json' -d '{"skus":[{"sku":"GR843EL85HVILAVEN-68580","quantity":"1"}],"key":"ebbb2e77befbf548373597477603431db59ba51f"}' https://userauth_basic:[email protected]/stock/webservice/sync-stock/ -v
This webservice only replace the quantity of catalog_warehouse_stock table
Before webservice
catalog_warehouse_stock (own stock) | catalog_supplier_stock( supplier stock) | reserved | available stock |
---|---|---|---|
10 | 10 | 0 | 20 |
update {"sku":"GR843EL85HVILAVEN-68580","quantity":"8"}
after webservice
catalog_warehouse_stock (own stock) | catalog_supplier_stock( supplier stock) | reserved | available stock |
---|---|---|---|
8 | 10 | 0 | 20 |