milkman2500
Registered User.
- Local time
- Yesterday, 23:45
- Joined
- Oct 21, 2012
- Messages
- 45
I'm trying to create a database that can store client, employee and sales data. I also need to have the database calculate the quarterly commissions the sales employees have earned.
However, the commissions are deferred over future quarters and I need the database to calculate future quarterly commission payments at the time of sale. The quarterly commission statements will reflect current actual and future estimated payments.
I have basic tables for client and employee information. The quarter and sale tables are where I am struggling. I only want to input the date the sale occurred, and I want the database to automatically calculate commissions and determine the quarters that require payments.
I'm comfortable with calculating dates, however I can't create relationships with calculated fields. Can someone please recommend an alternative?
Here are the tables:
tblClients:
However, the commissions are deferred over future quarters and I need the database to calculate future quarterly commission payments at the time of sale. The quarterly commission statements will reflect current actual and future estimated payments.
I have basic tables for client and employee information. The quarter and sale tables are where I am struggling. I only want to input the date the sale occurred, and I want the database to automatically calculate commissions and determine the quarters that require payments.
I'm comfortable with calculating dates, however I can't create relationships with calculated fields. Can someone please recommend an alternative?
Here are the tables:
tblClients:
[ClientID]
[ClientName]
[EmployeeID]
tblEmployees:[ClientName]
[EmployeeID]
[EmployeeID]
[EmployeeName]
tblSales:[EmployeeName]
[SalesID]
[ClientID]
[EmployeeID]
[SalesDate]
[SaleAmount]
[Commission]
[FirstQuarter] - is calculated from [SalesDate] and linked to QuarterID
[SecondQuarter] - QuarterID + 1
[ThirdQuarter] - Quarter ID + 2
[FourthQuarter] - Quarter ID + 3
tblQuarters:[ClientID]
[EmployeeID]
[SalesDate]
[SaleAmount]
[Commission]
[FirstQuarter] - is calculated from [SalesDate] and linked to QuarterID
[SecondQuarter] - QuarterID + 1
[ThirdQuarter] - Quarter ID + 2
[FourthQuarter] - Quarter ID + 3
[QuarterID]
[QuarterStartDate]
[QuarterEndDate]
Thanks.[QuarterStartDate]
[QuarterEndDate]