mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
797318 - Amounts ending in zero displayed as fractions
This commit is contained in:
parent
bedc9631f8
commit
4a8350ece2
@ -1606,6 +1606,8 @@ PrintAmountInternal(char *buf, gnc_numeric val, const GNCPrintAmountInfo *info)
|
||||
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);
|
||||
|
@ -1073,6 +1073,7 @@ gnc_numeric_to_decimal(gnc_numeric *a, guint8 *max_decimal_places)
|
||||
{
|
||||
int max_places = max_decimal_places == NULL ? max_leg_digits :
|
||||
*max_decimal_places;
|
||||
if (a->num == 0) return TRUE;
|
||||
try
|
||||
{
|
||||
GncNumeric an (*a);
|
||||
|
Loading…
Reference in New Issue
Block a user