A different approach for this is to use an Inventory Log. It works like a check register to track each change in inventory as a separate record for each such transaction. With that approach your Line Items table can function as the Inventory Log and your inventory levels are also computed automatically. If your are interested in that approach search this forum for Inventory Log and you'll find several threads.
Alternatively, you could have several fields in your products table:
Total Received (Number)
Total Sold (calculation, Sum ( LineItems::Qty )
On Hand ( Calculation, Total Received - Total Sold )