mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
[csv-transactions-export] fix category in export with simple layout
If Trading accounts is enabled, and the transaction is a transfer between two accounts of differing commodities, the CSV simple-layout export would incorrectly show "--Split Transaction--" as the category. This commit changes the algorithm to ignore the trading splits when determining the other split account, thereby returning a more useful other account name.
This commit is contained in:
parent
229efb52ed
commit
5dc0b8271a
@ -130,15 +130,8 @@ get_memo (Split *split)
|
||||
static std::string
|
||||
get_category (Split *split, bool full)
|
||||
{
|
||||
if (full)
|
||||
{
|
||||
auto cat{xaccSplitGetCorrAccountFullName (split)};
|
||||
auto rv{std::string (cat)};
|
||||
g_free (cat);
|
||||
return rv;
|
||||
}
|
||||
else
|
||||
return xaccSplitGetCorrAccountName (split);
|
||||
auto other{xaccSplitGetOtherSplit(split)};
|
||||
return other ? get_account_name (other, full) : _("-- Split Transaction --");
|
||||
}
|
||||
|
||||
// Action
|
||||
|
Loading…
Reference in New Issue
Block a user