Agreed. Store the price the product was sold at in your orderitem table.

> You conceptually have 2 different prices
>
>       1 The Current Price usually stored in the Product File
>
>       2 The Order price (The Current Price when this order was filled)
> usually
>               stored in an order item file along with Qty (extended Item
> Amount Optional)
>
>
> 1. is a status field and can change at any time
>
> 2. Is a history field and "Never" changes *
>
> + Order adjustment transactions (separate transactions) are used to
> correct errors in 2 (and preserve an audit
> trail)
>
> If you store completed orders in the DB the order items should carry
> price 2
>
> HTH
>
> Dick
>
>
>
> On Sunday, March 31, 2002, at 04:38  PM, Kola Oyedeji wrote:
>
> > Hi
> >
> > I have a table which holds orders. The productid and the quantity of
> > items
> > purchased are held in this table amongst other things such as the order
> > date, customer id etc. Orders are calculated by getting the product
> > cost and
> > multiplying it by quantity. Its occured to me that if the price of items
> > changes,because the total of an order is always calculated the order
> > total
> > for previous orders will change. IS there any better way to store
> > orders and
> > price info or should I also store the current price of each product
> > when the
> > order is made in the order table - wouldn't this lead to data being
> > duplicated?
> >
> > Thanks in avance
> >
> > Kola
> >
> >
> 
______________________________________________________________________
Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists


Reply via email to