If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > implement product discount

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 08-12-11, 00:10
razmyasdf razmyasdf is offline
Registered User
 
Join Date: Aug 2011
Posts: 2
implement product discount

hi everyone

I am working on a POS (Point Of Sale ) project. The database that i am using for this project is MySQL and programming language is Java

I wanted to implement a discount feature in the application
example

1 coke (330ml) = £0.69

if the customer bought 3 coke
actual total == £2.07

but the total price should be = £2.00
how do i implement in MySQL?

Thank you
Reply With Quote
  #2 (permalink)  
Old 08-12-11, 18:12
Pat Phelan Pat Phelan is offline
Resident Curmudgeon
 
Join Date: Feb 2004
Location: In front of the computer
Posts: 12,606
Is this example intended to be a manually entered arbitrary discount (keyed by the cashier), a flat percentage discount, a loyalty discount, or a quantity discount? Which of those types of discounts do you intend to eventually implement (more kinds of discounts rapidly increases the complexity of the database schema and the code to support those discounts).

-PatP
__________________
In theory, theory and practice are identical. In practice, theory and practice are unrelated.
Reply With Quote
  #3 (permalink)  
Old 08-12-11, 18:18
razmyasdf razmyasdf is offline
Registered User
 
Join Date: Aug 2011
Posts: 2
implement product discount

Quote:
Originally Posted by Pat Phelan View Post
Is this example intended to be a manually entered arbitrary discount (keyed by the cashier), a flat percentage discount, a loyalty discount, or a quantity discount? Which of those types of discounts do you intend to eventually implement (more kinds of discounts rapidly increases the complexity of the database schema and the code to support those discounts).

-PatP
Quantity Discount

if the customer bought 1 coke price will be £0.69
even if he/she bought 2 coke the price will be same

but if bought 3 the total should be = £2.00
meaning each coke will cost £0.66
Reply With Quote
  #4 (permalink)  
Old 08-13-11, 00:51
guelphdad guelphdad is offline
Registered User
 
Join Date: Mar 2004
Posts: 440
quantity discount explains it but not enough.

is that the only product sold? if not are all products the same price? it is easier to figure out if you know there is some discount like 2% applied for this reason or 5% applied when another reason is met etc.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On