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:
- He gives $5 to A,(Balance left= $25- $5=$20).
- He gives $10 to B,(Balance left= $20- $10=$10).
- 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.