AnsweredAssumed Answered

What is the logic for assigning a decmal for a dollar?

Question asked by Kirk_1 on Aug 28, 2012
Latest reply on Aug 30, 2012 by philmodjunk


What is the logic for assigning a decmal for a dollar?


Im displaying a number that i need to be in dollar form.

The current calculation yeilds the following number... 5995619956199561995619955.6. I need it to be $599.56.

I know i can do a left... but...

This number will never be the same. If the numbers that yeild this number are larger the dollare amount will be 4 figures...

EX. 13256989756326 would turn into $ 1325.69.

In this example my calculation is (58.78 * 1700) * 60.00. 

How do i set up the logic in script form to accomidate the varances?


More info... I have to search to get my discount_pct or the 60.00 in this instance. The number of vendors that this applies to varies so i did the following set varable:

     Case ( not IsEmpty ( $discount_pct ) ; $discount_pct & "¶" ) &

Case (
                $shipstatecalc = "~W"  and   $constatecalc = "~W" ; Discounts::DCustPerW_W ;
                $shipstatecalc = "~W"   and  $constatecalc = "~MW" ; Discounts::DCustPerW_MW;
                $shipstatecalc = "~W"   and  $constatecalc = "~E" ; Discounts::DCustPerW_E;

                $shipstatecalc = "~MW"   and   $constatecalc = "~W" ; Discounts::DCustperMW_W  ;
                $shipstatecalc = "~MW"  and   $constatecalc = "~MW" ;Discounts::DCustperMW_MW;
                $shipstatecalc = "~MW"   and   $constatecalc = "~E" ; Discounts::DCustperMW_E;

                $shipstatecalc = "~E"   and  $constatecalc = "~W" ;Discounts::DCustPerE_W ;
                $shipstatecalc = "~E"  and  $constatecalc = "~MW" ;Discounts::DCustPerE_MW;
                $shipstatecalc = "~E"   and $constatecalc = "~E" ; Discounts::DCustPerE_E;              


This finds the correct info and puts it into a portal.