mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Bug 795142 - Unable to enter account codes in business sheets
In Bills, Invoices and Expense vouchers you can not enter an account code in an account field like you can on a normal register, enable this.
This commit is contained in:
parent
805094d570
commit
c9fd6832b8
@ -92,6 +92,8 @@ gnc_entry_ledger_get_account_by_name (GncEntryLedger *ledger, BasicCell * bcell,
|
||||
|
||||
/* Find the account */
|
||||
account = gnc_account_lookup_for_register (gnc_get_current_root_account (), name);
|
||||
if (!account)
|
||||
account = gnc_account_lookup_by_code (gnc_get_current_root_account(), name);
|
||||
|
||||
if (!account)
|
||||
{
|
||||
@ -116,13 +118,16 @@ gnc_entry_ledger_get_account_by_name (GncEntryLedger *ledger, BasicCell * bcell,
|
||||
if (!account)
|
||||
return NULL;
|
||||
*isnew = TRUE;
|
||||
|
||||
/* Now have a new account. Update the cell with the name as created. */
|
||||
account_name = gnc_get_account_name_for_register (account);
|
||||
}
|
||||
|
||||
/* Now have a new account. Update the cell with the name as created. */
|
||||
account_name = gnc_get_account_name_for_register (account);
|
||||
if (g_strcmp0(account_name, gnc_basic_cell_get_value(bcell)))
|
||||
{
|
||||
gnc_combo_cell_set_value (cell, account_name);
|
||||
gnc_basic_cell_set_changed (&cell->cell, TRUE);
|
||||
g_free (account_name);
|
||||
}
|
||||
g_free (account_name);
|
||||
|
||||
/* See if the account (either old or new) is a placeholder. */
|
||||
if (xaccAccountGetPlaceholder (account))
|
||||
|
Loading…
Reference in New Issue
Block a user