Bug 721196 - Cannot import lines with empty fields for deposit or withdrawal in bank transaction download.

Empty numeric fields are assumed to be 0.0 values.
This commit is contained in:
Mike Evans 2014-03-16 10:58:28 +00:00
parent d1cbddc929
commit 67d90c90cc

View File

@ -663,7 +663,12 @@ static gboolean trans_property_set(TransProperty* prop, char* str)
case GNC_CSV_DEPOSIT:
case GNC_CSV_WITHDRAWAL:
str_dupe = g_strdup(str); /* First, we make a copy so we can't mess up real data. */
/* If a cell is empty make its value = 0.0 */
if ( strcmp(str_dupe, "") == 0)
{
g_free(str_dupe);
str_dupe = g_strdup("0.0");
}
/* Go through str_dupe looking for currency symbols. */
for (possible_currency_symbol = str_dupe; *possible_currency_symbol;
possible_currency_symbol = g_utf8_next_char(possible_currency_symbol))