* src/business/business-ledger/gncEntryLedger.c: fix a bug where

if you unpost an invoice and don't bring the TaxTables up to
	  date, the total value shown in the register is different
	  dependending on whether the cursor is on the current line or
	  not.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@8434 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Derek Atkins 2003-05-29 02:50:40 +00:00
parent caeeb3c546
commit 1527f0526a
2 changed files with 22 additions and 4 deletions

View File

@ -3,7 +3,13 @@
* src/business/business-core/gncTaxTable.c: when asking for
the child, return ourself if we're already a child instead
of making a (useless) grandchild.
* src/business/business-ledger/gncEntryLedger.c: fix a bug where
if you unpost an invoice and don't bring the TaxTables up to
date, the total value shown in the register is different
dependending on whether the cursor is on the current line or
not.
2003-05-28 Christian Stimming <stimming@tuhh.de>
* src/import-export/hbci/gnc-hbci-transfer.c, dialog-hbcitrans.c,

View File

@ -120,10 +120,22 @@ Account * gnc_entry_ledger_get_account (GncEntryLedger *ledger,
GncTaxTable * gnc_entry_ledger_get_taxtable (GncEntryLedger *ledger,
const char *cell_name)
{
const char * name =
gnc_table_layout_get_cell_value (ledger->table->layout, cell_name);
GncEntry *entry;
const char * name;
return gncTaxTableLookupByName (ledger->book, name);
/* If the cursor has changed, then pull in the current table */
if (gnc_table_layout_get_cell_changed (ledger->table->layout,
cell_name, TRUE)) {
name = gnc_table_layout_get_cell_value (ledger->table->layout, cell_name);
return gncTaxTableLookupByName (ledger->book, name);
}
/* If it has not changed, pull in the table from the entry */
entry = gnc_entry_ledger_get_current_entry (ledger);
if (ledger->is_invoice)
return gncEntryGetInvTaxTable (entry);
else
return gncEntryGetBillTaxTable (entry);
}
gboolean gnc_entry_ledger_get_checkmark (GncEntryLedger *ledger,