342{
344 DEBUG(
"File name is : %s", info->file_name);
345
346 StringVec headers;
348
349
350 if (info->simple_layout)
351 {
352
353
354 headers = {
357 (num_action ?
_(
"Transaction Number") :
_(
"Number")),
359 _(
"Full Category Path"),
361 _(
"Amount With Sym"),
366 };
367 }
368 else
369 headers = {
372 (num_action ?
_(
"Transaction Number") :
_(
"Number")),
375 _(
"Commodity/Currency"),
377 (num_action ?
_(
"Number/Action") :
_(
"Action")),
379 _(
"Full Account Name"),
381 _(
"Amount With Sym"),
388 };
389
390
391 auto ss{gnc_open_filestream(info->file_name)};
392 info->failed = !gnc_csv_add_line (ss, headers, info->use_quotes, info->separator_str);
393
394
395 TransSet trans_set;
396
397 switch (info->export_type)
398 {
399 case XML_EXPORT_TRANS:
400 for (auto ptr = info->csva.account_list; !ss.fail() && ptr; ptr = g_list_next(ptr))
401 account_splits (info, GNC_ACCOUNT(ptr->data), ss, trans_set);
402 break;
403 case XML_EXPORT_REGISTER:
404 export_query_splits (info, false, ss, trans_set);
405 break;
406 default:
407 PERR (
"unknown export_type %d", info->export_type);
408 }
409
410 info->failed = ss.fail();
412}
gboolean qof_book_use_split_action_for_num_field(const QofBook *book)
Returns TRUE if this book uses split action field as the 'Num' field, FALSE if it uses transaction nu...
#define DEBUG(format, args...)
Print a debugging message.
#define LEAVE(format, args...)
Print a function exit debugging message.
#define PERR(format, args...)
Log a serious error.
#define ENTER(format, args...)
Print a function entry debugging message.