Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Invoice / Item relationship question

Featured Replies

Hello. It has been a while since I was here - good to be back.

 

I have a following question about an invoice solution.

 

Background: Creating an invoicing solution for myself to keep track and run statistics for English lessons, students and teachers.

 

Before I start the following is not clear to me, I have the following items:

 

Lessons | Students | Teachers | Schools

 

The invoice will be monthly generated, what I am having trouble deciding on is how to relate the above...

 

The Teacher teaches any number of lessons in a month. Each lesson is set in duration and cost so I am thinking that Lessons should be an Item table and the Teacher should be a Customer table. Easy enough to relate the two but I get confused by Students. Should a Student table be another Item table or a Customer table?

 

For example:

 

Month: January     Teacher: X

 

1. LessonA 1hr StudentX 2000

2. LessonB 2hr StudentY 4000

 

Basically the above is what I want to have in my invoice, hope it is clear from the example.

 

I am thinking of doing the following tables and relationships:

 

Lessons_Item | Join_Table | Invoices | Customers | Students

 

Lessons_Item::Item.ID = Join_Table::Item.ID

Join_Table::Invoice.ID = Invoices::Invoice.ID

Invoices::Customer.ID = Customers::Customer.ID

 

I am getting lost as how to or where to insert the Students table into the above relationship, should it be on the invoice side or the customer side...

 

Any help is greatly appreciated.

 

Thanks & Happy New year...

  • Author

Hi, I just went ahead and have added the Students table on the side of Items - seems to be working ok. If I am wrong please let me know.

 

I however ran into a new issue; One lesson can have multiple students or a single student, not sure how to set that up.

Should I set a separate table where I assign students to a lesson so have something like:

 

 

 

Month: January     Teacher: X

 

1. LessonA 1hr StudentX 2000

2. LessonB 2hr StudentY 4000

                         StudentX

                         StudentM

 

Thanks

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.