### Title

Inventory - How to?

### Post

I have three different tables on my database related to inventory:

- The products table -where stock amounts are stored
- A Line Items table -where quantity of each order is stored
- An the invoice table -where a portal shows product info and quantity ordered

The typical relationship for such tables is:

Invoice----<LineItems>-----Products

A calculation field in Products can use the sum function to compute the total ordered for each product. The sum function would look somthing like this: Sum ( LineItems::Qty ).

You can also define a summary field in LineItems that computes the total of Qty. If you place this summary field on your Products layout, it will compute the same total.

But how do you intend to add to your inventory totals when new product is received and/or manufactured?