Hi,
I was looking for some help with how i would go about setting up my commission table.
Basically i have currently:
Users Table
UserID
Username
Password
Email
Clients Table:
ClientId
Client_UserID
FirstName
LastName
Address
PostCode
Tel
Email
Insurance Table:
InsuranceID
Clients_ClientID
Provider
Commission
DatePaid
CarInsurance Table:
CarInsuranceID
Clients_ClientID
Provider
Commission
DatePaid
I want to setup a commission table to track commission due for a user and list the provider and client name.
I am not sure if i should have a UserID column in my insurance tables for this to work?
Could anyone advise on what my structure should be?
I need to query it by dates.
So in the website the user needs to be able to filter the results based on month and year.
So show how much they have made in 2010 or show how much they have made in just the month of April.
Also if possible show how much is due to come in.
So if the datepaid column is null then show the total commission due in, then once it is paid it will change to show paid.
Hope someone can help me with this, appreciate your help.
Many thanks