/* HomeBank -- Free, easy, personal accounting for everyone.
- * Copyright (C) 1995-2016 Maxime DOYEN
+ * Copyright (C) 1995-2017 Maxime DOYEN
*
* This file is part of HomeBank.
*
gdouble hb_amount_to_euro(gdouble amount)
{
- return hb_amount_round((amount / PREFS->euro_value), 2);
- //return hb_amount_round((amount * PREFS->euro_value), PREFS.minor_cur->frac_digits);
+ return hb_amount_round((amount * PREFS->euro_value), PREFS->minor_cur.frac_digits);
}
if(cur != NULL)
{
monval = hb_amount_round(value, cur->frac_digits);
- g_ascii_formatd(formatd_buf, outlen, "%0.f", monval);
+ g_ascii_formatd(formatd_buf, outlen, "%.2f", monval);
hb_str_formatd(outstr, outlen, formatd_buf, cur, TRUE);
}
}
{
cur = &PREFS->minor_cur;
monval = hb_amount_to_euro(value);
- g_ascii_formatd(formatd_buf, outlen, "%0.f", monval);
+ g_ascii_formatd(formatd_buf, outlen, "%.2f", monval);
hb_str_formatd(outstr, outlen, formatd_buf, cur, TRUE);
}