797318 - Amounts ending in zero displayed as fractions

This commit is contained in:
jean
2020-04-04 13:04:37 -07:00
parent bedc9631f8
commit 4a8350ece2
2 changed files with 4 additions and 1 deletions

View File

@@ -1605,7 +1605,9 @@ PrintAmountInternal(char *buf, gnc_numeric val, const GNCPrintAmountInfo *info)
*buf = '\0';
return 0;
}
// Value may now be decimal, for example if the factional part is zero
value_is_decimal = gnc_numeric_to_decimal(&val, NULL);
/* print the integer part without separators */
sprintf(temp_buf, "%" G_GINT64_FORMAT, whole.num);
num_whole_digits = strlen (temp_buf);