2 Replies Latest reply on Feb 9, 2013 5:57 PM by schamblee

    How to round final invoice total

    Lucien

      Title

      How to round final invoice total

      Post

           Help anyone.

           With the disapearance of our Canadian penny, I would like to automatically round my invoce total. If last digist =.02 or .01. round to .00; if .03 or .04 round to .05   etc.  I tried the round;2 function but its not precis enough. Any suggestions would be appreciated.

           Thanks

           Lucien

        • 1. Re: How to round final invoice total
          RickWhitelaw

               Unless you're being paid in cash, there's no need to round. Pennies are still fine with debit, credit cards and cheques in Canada. 

          • 2. Re: How to round final invoice total
            schamblee

                 Here is a calculaion that may work for you.  This calculation only works with 2 decimal points.  75 will not return correctly 75.00 will.

                 Let([X=Right(amount;1);
                        l=Length(amount);
                        tc=amount;
                        td=Left(amount;l-3);
                        ta=Left(amount;l-1)];
                       GetAsNumber(Case(X<3;ta & "0";X>2 and X<8;ta & "5"; X=8 ; tc+.02;x=9; tc+.01))
                       
                 )