# Implement a restaurant management system

I want to build a restaurant management system, in that restaurant let’s say there is only 1 Manager for now and 3 employees(i.e. A,B,C), are working under him. Now at the end of the day, the manager receives a total tip of let’s say \$25 from the restaurant owner, and it is to be distributed among the 3 employees. Now the manager performs actions as follows:

1. He gives \$5 to A,(Balance left= \$25- \$5=\$20).
2. He gives \$10 to B,(Balance left= \$20- \$10=\$10).
3. He gives \$6 to C,(Balance left= \$10- \$6=\$4).

and the manager is left with \$4, now how to implement this logic, Can you suggest any videos or articles.

i have implemented the same logic in glide, but the tip amount is detected from the employee account rather than the manager.

here is the solution:

1. form a 1-many relations in the same sheet. (choose a common column, that differentiates the employees it could be company name, team name, group name etc.)
2. create a column where you can put the values to be used to subtract. (eg. \$20-\$10, here \$10 can be used to create a separate column)
3. use the rollup and select the relation column which you want to summarize.