Results 1 to 3 of 3

Thread: [RESOLVED] brain.....cant....figure....out

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    May 2005
    Posts
    307

    Resolved [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.

  2. #2
    PowerPoster Pasvorto's Avatar
    Join Date
    Oct 2002
    Location
    Minnesota, USA
    Posts
    2,951

    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.

  3. #3
    Don't Panic! Ecniv's Avatar
    Join Date
    Nov 2000
    Location
    Amsterdam...
    Posts
    5,343

    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..)

    BOFH Now, BOFH Past, Information on duplicates

    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
  •  



Click Here to Expand Forum to Full Width