Hi,
I might have this well off- but I’ve got parts set up in my database, and these link to a kit part (which also link back to the part).
What I want to do is decrease the stock level based on the part qty value of that thing.
For example, part KIT1 can contain the kit_contents parts of P1 and P2, with a quantity of 1 P1 and 3P2’s. When I build KIT1, I want to increase the current stock of this part by 1 (easy enough), but then decrease the current stock of P1 and P2 by 1 and 3 respectively.
That’s a pretty poor explanation, but hopefully one of you geniuses can make sense of it.
At the moment, the method below just decreases each part by 1, regardless of the number in kitpart Qty.