November 30, 200124 yr Newbies We have an FM5.5 file we enter customer orders in. We want to improve its effeciency by being able to enter a number in the quantity ordered field and get the corresponding quantity discount price looked up from the product file. There may be 4 or five price levels based on quantity ordered. I can't figure out how to get the correct price into the customer order file from the product info file.
November 30, 200124 yr Hmmm this is a tough one. It might be better done with a script. Either way, map out the steps you'd do to perform the same task.
November 30, 200124 yr If all of the products have the same quantity break point, you could include in the product file a set of prices for the quantity discounts and do a Lookup to find the discount price. Each product could have a different price, but all products would have to break at the same quantity, i.e. 1-25, 25-50, 50-75, 100>, etc. Then it would be an easy matter of Looking up the price with this calcuation: Case(Quantity >= 25 and Quantity < 50,ProductList: : price2, Quantity >= 50 and Quantity < 75,ProductList: : price3, Quantity >= 75 and Quantity < 100,ProductList: : price4, Quantity >= 100,ProductList: : price5,Price1) [The last price1 will catch anything that doesn't match the other quantities] [ November 30, 2001: Message edited by: dykstrl ] [ November 30, 2001: Message edited by: dykstrl ] [ November 30, 2001: Message edited by: dykstrl ]
November 30, 200124 yr quote: Originally posted by dykstrl: Case(Quantity >= 25 and Quantity < 50,ProductList: : price2, Quantity >= 50 and Quantity < 75,ProductList: : price3, Quantity >= 75 and Quantity < 100,ProductList: : price4, Quantity >= 100,ProductList: : price5,Price1) [The last price1 will catch anything that doesn't match the other quantities] This is the approach I would take; you can simplify this calc even further by taking advantage of the fact that Case() will return the first "true" result: Case(Quantity < 50,ProductList: : price2, Quantity < 75,ProductList: : price3, Quantity < 100,ProductList: : price4, ProductList: : price5)
December 1, 200124 yr You can take this a step further. If each product has different price break points, you can store those quantities in the product file along with the prices and use this calculation case( qty<Products::BreakQty1,Products::Price1, qty<Products::BreakQty2,Products::Price2, qty<Products::BreakQty3,Products::Price3, Products::Price4)
Create an account or sign in to comment