Export a chart of accounts.
[Import_Export]


Files

file  dialog-chart-export.h
 Chart Export - Routines to export Chart of Accounts to file.

Functions

void gnc_main_window_chart_export (void)
 Export the Chart of Accounts to QSF.

Detailed Description

Remember to use qof_instance_copy routines like qof_instance_copy_to_session so that the QofBook is marked as partial.

guidelines Guidelines for partial book export
  1. When exporting GnuCash accounts into QSF, remember that there is no AccountGroup in the partial book, not even a root. Some account functions that you have used in full books will not work within a partial book.
  2. Take special care with the book pointer. It is very easy to use a QofBook* pointer to a book in a different QofSession. Certain API functions also make assumptions about the current book - check carefully.
  3. Remember that just because the function does not use books or AccountGroup itself, it does not follow that other functions called by the routine are also suitable. You may have to reimplement the body of certain functions.
  4. Commodities are not supported. Most Account functions will use the commodity of the account, so be sure to set at least the gnc_default_currency().

Function Documentation

void gnc_main_window_chart_export ( void   ) 

Export the Chart of Accounts to QSF.

Write out the Chart of Accounts with balances as of a specific date, as QSF.

The function iterates over each account in the current book and gets the balance as of the specified date. The account is copied to the export session, setting the export session book as partial. The function then looks up the new entity in the export session book and sets the opening balance of the copied account.

Definition at line 193 of file dialog-chart-export.c.

00194 {
00195     GladeXML *xml;
00196     chart_data *data;
00197 
00198     xml = gnc_glade_xml_new ("chart-export.glade", "chart-export");
00199     data = g_new0(chart_data, 1);
00200     data->xml = xml;
00201     data->dialog = glade_xml_get_widget(xml, "chart-export");
00202     data->calendar = glade_xml_get_widget(xml, "chart-calendar");
00203     glade_xml_signal_autoconnect_full(xml,
00204                                       gnc_glade_autoconnect_full_func,
00205                                       data);
00206     gtk_widget_show(data->dialog);
00207 }


Generated on Tue May 4 04:36:41 2010 for GnuCash by  doxygen 1.5.7.1