[register] Checkbox any value other than 0x20 (ASCII space) is true.

Because it can be X or U+2716 now and could be something else
in future.

Fixes in particular the disappearing tax-included and tax-table
in the Invoice/Bill entry register.
This commit is contained in:
John Ralls 2022-03-06 11:33:28 -08:00
parent 38b557dfea
commit 301b9009a0
2 changed files with 2 additions and 2 deletions

View File

@ -348,7 +348,7 @@ gnc_entry_ledger_get_taxable_value (VirtualLocation virt_loc,
const char *valstr =
get_taxable_entry (virt_loc, translate, conditionally_changed,
user_data);
if (valstr && *valstr == 'X')
if (valstr && *valstr != ' ')
return TRUE;
}
return FALSE;

View File

@ -51,7 +51,7 @@ gnc_checkbox_cell_set_value (BasicCell *_cell, const char *value)
CheckboxCell *cell = (CheckboxCell *) _cell;
gboolean flag = FALSE;
if (value && *value == 'X')
if (value && *value != ' ')
flag = TRUE;
gnc_checkbox_cell_set_flag (cell, flag);