Note that I also have another script inserting a date, so I can't format the field as a number field.
Why don't you use two separate fields - one for the amount, and one for the date?
You can use the Mod ( number ; divisor ) function to (a) add a final zero if the modulus has only one number and (b) add two zeros if it has none. I have created a custom function which achieves this.
Try this calcuation when inserting, replacing the n=number with n=amount to enter:
p = 2;
Sep = "," ;
Nbr = Abs ( Round ( n; p ) )
Case ( GetAsNumber (n) < 0; "-" ) &
Substitute ( NumToJText ( Int ( Nbr ); 1; 0 ); ","; Sep ) &
Choose ( p ≤ 0; Filter ( 1/2 ; ".," ) &
Middle ( Nbr - Int ( Nbr ) & Substitute ( ( 10 ^ p ) - 1; 9; 0 ); 2; p ) )
This works great! Thanks Christine!