Process of creating invoices requiring human thought!
| From: | James Nunnerley | Date: | Tue, 28 Nov 2006 20:07:08 +0000 |
| Subject: | Process of creating invoices requiring human thought! | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-245245@lists.php.net to get a copy of this message | ||
Im creating an invoicing system for a childrens nursery, and Im trying to
work out how I can replicate the thought process one would normally go
through when working out the bill for each day.
Ive created all the mysql tables that I think I need, with all the info
possible; along the following lines (Im only showing whats relevant):
Child -> childId, starttime, endtime
Fees -> feeId, starttime, endtime, rate (£)
The easiest way to explain this is as follows:
The nursery fees are broken down into AM (8am to 12.30pm), PM (12.30pm to
6pm) and All Day (8am to 6pm), and furthermore theres an hourly rate for
extras.
Child A starts at 9 and finishes at 5 therefore they come under the all day
rate
Child B starts at 8.30 and finishes at 12pm therefore they come under the AM
rate
Child C starts at 9.30 and finishes at 1pm, and because its not a straight
they do AM, PM or All Day, theyll probably fall under AM, cos its
including lunch.
Can anyone see an easy way of putting that sort of human thinking into a
script? Any guidance would be gratefully received
Just to give a bit more background, there are two nurseries (at the moment)
and they have different session times, so the fees table does need to have
the starttime and endtime. :-(
Cheers
Nunners