Hi. I'm building a tuition management software. I need to put 2 salary options (percentage, per hour) in the system. My problem is with the relationship. If I use percentage options, the software should count the salary based on this formula :
All the teachers get 10% of the monthly fee as their salary. Let's say a teacher teach a subject that costs $45 per month. There are 10 students studying the subject. 5 students in Class A and 5 students in Class B.
(10% x $45) x 10 students
My Relationship :
Students ->> Subjects Line <<- Subjects
Students ->> Students Payment
Teachers ->> Teachers Payment
Do you have any idea on how to calculate the salary automatically?
Which table should I put the 'fee per month, percentage, student payment' field?
I really need some idea for this. Thanks for your help . Really appreciate it.