|
-
Jul 20th, 2005, 07:21 AM
#1
Thread Starter
Hyperactive Member
[RESOLVED] brain.....cant....figure....out
i cant figure out how im going to do this.....
im writing a dvd rental system....ive put all the items im going to rent out in a listview, then i threw it in a loop so that it can go into my hireout table. (which is working according to plan).
now im stuck coz the client im writing this for wants a record of how much money is spent. so i have the fields:
amountdue, amountpaid, changegiven, paymentmethod.
but if i put this fields in the hireout table and put them in the loop as well....then it will come up more than once. meaning if i rent out 5 dvds, then the amountdue, amountpaid, changegiven, paymentmethod will be saved 5 times.
then i though about creating another table to save these in, but how will i then link the hireout table to this table? or maybe someone can help me find a better solution.
reason client im writing system for wants these fields saved is coz he wants to know over a period of lets say 4 months how much money the client who is renting has spent with him. and upgrade them to silver, platinum whatever status.
-
Jul 20th, 2005, 07:44 AM
#2
PowerPoster
Re: brain.....cant....figure....out
You could create a transaction table that would have the trans# and the amounts and the customer #. You could also include the transaction in the hireout table that would link it to the trans table. Just a thought.
-
Jul 20th, 2005, 10:14 AM
#3
Re: brain.....cant....figure....out
You can use a stock control system (see search ont he top for Szlamanys ideas on that) which would work.
Or you could keep the stock, rental bit separate to the accounts part.
So the person hires five dvds. They get marked out as hired to that person. On the accounts side an amount is added to the to be paid column. Or if you use a bank like transaction, then you can only add in amounts (positive or negative) with a transaction code + text info for descriptive reasons.
Then for total amounts due, sum them all
Loads of ways - you have to chose the best (or even better if it is a school project thing) try all and say which is best and why (easy to make, easy to update/keep, easy to code/set up etc..)
Feeling like a fly on the inside of a closed window (Thunk!)
If I post a lot, it is because I am bored at work! ;D Or stuck...
* Anything I post can be only my opinion. Advice etc is up to you to persue...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|