Hi all,
I have a system and I'm a little stuck. It's a booking system.
It has rooms, etc and every room have a daily price.
Then it has special daily rates when assigned.
How do I calculate the total cost of a room if a daily rate exists?
Eg.
Room 1 = £10 per night
Customer booking between 20/09/2009 - 25/09/2009
Rate Set @ 4.99 per night between 21/09/2009 - 23/09/2009
Total should be: £34.97
Rates Database = start=unix_time , finished=unix_t ime, price=4.99
Booking Database = customer, checkin=unix_ti me, checkout=unix_t ime, room_id
3 3071
Nevermind!
All fixed now!
dlite922 1,584
Recognized Expert Top Contributor
Post the solution so that others can benefit.
Thanks
Dan
What I did was first get the total amount of days they're staying.
Then got the total amount of days the special rate is on for.
Then I looped through the rate days to check if any of dates matched that of when they we're staying. If true, added prices to a RatePrice variable and increased a TotalRateDays.
Then I just calculated the total days of stay's price
Worked out how much less it is with (TotalRateDays * RoomRate)
Then added on the RatePrice
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Dave Robinson |
last post by:
I was wondering if anyone could help me with a problem I'm having.
I've been using Dreamweaver to create a hotel booking system for a
friend of mine, using MySQL (version 4.0.21) and PHP 5. The bit I'm
struggling with is checking the Room Availability based on dates that
are typed into a textfield and then returning a list of the available
rooms on the next page.
The three tables involved in this function are:
CREATE TABLE `room` (
|
by: PaulD |
last post by:
Can anyone point me in the direction of a sample Access booking
system? Trying to build a booking system were customers can book a
computer by date and timeslot, each timeslot having a limited amount
of computers.
Cheers for anyhelp, pointers given.
PaulD
|
by: Andy |
last post by:
Hi folks
I teach. At school, four IT rooms are booked using a paper based outline
timetable. Completing it is easy but basic and impossible to ensure
completion of all fields (name, year group, subject and software) and
analysis of bookings is a nightmare.
I just fancied pottering with Access, which I am pretty familiar with, to
see if I could create a means of booking a room using a database. Locking a
booking would then be a...
|
by: Ray Pearson |
last post by:
Hi there
Can anyone help me with the logic that I require please?
I operate a Bed & Breakfast business and one aspect of the business
that I have not been able to complete in the programme which I have
developed is one for when to change the linen etc.
The criteria is as follows –
|
by: bredal Jensen |
last post by:
Hello gurus,
I'm building a small booking system and i have come accross quiet a tedious
pitfall.
"I need to make sure that people do not book for tomorrow when todays time
is greater or equal to 11."
| |
by: thegame21 |
last post by:
Hi, I am currently creating a cinema system using access where a
booking can be made for a event. Each event when it is shown is
categoriesd as a performance. A booking must be made for each
performamce. I have a constructed a query between the booking, event
and peformance tables and created a subform on the booking form. The
event table is linked to the performance table which in turn is linked
to the booking table. I keep on getting the...
|
by: simba |
last post by:
Hello,
I am currently doing a project which requires me to develop an online booking system for hotels and integrate both bed and room booking. I have the room booking working but I cant seem to get the bed booking working. I have dorm rooms with 8 beds in them and I would like to have a query(or something) which allows me to make the dorm rooms bed booked instead of room booked. Anyone any ideas on how to make this happen, anything would be...
|
by: =?Utf-8?B?cGF0cmlja2RyZA==?= |
last post by:
Hi everyone!
I'm writing a booking system website,
which needs a seat selection algorithm,
my question is,
if a user clicks on a seat (temporarily booking that one),
how will the other users navigating on the same row of seats know that the
previous user has already booked a specific seat?
Perhaps a messaging system?
|
by: Armenante |
last post by:
Hi,
I am creating a database for my A level project and i am stuck on the validation for the booking part of the database, and was just wondering if anyone could help me out? It is a plumbing booking and stock database in the booking section I have start date, start time and duration field. I want to add validation on the start date field as an after update event. Any ideas would be extremely helpful. Thank you.
Tom
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| | |