two price

Kele

New member
Local time
Today, 16:16
Joined
Mar 3, 2015
Messages
5
Hello i have one question.. I have two price field in one table. price is dependent on is customer in our group or no.. so I want to made code that if statement is true field price get value from price group else price get value from other field.

i have two tables one is prices one is orderdetails.. end in orderdetails have field price end want thah this field get value from prices field dependent of group policy..

i hope thah you understand me, my english is not so good.
 
Yours is not the proper way of storing conditional price data.

You should store each price in one record, together with all the applicable conditions.

So:

tblPrices
----------
PriceID (PK)
Price ( the actual price)
GroupID (Id of teh goup for which price is valid)
(maybe other conditions)
 
my table is
tblprice
id
name_destination
date_arriv
date_depart
price_regualr
price_group
gruop --Yes/no

Order_details
id
id_prices
price
day_number
installments
value
value_Installments
 

Users who are viewing this thread

Back
Top Bottom