# Help to make calculaions

I developed an app to manage the stock of one product. Now I need that app to have the capacity to manage more than two identical products, but I would like to do all this on the same app.

When the product enters in stock, the price and the quantity in kg is inserted, however I have some variable parameters for each one of these products:

- If the product is too green it's discounted a percentage from the price
- If the product is too ripe it's discounted a value per kg
- If the product is delivered within a certain date the price is one, if it is delivered after that date it is cheaper (the price 1 and 2 are always the same )
- The product can have a bonus on the total of the document if the quality is good (the bónus is ever the same value). And it can have more than one bonus.
- In some cases the discount will be done over a calculation previously done based on one of the previous conditions (e.g. after the discount for being too green)

I have thought about using a formula scheme but I got a little bit lost. I would appreciate any idea to help.
###### Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

CIOCommented:
There is no smart method.
All you can do is to record the conditions for each product, then - product by product - walk through the calculations you partially have described, and you will end up with the final price for each product.

/gustav
0
Commented:
I agree there really is no "smart" method.

You need to think through which is the first one to test.

Does one of the criteria take precedence?

Are the discounts cumulative?

Some criteria are exclusive eg too green or too ripe.  Maybe could test them together if the discounts are the same or test 1 but only test the other if the first test fails.

THe best method would be to layout all the tests on paper then see which can be combined.

Are the conditions different for different products or just the values of the tests?

mlmcc
0

Experts Exchange Solution brought to you by

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

###### It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic.NET

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.