• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

problem with over 10

 
Ranch Hand
Posts: 233
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey all, I am having some issues with this formula that accepts bulkQuantities (which are numbers that are set to qualify for the bulkPrice, and quantities which are the number of items that I want. If I go over 10 and if the item qualifies for bulkQuantity then you can see that the formula takes that into account. What I am having a problem with is non bulk quantity items.

When I enter more than 10 for non bulkquantity items(some are not eligble for Bulk prices) it bombs with an java.lang.ArithmeticException: / by zero error. Other than that it works fine. I know that it has something to do with the fact that its either greater than 10 or not and there is not a formula for non bulk quantity items.

Any suggestions?

Here is the code:


Thanks in advance
[ October 06, 2006: Message edited by: Gabriel White ]
 
Gabriel White
Ranch Hand
Posts: 233
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sorry, figured it out.

Added a boolean and statement.

Done.
 
I am a man of mystery. Mostly because of this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic