Suitable table structure to distribute payments among different bank accounts

edgaro

Registered User.
Local time
Today, 15:12
Joined
Jul 11, 2015
Messages
22
Hello everyone and good day to you.

Please help me figure out an efficient table structure for this. Let's say I have a list of contractors who will get paid a certain amount of money each week. The amount of money changes each week by measuring the amount of work done, giving it a price and calculating it. The fields are these:
[pk]WeeklyWorkID
WorkID
Quantity
UnitPrice
Total=Qty*UnitPrice (not stored in this table)
EmployeeID
WeekID


So far, it's all good, but we wish to pay the contractors in an unusual way. Let's say he makes $16,000 of work this week, and we want to pay him using cash AND/OR either one or multiple debit cards. For example:
Cash: $1,500
Debit card 45: $7,500
Debit card 71: $4,000
Debit card 13: $3,000
Total = $ 16,000

We can only deposit $7,500 max in each card. But it's even worse... two or more contractors can SHARE the card and it's not always the same card. Sounds pretty funky, but it's what the company wants to do. So, what would you recommend me in this case?:confused:

I'm guessing I'm gonna need these tables: tbWeeks to hold the week number, tbCards to store the cards' info, and an extra table to make a many to many relationship between the cards and the employees. But I'm open to suggestions. Thank you in advance.
 
tblPayments
--------------
PaymentID
WeeklyWorkID
PaymentVehicleID (card, cash, pigs, oxen, virgins)
Amount

I guess an M_M table like above would deal with paying one contractor for one weekly job of one employee with one or more of the means stored in table PaymentVehicles :D
 
Hahaha nice, thank you for translating my nonsense into a clear path, man. Now I can see it was easier than I thought.

:D
 

Users who are viewing this thread

Back
Top Bottom