There are more than one option for doing this. I prefer to set up the lineitems table for a typical invoice as a "ledger" where a Qty added to inventory is entered in an "in" field and items sold (or removed from inventory for other reasons are entered in an "out" field. The Qty field in the typical lineitems portal would then be this "out" field.
You'd then add these additional fields to LineItems:
Description ( text, records reason for inventory change, "Sale", "Shrinkage", "Return", etc.)
cBal ( calculation: QtyIn - QtyOut )
srBalance ( Summary : Total of cBal, running total, restart totals with each productID )
sBalance ( Summary : Total of cBal )
This enables you to set up a list view layout that looks like an accounting ledger but enables you to not only see the current inventory levels for each item, but how they have changed over time--useful for adjusting re-order points.
A script can check these inventory totals when either the invoice or a line item is committed to remove items with zero on hand, but I wouldn't actually delete them if I were you, I'd set a value that marks them as "deleted" so that they can be excluded from reports, portals and value lists. After all, that chicken might just lay a few more eggs or a customer might return one to you and then you'll need the product record you just deleted.