From ffa5f24b2f98d16c4efb538e9be9b7fde2e265c3 Mon Sep 17 00:00:00 2001 From: Linas Vepstas Date: Thu, 5 Aug 1999 05:53:04 +0000 Subject: [PATCH] fix bug related to transfers git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@1893 57a11ea4-9604-0410-9ed3-97b8803252fd --- src/SplitLedger.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/SplitLedger.c b/src/SplitLedger.c index 29b041eed6..3223b317f1 100644 --- a/src/SplitLedger.c +++ b/src/SplitLedger.c @@ -470,7 +470,12 @@ xaccSRSaveRegEntry (SplitRegister *reg) if (!other_split) { other_split = xaccTransGetSplit (trans, 1); if (!other_split) { + double amt = xaccSplitGetShareAmount (split); + double prc = xaccSplitGetSharePrice (split); other_split = xaccMallocSplit (); + xaccSplitSetMemo (other_split, xaccSplitGetMemo (split)); + xaccSplitSetAction (other_split, xaccSplitGetAction (split)); + xaccSplitSetSharePriceAndAmount (other_split, prc, -amt); xaccTransAppendSplit (trans, other_split); } }