mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Bug 799068 - csv export active register not working
XML_EXPORT_TRANS uses info->csva.account_list. XML_EXPORT_REGISTER doesn't use an account list, and uses the register QofQuery instead. Call account_splits once with a nullptr account.
This commit is contained in:
parent
3d1e11545a
commit
8fe9dc9845
@ -401,15 +401,21 @@ void csv_transactions_export (CsvExportInfo *info)
|
||||
|
||||
/* Go through list of accounts */
|
||||
TransSet trans_set;
|
||||
for (auto ptr = info->csva.account_list; !info->failed && ptr;
|
||||
ptr = g_list_next(ptr))
|
||||
|
||||
switch (info->export_type)
|
||||
{
|
||||
auto acc{static_cast<Account*>(ptr->data)};
|
||||
DEBUG("Account being processed is : %s", xaccAccountGetName (acc));
|
||||
account_splits (info, acc, ss, trans_set);
|
||||
info->failed = ss.fail();
|
||||
case XML_EXPORT_TRANS:
|
||||
for (auto ptr = info->csva.account_list; !ss.fail() && ptr; ptr = g_list_next(ptr))
|
||||
account_splits (info, GNC_ACCOUNT(ptr->data), ss, trans_set);
|
||||
break;
|
||||
case XML_EXPORT_REGISTER:
|
||||
account_splits (info, nullptr, ss, trans_set);
|
||||
break;
|
||||
default:
|
||||
PERR ("unknown export_type %d", info->export_type);
|
||||
}
|
||||
|
||||
info->failed = ss.fail();
|
||||
LEAVE("");
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user