mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
bug fix cap gains lookup
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@9185 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
88d0b86d12
commit
06d403cfab
@ -472,14 +472,14 @@ xaccSplitGetCapGainsSplit (Split *split)
|
||||
{
|
||||
KvpValue *val;
|
||||
GUID *gains_guid;
|
||||
Split * gains_split;
|
||||
Split *gains_split;
|
||||
|
||||
if (!split) return NULL;
|
||||
|
||||
val = kvp_frame_get_slot (split->kvp_data, "/gains-split");
|
||||
val = kvp_frame_get_slot (split->kvp_data, "gains-split");
|
||||
if (!val) return NULL;
|
||||
gains_guid = kvp_value_get_guid (val);
|
||||
if (!val) return NULL;
|
||||
if (!gains_guid) return NULL;
|
||||
|
||||
gains_split = qof_entity_lookup (qof_book_get_entity_table(split->book),
|
||||
gains_guid, GNC_ID_SPLIT);
|
||||
@ -641,9 +641,9 @@ xaccSplitComputeCapGains(Split *split, Account *gain_acc)
|
||||
* that this is the gains transaction that corresponds
|
||||
* to the gains source.
|
||||
*/
|
||||
kvp_frame_set_guid (split->kvp_data, "/gains-split",
|
||||
kvp_frame_set_guid (split->kvp_data, "gains-split",
|
||||
xaccSplitGetGUID (lot_split));
|
||||
kvp_frame_set_guid (lot_split->kvp_data, "/gains-source",
|
||||
kvp_frame_set_guid (lot_split->kvp_data, "gains-source",
|
||||
xaccSplitGetGUID (split));
|
||||
}
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user