Sorry if I explain badly.
I am in the process of making a reservation system for drinks tastings.
Instead of a traditional shop are products here test activity. These have limited number of places. And this is what I am about to create a system for.
The idea is that the system should see how many booked places an activity has.
Example: If the existing value in the column ”Provning.ProvningPlatserBokade” is 5 and the value in the column ”Bokning.BokningAntal” is 2, then the value in ”Provning.ProvningPlatserBokade” should increase to 7 - after Admin has confirmed (therefore update post, and not insert).
And when the next booking is approved by admin, the value in the column ”Provning.ProvningPlatserBokade” will increase by the value associated with that booking. So I have to add this value (that's why I've written ++). On the contrary, when Admin confirms a cancellation - the value from "Bokning.BokningAntal" is subtracted to ”Provning.ProvningPlatserBokade”.
All activities have a maximum number of places available. Admin choose this in the column "Provning.ProvningPlatser".
When the number of places (Provning.ProvningPlatserBokade) is the same as (Provning.ProvningPlatser), it is no longer possible to book that activity. I have already done this.
I hope you understand what I mean.