Results 1 to 4 of 4
  1. #1
    Join Date
    Aug 2011
    Posts
    2

    Unanswered: 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

  2. #2
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    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.

  3. #3
    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

  4. #4
    Join Date
    Mar 2004
    Posts
    480
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •