Topic: Paying one or many bills at one time in a night club.

I am writing an app for a nightclub. Each customer gets a docket every time he orders a drink/s and this is placed in a cup. The customer may or may not be known. When it comes time to pay, he may pay all his bills and maybe some for his friends, or they may decide to split the bills and pay separately. The customer may have a discount card and some of the bills may be complimentary. There may also be a commission agent who brought the customer into the nightclub.

A bunch of bills may be paid at one time. There is no way to identify a single customer, table or seats. There may be a need to apply a discount card to all or some of the items in the bills. The bills need to be summed at the time of payment, any discount cards recorded, on the house applied and the customer may only part pay the total amount, leaving a balance for a future date. A customer name, if known may also be recorded. Other details that will be recorded are the waitress serving and maybe a staff member for who a drink was paid and the staff member will receive commission for the drink.

I am inclined to apply a transaction but want to apply all the data to the individual bills and do the reporting from the bills themselves, except maybe for outstanding amounts owing. There is no particular identifying attributes to apply to the transaction so it doesn't really need to persist, except possibly to record outstanding amounts owing.

What's going to be my best strategy to handle this?

Re: Paying one or many bills at one time in a night club.

Wow that's a massive question. Without doing a full Analysis job on this (You ain't paying enough lol! smile ) I would take the approach of using temporary records in a table maybe called something like bill_transactions?) You then have full reporting options on the temporary data then once the process is complete move the temp records into the main tables in a db transaction. Maybe even create a separate db for this?

What you want and what you need are too often not the same thing!
When your head is hurting from trying to solve a problem, stop standing on it. When you are the right way up you will see the problem differently and you just might find the solution.
(Quote by me 15th July 2009)