473,385 Members | 1,661 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Updating price information and displaying previous price for restaurant menu

I have a program with restaurant menu and 3 food items..
in the program i can choose the food and update the price for multiple times..
And at the same time, i have sales report reporting price of each units and total..

But the program allow to update price at any time, i need the program to show previous price and show recent price...How is it? What functions should i use?

the sales report should look like this..
Total Sales:
Muffin: 16 $32.00
Muffin: 2 $10.00
Muffin: 3 $30.00
Shake: 0 $0.00
Coffee: 0 $0.00
-----------------------
16 $32.00

for now i have already finished the coding..but i need to produce something can update price and previous price is keep...like example above...anyone ideas?
Mar 27 '10 #1
1 1389
pbrockway2
151 Expert 100+
One way would be to have a class representing a Price. That class could have an accessor method getPrice() returning a double value for use in arithmetic by the caller. But it could also offer getPreviousPrice() returning the value before the most recent change.
Mar 27 '10 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: | last post by:
Hello, Sorry to ask what is probably a simple answer, but I am having problems updating a table/database from a PHP/ PHTML file. I can Read From the Table, I can Insert into Table/Database, But...
0
by: Fat Bloke | last post by:
Not very good at this... A friend has asked me to do his restaurant menu. This has several sections - Starters, Main Courses, Vegetarian, etc, each section having different items within it. ...
15
by: Colin | last post by:
I have a query that calculates the selling price of products on customer orders. Selling prices are calculated based on the average cost of the items when purchased. As I make new purchases, the...
5
by: Ryan Ternier | last post by:
I'm having an issue with an SQL insert statement. It's a very simple statement, and it's causing too much fuss. strSQL = "INSERT INTO tblFieldLayouts(TypeID, FieldID, OrderID, Hidden) VALUES("...
0
by: cwbp17 | last post by:
I'm having trouble updating individual datagrid cells. Have two tables car_master (columns include Car_ID, YEAR,VEHICLE) and car_detail (columns include Car_ID,PRICE,MILEAGE,and BODY);both tables...
5
by: HandersonVA | last post by:
should I set to "0" as a default value on a quantity and a price field or set to "null"? if a user enter nothing on the quantity or price field on a web browser, should I treat it as null or "0"?...
1
by: HarpoleAndWhite | last post by:
I am trying to put together a point of sale system for a restaurant. On the servers menu, I would like to have command buttons that on their click event load a secondary form onto the servers menu...
2
by: PhilOwens | last post by:
Morning/Afternoon all, Having slight problem with showing users the progress of a query..... Bit of background....The database allows users to view the status of documents i.e. Completion date,...
2
by: Brian Kendig | last post by:
I'm trying to make a web page with a restaurant menu on it. Each line on the menu is the name of a dish (left-justified) and that dish's price (right-justified), with a dotted line between them....
3
NawazAhmed
by: NawazAhmed | last post by:
Hi, I was trying to insert new node and data into the xml file. Let say If I am inserting the data from page1 at line 4 and displaying the inserted data at line 5, its displaying it perfectly but...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.