Skip to content

Commit

Permalink
Fix register bug.
Browse files Browse the repository at this point in the history
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@2437 57a11ea4-9604-0410-9ed3-97b8803252fd
  • Loading branch information
jdavisp3 committed Jun 7, 2000
1 parent bd05801 commit af654c3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
3 changes: 3 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
2000-06-07 Dave Peticolas <dave@krondo.com>

* src/SplitLedger.c: use value, not share amount, for debit/credit
cells in equity registers.

* src/gnome/dialog-utils.c (gnc_ui_install_field_strings): set the
code even if it's blank. Auto-coding doesn't work right now.

Expand Down
12 changes: 4 additions & 8 deletions src/SplitLedger.c
Original file line number Diff line number Diff line change
Expand Up @@ -998,8 +998,7 @@ LedgerAutoCompletion(SplitRegister *reg, gncTableTraversalDir dir,
xaccBasicCellSetChanged(&(reg->xfrmCell->cell), GNC_T);

/* auto-complete the amounts */
if ((EQUITY_REGISTER == typo) ||
(STOCK_REGISTER == typo) ||
if ((STOCK_REGISTER == typo) ||
(CURRENCY_REGISTER == typo) ||
(PORTFOLIO_LEDGER == typo))
amount = xaccSplitGetShareAmount (auto_split);
Expand Down Expand Up @@ -2304,8 +2303,7 @@ xaccSRSaveRegEntryToSCM (SplitRegister *reg, SCM trans_scm, SCM split_scm)

price = gnc_split_scm_get_share_price(split_scm);

if ((EQUITY_REGISTER == (reg->type & REG_TYPE_MASK)) ||
(STOCK_REGISTER == (reg->type & REG_TYPE_MASK)) ||
if ((STOCK_REGISTER == (reg->type & REG_TYPE_MASK)) ||
(CURRENCY_REGISTER == (reg->type & REG_TYPE_MASK)) ||
(PORTFOLIO_LEDGER == (reg->type & REG_TYPE_MASK)))
;
Expand Down Expand Up @@ -2811,8 +2809,7 @@ xaccSRSaveChangedCells (SplitRegister *reg, Transaction *trans, Split *split)

DEBUG ("MOD_AMNT: %f\n", new_amount);

if ((EQUITY_REGISTER == (reg->type & REG_TYPE_MASK)) ||
(STOCK_REGISTER == (reg->type & REG_TYPE_MASK)) ||
if ((STOCK_REGISTER == (reg->type & REG_TYPE_MASK)) ||
(CURRENCY_REGISTER == (reg->type & REG_TYPE_MASK)) ||
(PORTFOLIO_LEDGER == (reg->type & REG_TYPE_MASK)))
xaccSplitSetShareAmount (split, new_amount);
Expand Down Expand Up @@ -2978,8 +2975,7 @@ xaccSRLoadRegEntry (SplitRegister *reg, Split *split)
buff[1] = 0x0;
xaccSetBasicCellValue (reg->recnCell, buff);

if ((EQUITY_REGISTER == typo) ||
(STOCK_REGISTER == typo) ||
if ((STOCK_REGISTER == typo) ||
(CURRENCY_REGISTER == typo) ||
(PORTFOLIO_LEDGER == typo))
{
Expand Down

0 comments on commit af654c3

Please sign in to comment.