Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Quantity Discounts

Featured Replies

  • 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.

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.

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 ]

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)

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

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.