Inventory Line Items to update a Master Inventory Sheet

Hi There,

Given a user inserts into table STOCKING with a form. How can I

  1. if SKU/Location doesn’t exist: insert into table INVENTORY
  2. if SKU/Location exists: update table INVENTORY CURRENT_QTY and LAST_STOCKING_ID

Table: STOCKING

|STOCKING_ID |STOCK_DATE_TIME   |SKU       |LOCATION_ID| STOCK_QTY| USER|
|PfclXrwJ    |4/21/2019 14:01:01|agt48bw   |22         | 4        |  a@a |

Table: INVENTORY

|SKU|LOCATION_ID|CURRENT_QTY|LAST_STOCKING_ID|
| --- | --- | --- | --- |

Please and thank you!

0 1 1,053
1 REPLY 1
Top Labels in this Space