Results 1 to 3 of 3
  1. #1
    Join Date
    Dec 2008
    Posts
    53

    Unanswered: shop database structure - corrective invoice

    I have that database structure (I can change it):

    ORDERS
    id
    id_customer
    price
    date_order

    POSITIONS_ORDER
    id
    id_order
    id_product
    price
    quantity
    rebate
    vat

    INVOICE
    id
    id_order
    invoice_number
    date_invoice

    CUSTOMERS
    id
    name
    surname

    PRODUCTS
    id
    name
    price



    But what about a corrective invoice ? I will be doing PDFs based on data in this database. In the corrective invoice I must have old values and new values, for example when customer order first 5 oranges and then he said that he wants only 1 orange so i must write that (old and new quantity) in the corrective invoice. But when I modify in table quantity in table POSITIONS_ORDER I won't have old quantity. So how should I make database structure ?
    Last edited by chomik; 05-14-10 at 13:17.

  2. #2
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    >So how should I make database structure ?
    Third Normal Form
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

  3. #3
    Join Date
    Dec 2008
    Posts
    53
    Now I have 3. normal form........
    http://img35.imageshack.us/img35/9062/beztytuubtc.jpg
    Last edited by chomik; 05-14-10 at 13:44.

Posting Permissions

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