Fixed amount formatting function

Hey dude,

I fixed that function, because quantities were missing zeroes. I made it behave similarly to the one in the Android Bitcoin client by Andreas Schildbach.