Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

maths/code question...

  • 06-03-2003 11:10am
    #1
    Closed Accounts Posts: 5,500 ✭✭✭


    This post has been deleted.


Comments

  • Registered Users, Registered Users 2 Posts: 4,839 ✭✭✭Hobart


    Depends on the database system. The easiest way of doing it would to check if the number is divisable by 5 and that the result is greater than one. If that number is, for example 22, well then you would devide 22/5 getting 4.4. Round that number UP. This is possible in most DB systems and multiply the result by your minmum order no. ie 5. SO:

    Order 22
    Divide by Min Ord (22/5) = 4.4
    Check that result is greater than 1
    If it is then
    Round Result up (ie Roundup(4.4) = 5)
    Multiply by min ord (5 * 5 = 25)
    If not Send minimum order (5)

    OK.


  • Closed Accounts Posts: 5,500 ✭✭✭Mercury_Tilt


    This post has been deleted.


Advertisement