Fix bug in split auto-completion.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@2568 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Dave Peticolas 2000-07-12 08:54:21 +00:00
parent 4396cd5d39
commit 1bb767c927
2 changed files with 6 additions and 21 deletions

View File

@ -1,5 +1,8 @@
2000-07-12 Dave Peticolas <dave@krondo.com>
* src/SplitLedger.c (LedgerAutoCompletion): simplify, and fix a
bug with split auto-completion.
* src/scm/bootstrap.scm.in: add HOME/.gnucash to scm search path.
2000-07-04 Dave Peticolas <dave@krondo.com>

View File

@ -997,29 +997,11 @@ LedgerAutoCompletion(SplitRegister *reg, gncTableTraversalDir dir,
xaccSetComboCellValue (reg->xfrmCell, fullname);
xaccBasicCellSetChanged(&(reg->xfrmCell->cell), GNC_T);
/* auto-complete the amounts */
if ((STOCK_REGISTER == reg_type) ||
(CURRENCY_REGISTER == reg_type) ||
(PORTFOLIO_LEDGER == reg_type))
amount = xaccSplitGetShareAmount (auto_split);
else
amount = xaccSplitGetValue (auto_split);
xaccSetDebCredCellValue (reg->debitCell, reg->creditCell, amount);
xaccBasicCellSetChanged(&(reg->debitCell->cell), GNC_T);
xaccBasicCellSetChanged(&(reg->creditCell->cell), GNC_T);
amount = xaccSplitGetValue (auto_split);
xaccSetDebCredCellValue (reg->ndebitCell, reg->ncreditCell, -amount);
xaccBasicCellSetChanged(&(reg->ndebitCell->cell), GNC_T);
xaccBasicCellSetChanged(&(reg->ncreditCell->cell), GNC_T);
amount = xaccSplitGetSharePrice (auto_split);
xaccSetPriceCellValue (reg->priceCell, amount);
xaccBasicCellSetChanged(&(reg->priceCell->cell), GNC_T);
amount = xaccSplitGetValue (auto_split);
xaccSetPriceCellValue (reg->valueCell, amount);
xaccBasicCellSetChanged(&(reg->valueCell->cell), GNC_T);
xaccBasicCellSetChanged (&(reg->ndebitCell->cell), GNC_T);
xaccBasicCellSetChanged (&(reg->ncreditCell->cell), GNC_T);
/* copy cursor contents into the table */
xaccCommitCursor (reg->table);