May 01, 2024 02:37 PM
I am looking at a way to deplete inventory of items when adding a kit to inventory. For example:
I have 1 kit that contains 2 A's 4 B's, and 1 C. SO when I add a kit to my inventory, it removes 2 A's, 4 B's, and 1 C.
How would I make this work? Thank you for any help.
May 01, 2024 07:02 PM - edited May 01, 2024 07:03 PM
You're going to need a junction table where each record represents a single item linked to a single kit, and contains the quantity of the item in that kit
After that, it depends on how you're tracking your inventory, really. Personally I favour having a "Movements" table where each record represents a single item, the quantity moved, direction (in or out) and linked to the item's record in an "Inventory" table, and then I use rollups to sum up the quantity
With that method, I have an automation that'll look for all the records in the junction table that are linked to the kit and create one record for each of them to the "Movements" table, which updates my "Inventory" count appropriately
May 02, 2024 06:51 AM
Thanks, still not clear on the "Movement" table though.
May 03, 2024 04:22 AM