mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Bug 644044 - Lots: SQL backend loses link to Gain/Loss Txn
Gotta edit/commit the source transaction as well as the gains txn. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23438 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
d96505693f
commit
1ead96dc1a
@ -930,6 +930,7 @@ xaccSplitComputeCapGains(Split *split, Account *gain_acc)
|
||||
{
|
||||
Account *lot_acc = gnc_lot_get_account(lot);
|
||||
QofBook *book = qof_instance_get_book(lot_acc);
|
||||
Transaction *base_txn = xaccSplitGetParent (split);
|
||||
|
||||
new_gain_split = TRUE;
|
||||
|
||||
@ -968,8 +969,11 @@ xaccSplitComputeCapGains(Split *split, Account *gain_acc)
|
||||
* that this is the gains transaction that corresponds
|
||||
* to the gains source.
|
||||
*/
|
||||
xaccTransBeginEdit (base_txn);
|
||||
kvp_frame_set_guid (split->inst.kvp_data, "gains-split",
|
||||
xaccSplitGetGUID (lot_split));
|
||||
qof_instance_set_dirty (QOF_INSTANCE (split));
|
||||
xaccTransCommitEdit (base_txn);
|
||||
kvp_frame_set_guid (lot_split->inst.kvp_data, "gains-source",
|
||||
xaccSplitGetGUID (split));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user