Skip to content

Commit

Permalink
[register] Checkbox any value other than 0x20 (ASCII space) is true.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
jralls committed Mar 10, 2022
1 parent 38b557d commit 301b900
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion gnucash/register/ledger-core/gncEntryLedgerModel.c
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion gnucash/register/register-core/checkboxcell.c
Expand Up @@ -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);
Expand Down

0 comments on commit 301b900

Please sign in to comment.