Newbies innoplas Posted November 30, 2001 Newbies Posted November 30, 2001 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.
Vaughan Posted November 30, 2001 Posted November 30, 2001 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.
DykstrL Posted November 30, 2001 Posted November 30, 2001 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 ]
The Bridge Posted November 30, 2001 Posted November 30, 2001 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)
BobWeaver Posted December 1, 2001 Posted December 1, 2001 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)
Recommended Posts
This topic is 8394 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now