r18413 - gnucash/trunk/src - Bug #554394: Income Tax Enhancements

Christian Stimming cstim at code.gnucash.org
Sun Nov 15 15:35:52 EST 2009


Author: cstim
Date: 2009-11-15 15:35:50 -0500 (Sun, 15 Nov 2009)
New Revision: 18413
Trac: http://svn.gnucash.org/trac/changeset/18413

Modified:
   gnucash/trunk/src/app-utils/app-utils.i
   gnucash/trunk/src/app-utils/gnc-ui-util.c
   gnucash/trunk/src/app-utils/gnc-ui-util.h
   gnucash/trunk/src/engine/Account.c
   gnucash/trunk/src/engine/Account.h
   gnucash/trunk/src/gnome/dialog-tax-info.c
   gnucash/trunk/src/gnome/glade/tax.glade
   gnucash/trunk/src/gnome/gnc-plugin-basic-commands.c
   gnucash/trunk/src/report/locale-specific/us/taxtxf-de_DE.scm
   gnucash/trunk/src/report/locale-specific/us/taxtxf.scm
   gnucash/trunk/src/tax/us/de_DE.scm
   gnucash/trunk/src/tax/us/txf-de_DE.scm
   gnucash/trunk/src/tax/us/txf.scm
   gnucash/trunk/src/tax/us/us.scm
Log:
Bug #554394: Income Tax Enhancements

Patch by J. Alex Aycinena. Patch does the following:

- update the tax information in 'txf.scm', which is based on V037 of
the TXF Spec,  to V041, the last version issued (bug #554394)
- provide support for multiple copies of certain tax Forms/Schedules
(e.g., Schedule C(1), Schedule C(2), etc.)
- support multiple types of tax entities: partnerships, corporations
and S corporations, in addition to individual tax payers
- support balance sheet accounts, required for these new tax entity types
- add the term 'Income' in several places to avoid confusion with
sales or VAT style taxes in the business features (e.g., change the
menu from 'Tax Options' to 'Income Tax Options')

The following files were changed, as follows, to implement these changes:

1. src/engine/Account.c and
2. src/engine/Account.h: add copy number capability (define
'xaccAccountGetTaxUSCopyNumber' and 'xaccAccountSetTaxUSCopyNumber');
modify 'xaccAccountSetTaxUSCode' to remove KVP when no tax-code
assigned, clean up tax-source descriptions

3. src/gnome/gnc-plugin-basic-commands.c: change 'Tax Options' to
'Income Tax Options'

4. src/app-utils/gnc-ui-util.c and
5. src/app-utils/gnc-ui-util.h: add setter and getter functions for
book tax name and book tax type which are stored in a book KVP, show
copy information in accounts page, tax column, show error messages for
various conditions

6. src/app-utils/app-utils.i: add 'gnc_get_current_book_tax_name' and
'gnc_get_current_book_tax_type' functions

7. src/gnome/dialog-tax-info.c: add copy number and tax entity name
and type, and balance sheet account handling capability

8. src/gnome/glade/tax.glade: add tax entity name, tax entity type,
asset, liability/equity and copy number widgets

9. src/tax/us/txf.scm: update to V041 for individuals, add V041
support for multiple additional tax entity types and balance sheet
accounts and related tax codes, add tax form line data

10. src/tax/us/us.scm: export new functions defined in txf.scm

11. src/report/locale-specific/us/taxtxf.scm: add support for multiple
copies of Forms/Schedules, add support for Format 6, use Form/Schedule
line #'s to sort report, update from "V037" to "V041", add support for
taxpayer types other than F1040, add warning messages if there are
some inconsistent codes assigned and list

12. src/tax/us/txf-de_DE.scm: make functions called from outside (e.g., from
dialog-tax-info.c) have a consistent signature with those same
functions in txf.scm (define tax-entity-type , define getters/setters,
add tax-entity-type as an argument to existing functions)

13. src/tax/us/de_DE.scm: export new functions added to txf-de_DE.scm

14. src/report/locale-specific/us/taxtxf-de_DE.scm: add "" as
tax-entity-type argument to functions
called on txf-de_DE.scm (which defaults to existing codes)

Modified: gnucash/trunk/src/app-utils/app-utils.i
===================================================================
--- gnucash/trunk/src/app-utils/app-utils.i	2009-11-11 21:17:32 UTC (rev 18412)
+++ gnucash/trunk/src/app-utils/app-utils.i	2009-11-15 20:35:50 UTC (rev 18413)
@@ -24,6 +24,8 @@
 typedef int GNCOptionDBHandle;
 
 QofBook * gnc_get_current_book (void);
+const gchar * gnc_get_current_book_tax_name (void);
+const gchar * gnc_get_current_book_tax_type (void);
 Account * gnc_get_current_root_account (void);
 
 %newobject gnc_gettext_helper;

Modified: gnucash/trunk/src/app-utils/gnc-ui-util.c
===================================================================
--- gnucash/trunk/src/app-utils/gnc-ui-util.c	2009-11-11 21:17:32 UTC (rev 18412)
+++ gnucash/trunk/src/app-utils/gnc-ui-util.c	2009-11-15 20:35:50 UTC (rev 18413)
@@ -200,6 +200,34 @@
   return qof_session_get_book (gnc_get_current_session ());
 }
 
+void
+gnc_set_current_book_tax_name (const gchar *tax_name)
+{
+  kvp_frame_set_string (qof_book_get_slots (gnc_get_current_book()),
+                         "book/tax_US/name", tax_name);
+}
+
+const gchar *
+gnc_get_current_book_tax_name (void)
+{
+  return kvp_frame_get_string (qof_book_get_slots (gnc_get_current_book()),
+                         "book/tax_US/name");
+}
+
+void
+gnc_set_current_book_tax_type (const gchar *tax_type)
+{
+  kvp_frame_set_string(qof_book_get_slots(gnc_get_current_book()),
+                         "book/tax_US/type", tax_type);
+}
+
+const gchar *
+gnc_get_current_book_tax_type (void)
+{
+  return kvp_frame_get_string(qof_book_get_slots(gnc_get_current_book()),
+                         "book/tax_US/type");
+}
+
 Account *
 gnc_get_current_root_account (void)
 {
@@ -430,85 +458,163 @@
   static SCM get_form = SCM_UNDEFINED;
   static SCM get_desc = SCM_UNDEFINED;
 
+  gboolean tax_related = FALSE;
+  const char *code;
+  QofBook *this_book;
+  KvpFrame *book_frame;
+  const gchar *tax_type;
   GNCAccountType atype;
-  const char *code;
   SCM category;
   SCM code_scm;
-  const gchar *form, *desc;
+  SCM tax_entity_type;
+  const gchar *form, *desc, *copy_txt;
+  gint64 copy_number;
   SCM scm;
 
-  if (get_form == SCM_UNDEFINED)
+  if (!account)
+    return NULL;
+
+  tax_related = xaccAccountGetTaxRelated (account);
+  code = xaccAccountGetTaxUSCode (account);
+
+  if (!code)
   {
-    GNCModule module;
-    const gchar *tax_module;
+    if (!tax_related)
+      return NULL;
+    else /* tax_related && !code */
+      return g_strdup (_("Tax-related but has no tax code"));
+  }
+  else  /* with tax code */
+  {
+    tax_type = gnc_get_current_book_tax_type ();
+    atype = xaccAccountGetType (account);
+/*    tax_entity_type = scm_from_locale_string (tax_type); <- requires guile 1.8*/
+    tax_entity_type = scm_makfrom0str (tax_type); /* <-guile 1.6  */
+
+    if (get_form == SCM_UNDEFINED)
+    {
+      GNCModule module;
+      const gchar *tax_module;
     /* load the tax info */
 #ifdef LOCALE_SPECIFIC_TAX
     /* This is a very simple hack that loads the (new, special) German
        tax definition file in a German locale, or (default) loads the
        previous US tax file. */
 # ifdef G_OS_WIN32
-    gchar *thislocale = g_win32_getlocale();
-    gboolean is_de_DE = (strncmp(thislocale, "de_DE", 5) == 0);
-    g_free(thislocale);
+      gchar *thislocale = g_win32_getlocale();
+      gboolean is_de_DE = (strncmp(thislocale, "de_DE", 5) == 0);
+      g_free(thislocale);
 # else /* !G_OS_WIN32 */
-    const char *thislocale = setlocale(LC_ALL, NULL);
-    gboolean is_de_DE = (strncmp(thislocale, "de_DE", 5) == 0);
+      const char *thislocale = setlocale(LC_ALL, NULL);
+      gboolean is_de_DE = (strncmp(thislocale, "de_DE", 5) == 0);
 # endif /* G_OS_WIN32 */
 #else /* LOCALE_SPECIFIC_TAX */
-    gboolean is_de_DE = FALSE;
+      gboolean is_de_DE = FALSE;
 #endif /* LOCALE_SPECIFIC_TAX */
-    tax_module = is_de_DE ? 
-      "gnucash/tax/de_DE" : 
-      "gnucash/tax/us";
+      tax_module = is_de_DE ? 
+          "gnucash/tax/de_DE" : 
+          "gnucash/tax/us";
 
-    module = gnc_module_load ((char *)tax_module, 0);
+      module = gnc_module_load ((char *)tax_module, 0);
 
-    g_return_val_if_fail (module, NULL);
+      g_return_val_if_fail (module, NULL);
 
-    get_form = scm_c_eval_string ("(false-if-exception gnc:txf-get-form)");
-    get_desc = scm_c_eval_string ("(false-if-exception gnc:txf-get-description)");
-  }
+      get_form = scm_c_eval_string ("(false-if-exception gnc:txf-get-form)");
+      get_desc = scm_c_eval_string
+                              ("(false-if-exception gnc:txf-get-description)");
+    }
 
-  g_return_val_if_fail (SCM_PROCEDUREP (get_form), NULL);
-  g_return_val_if_fail (SCM_PROCEDUREP (get_desc), NULL);
+    g_return_val_if_fail (SCM_PROCEDUREP (get_form), NULL);
+    g_return_val_if_fail (SCM_PROCEDUREP (get_desc), NULL);
 
-  if (!account)
-    return NULL;
+    category = scm_c_eval_string (atype == ACCT_TYPE_INCOME ?
+                                  "txf-income-categories" :
+                                  (atype == ACCT_TYPE_EXPENSE ?
+                                   "txf-expense-categories" :
+                                   (((atype == ACCT_TYPE_BANK)      || 
+                                     (atype == ACCT_TYPE_CASH)      ||
+                                     (atype == ACCT_TYPE_ASSET)     ||
+                                     (atype == ACCT_TYPE_STOCK)     ||
+                                     (atype == ACCT_TYPE_MUTUAL)    ||
+                                     (atype == ACCT_TYPE_RECEIVABLE)) ?
+                                      "txf-asset-categories" :
+                                     (((atype == ACCT_TYPE_CREDIT)    ||
+                                       (atype == ACCT_TYPE_LIABILITY) ||
+                                       (atype == ACCT_TYPE_EQUITY)    ||
+                                       (atype == ACCT_TYPE_PAYABLE)) ?
+                                        "txf-liab-eq-categories" : ""))));
 
-  if (!xaccAccountGetTaxRelated (account))
-    return NULL;
+    if (category == SCM_UNDEFINED)
+    {
+      if (tax_related)
+        return g_strdup_printf
+           (_("Tax type %s: invalid code %s for account type"), code, tax_type);
+      else
+        return g_strdup_printf
+        (_("Not tax-related; tax type %s: invalid code %s for account type"),
+                                                                code, tax_type);
+    }
 
-  atype = xaccAccountGetType (account);
-  if (atype != ACCT_TYPE_INCOME && atype != ACCT_TYPE_EXPENSE)
-    return NULL;
+    code_scm = scm_str2symbol (code);
+    scm = scm_call_3 (get_form, category, code_scm, tax_entity_type);
+    if (!SCM_STRINGP (scm))
+    {
+      if (tax_related)
+        return g_strdup_printf
+                         (_("Invalid code %s for tax type %s"), code, tax_type);
+      else
+        return g_strdup_printf
+        (_("Not tax-related; invalid code %s for tax type %s"), code, tax_type);
+    }
 
-  code = xaccAccountGetTaxUSCode (account);
-  if (!code)
-    return NULL;
+    form = SCM_STRING_CHARS (scm);
+    if (!form)
+    {
+      if (tax_related)
+        return g_strdup_printf
+                           (_("No form: code %s, tax type %s"), code, tax_type);
+      else
+        return g_strdup_printf
+          (_("Not tax-related; no form: code %s, tax type %s"), code, tax_type);
+    }
 
-  category = scm_c_eval_string (atype == ACCT_TYPE_INCOME ?
-				"txf-income-categories" :
-				"txf-expense-categories");
+    scm = scm_call_3 (get_desc, category, code_scm, tax_entity_type);
+    if (!SCM_STRINGP (scm))
+    {
+      if (tax_related)
+        return g_strdup_printf
+        (_("No description: form %s, code %s, tax type %s (1)"),
+                                                          form, code, tax_type);
+      else
+        return g_strdup_printf
+        (_("Not tax-related; no description: form %s, code %s, tax type %s (1)"),
+                                                          form, code, tax_type);
+    }
 
-  code_scm = scm_str2symbol (code);
+    desc = SCM_STRING_CHARS (scm);
+    if (!desc)
+    {
+      if (tax_related)
+        return g_strdup_printf
+        (_("No description: form %s, code %s, tax type %s (2)"),
+                                                          form, code, tax_type);
+      else
+        return g_strdup_printf
+        (_("Not tax-related; no description: form %s, code %s, tax type %s (2)"),
+                                                          form, code, tax_type);
+    }
 
-  scm = scm_call_2 (get_form, category, code_scm);
-  if (!SCM_STRINGP (scm))
-    return NULL;
+    copy_number = xaccAccountGetTaxUSCopyNumber (account);
+    copy_txt = (copy_number == 1) ? "" : g_strdup_printf ("(%d)",
+                                                            (gint) copy_number);
 
-  form = SCM_STRING_CHARS (scm);
-  if (!form)
-    return NULL;
-
-  scm = scm_call_2 (get_desc, category, code_scm);
-  if (!SCM_STRINGP (scm))
-    return NULL;
-
-  desc = SCM_STRING_CHARS (scm);
-  if (!desc)
-    return NULL;
-
-  return g_strdup_printf ("%s %s", form, desc);
+    if (tax_related)
+      return g_strdup_printf ("%s%s %s", form, copy_txt, desc);
+    else
+      return g_strdup_printf
+      (_("Not tax-related; %s%s %s (code %s, tax type %s)"),
+                                          form, copy_txt, desc, code, tax_type);
+  }
 }
 
 

Modified: gnucash/trunk/src/app-utils/gnc-ui-util.h
===================================================================
--- gnucash/trunk/src/app-utils/gnc-ui-util.h	2009-11-11 21:17:32 UTC (rev 18412)
+++ gnucash/trunk/src/app-utils/gnc-ui-util.h	2009-11-15 20:35:50 UTC (rev 18413)
@@ -54,6 +54,10 @@
 
 /* Engine enhancements & i18n ***************************************/
 QofBook * gnc_get_current_book (void);
+void gnc_set_current_book_tax_name (const gchar *tax_name);
+const gchar * gnc_get_current_book_tax_name (void);
+void gnc_set_current_book_tax_type (const gchar *tax_type);
+const gchar * gnc_get_current_book_tax_type (void);
 Account * gnc_get_current_root_account (void);
 gnc_commodity_table * gnc_get_current_commodities (void);
 

Modified: gnucash/trunk/src/engine/Account.c
===================================================================
--- gnucash/trunk/src/engine/Account.c	2009-11-11 21:17:32 UTC (rev 18412)
+++ gnucash/trunk/src/engine/Account.c	2009-11-15 20:35:50 UTC (rev 18413)
@@ -78,6 +78,7 @@
   PROP_TAX_RELATED,
   PROP_TAX_CODE,
   PROP_TAX_SOURCE,
+  PROP_TAX_COPY_NUMBER,
 
   PROP_HIDDEN,
   PROP_PLACEHOLDER,
@@ -350,6 +351,10 @@
 	    g_value_set_string(value,
 			       xaccAccountGetTaxUSPayerNameSource(account));
 	    break;
+	case PROP_TAX_COPY_NUMBER:
+	    g_value_set_int64(value,
+			       xaccAccountGetTaxUSCopyNumber(account));
+	    break;
 	case PROP_HIDDEN:
 		g_value_set_boolean(value, xaccAccountGetHidden(account));
 		break;
@@ -434,6 +439,10 @@
 	case PROP_TAX_SOURCE:
 	    xaccAccountSetTaxUSPayerNameSource(account,
 					       g_value_get_string(value));
+	case PROP_TAX_COPY_NUMBER:
+	    xaccAccountSetTaxUSCopyNumber(account,
+			               g_value_get_int64(value));
+	    break;
 	case PROP_HIDDEN:
 		xaccAccountSetHidden(account, g_value_get_boolean(value));
 		break;
@@ -733,12 +742,24 @@
          PROP_TAX_SOURCE,
          g_param_spec_string ("tax-source",
                               "Tax Source",
-                              "This is an unknown tax related field.",
+                              "This specifies where exported name comes from.",
                               NULL,
                               G_PARAM_READWRITE));
 
     g_object_class_install_property
         (gobject_class,
+         PROP_TAX_COPY_NUMBER,
+         g_param_spec_int ("tax-copy-number",
+                           "Tax Copy Number",
+                           "This specifies the copy number of the tax "
+                           "form/schedule.",
+                           1,
+			               G_MAXINT16,
+			               1,
+                           G_PARAM_READWRITE));
+
+    g_object_class_install_property
+        (gobject_class,
          PROP_HIDDEN,
          g_param_spec_boolean ("hidden",
                                "Hidden",
@@ -3482,6 +3503,11 @@
 
   xaccAccountBeginEdit (acc);
   kvp_frame_set_string (acc->inst.kvp_data, "/tax-US/code", code);
+  if (!code)
+  {
+    KvpFrame  *frame = NULL;
+    kvp_frame_set_frame (acc->inst.kvp_data, "/tax-US", frame);
+  }
   mark_account (acc);
   xaccAccountCommitEdit (acc);
 }
@@ -3506,6 +3532,39 @@
   xaccAccountCommitEdit (acc);
 }
 
+gint64
+xaccAccountGetTaxUSCopyNumber (const Account *acc)
+{
+  gint64 copy_number;
+
+  g_return_val_if_fail(GNC_IS_ACCOUNT(acc), 1);
+  copy_number = kvp_frame_get_gint64(acc->inst.kvp_data,
+			      "tax-US/copy-number");
+  return (copy_number == 0) ? 1: copy_number;
+}
+
+void
+xaccAccountSetTaxUSCopyNumber (Account *acc, gint64 copy_number)
+{
+  g_return_if_fail(GNC_IS_ACCOUNT(acc));
+
+  xaccAccountBeginEdit (acc);
+  if (copy_number != 0)
+    kvp_frame_set_gint64 (acc->inst.kvp_data, "/tax-US/copy-number", copy_number);
+  else
+  {
+    KvpFrame * frame;
+    KvpValue *value;
+
+    value = NULL;
+    frame = kvp_frame_set_value_nc (acc->inst.kvp_data,
+                                                 "/tax-US/copy-number", value);
+    if (!frame) kvp_value_delete (value);
+  }
+  mark_account (acc);
+  xaccAccountCommitEdit (acc);
+}
+
 /********************************************************************\
 \********************************************************************/
 

Modified: gnucash/trunk/src/engine/Account.h
===================================================================
--- gnucash/trunk/src/engine/Account.h	2009-11-11 21:17:32 UTC (rev 18412)
+++ gnucash/trunk/src/engine/Account.h	2009-11-15 20:35:50 UTC (rev 18413)
@@ -1192,6 +1192,10 @@
 const char * xaccAccountGetTaxUSPayerNameSource (const Account *account);
 /** DOCUMENT ME! */
 void xaccAccountSetTaxUSPayerNameSource (Account *account, const char *source);
+/** DOCUMENT ME! */
+gint64 xaccAccountGetTaxUSCopyNumber (const Account *account);
+/** DOCUMENT ME! */
+void xaccAccountSetTaxUSCopyNumber (Account *account, gint64 copy_number);
 /** @} */
 
 

Modified: gnucash/trunk/src/gnome/dialog-tax-info.c
===================================================================
--- gnucash/trunk/src/gnome/dialog-tax-info.c	2009-11-11 21:17:32 UTC (rev 18412)
+++ gnucash/trunk/src/gnome/dialog-tax-info.c	2009-11-15 20:35:50 UTC (rev 18413)
@@ -3,6 +3,9 @@
  * Copyright (C) 2001 Gnumatic, Inc.                                *
  * Author: Dave Peticolas <dave at krondo.com>                         *
  *                                                                  *
+ *                                                                  *
+ * updated by  J. Alex Aycinena, July 2009                          *
+ *                                                                  *
  * This program is free software; you can redistribute it and/or    *
  * modify it under the terms of the GNU General Public License as   *
  * published by the Free Software Foundation; either version 2 of   *
@@ -43,8 +46,14 @@
 #define GCONF_SECTION "dialogs/tax_info"
 #define PANED_POSITION "paned_position"
 
-/* This static indicates the debugging module that this .o belongs to.  */
-/* static short module = MOD_GUI; */
+enum
+{
+   INCOME,
+   EXPENSE,
+   ASSET,
+   LIAB_EQ,
+   N_CATEGORIES
+};
 
 static struct
 {
@@ -52,62 +61,130 @@
   SCM form;
   SCM description;
   SCM help;
+  SCM line_data;
+  SCM last_year;
+  SCM copy;
 
   SCM codes;
+
+  SCM tax_entity_type;
+  SCM tax_entity_desc;
+
+  SCM tax_entity_types;
 } getters;
 
 typedef struct
 {
+  char *type_code;
+  char *type;
+  char *description;
+  char *combo_box_entry;
+} TaxTypeInfo;
+
+typedef struct
+{
   char *code;
   char *payer_name_source;
   char *form;
   char *description;
   char *help;
+  gboolean copy;
 } TXFInfo;
 
 typedef struct
 {
   GtkWidget * dialog;
 
+  GtkWidget * entity_name_display;
+  GtkWidget * entity_name_entry;
+  GtkWidget * entity_type_display;
+  GtkWidget * entity_type_combo;
+  GtkWidget * tax_identity_edit_button;
+
+  GtkWidget * acct_info;
+  GtkWidget * expense_radio;
+  GtkWidget * asset_radio;
+  GtkWidget * liab_eq_radio;
   GtkWidget * account_treeview;
   GtkWidget * select_button;
 
+  GtkWidget * txf_info;
   GtkWidget * tax_related_button;
   GtkWidget * txf_category_view;
   GtkWidget * txf_help_text;
   GtkWidget * current_account_button;
   GtkWidget * parent_account_button;
+  GtkWidget * copy_spin_button;
 
+  GList * entity_type_infos;
   GList * income_txf_infos;
   GList * expense_txf_infos;
+  GList * asset_txf_infos;
+  GList * liab_eq_txf_infos;
 
-  gboolean income;
+  const gchar * tax_name;
+  const gchar * tax_type;
+  const gchar * tax_type_combo_text;
+  const gchar * default_tax_type;
+
+  QofBook *this_book;
+
   gboolean changed;
+  gboolean tax_type_changed;
 
   GNCAccountType account_type;
 } TaxInfoDialog;
 
 
-static gboolean getters_initialized = FALSE;
-
-
 static void
 initialize_getters (void)
 {
-  if (getters_initialized)
-    return;
-
   getters.payer_name_source = scm_c_eval_string ("gnc:txf-get-payer-name-source");
   getters.form              = scm_c_eval_string ("gnc:txf-get-form");
   getters.description       = scm_c_eval_string ("gnc:txf-get-description");
   getters.help              = scm_c_eval_string ("gnc:txf-get-help");
+  getters.line_data         = scm_c_eval_string ("gnc:txf-get-line-data");
+  getters.last_year         = scm_c_eval_string ("gnc:txf-get-last-year");
+  getters.copy              = scm_c_eval_string ("gnc:txf-get-multiple");
 
   getters.codes             = scm_c_eval_string ("gnc:txf-get-codes");
 
-  getters_initialized = TRUE;
+  getters.tax_entity_type   = scm_c_eval_string ("gnc:txf-get-tax-entity-type");
+  getters.tax_entity_desc   = scm_c_eval_string
+                                    ("gnc:txf-get-tax-entity-type-description");
+
+  getters.tax_entity_types = scm_c_eval_string
+                                          ("gnc:txf-get-tax-entity-type-codes");
 }
 
 static void
+destroy_tax_type_info (gpointer data, gpointer user_data)
+{
+  TaxTypeInfo *tax_type = data;
+
+  g_free (tax_type->type_code);
+  tax_type->type_code = NULL;
+
+  g_free (tax_type->type);
+  tax_type->type = NULL;
+
+  g_free (tax_type->description);
+  tax_type->description = NULL;
+
+  g_free (tax_type->combo_box_entry);
+  tax_type->combo_box_entry = NULL;
+
+  g_free (tax_type);
+}
+
+static void
+destroy_tax_type_infos (GList *types)
+{
+  g_list_foreach (types, destroy_tax_type_info, NULL);
+  g_list_free (types);
+}
+
+static void
 destroy_txf_info (gpointer data, gpointer user_data)
 {
   TXFInfo *txf_info = data;
@@ -144,24 +221,50 @@
 }
 
 static GList *
-load_txf_info (gboolean income)
+load_txf_info (gint acct_category, TaxInfoDialog *ti_dialog)
 {
   GList *infos = NULL;
+  SCM tax_entity_type;
   SCM category;
   SCM codes;
 
-  initialize_getters ();
+  if (ti_dialog->tax_type == NULL ||
+        (safe_strcmp (ti_dialog->tax_type, "") == 0))
+  {
+     destroy_txf_infos (infos);
+     return NULL;
+  }
+  else
+  {
+/*     tax_entity_type = scm_from_locale_string (ti_dialog->tax_type); <- Req's guile 1.8 */
+     tax_entity_type = scm_makfrom0str (ti_dialog->tax_type); /* <-guile 1.6  */
+  }
 
-  category = scm_c_eval_string (income ?
-				"txf-income-categories" :
-				"txf-expense-categories");
+  switch (acct_category) {
+   case INCOME:
+    category = scm_c_eval_string ("txf-income-categories");
+    break;
+   case EXPENSE:
+    category = scm_c_eval_string ("txf-expense-categories");
+    break;
+   case ASSET:
+    category = scm_c_eval_string ("txf-asset-categories");
+    break;
+   case LIAB_EQ:
+    category = scm_c_eval_string ("txf-liab-eq-categories");
+    break;
+   default:
+    destroy_txf_infos (infos);
+    return NULL;
+  }
+
   if (category == SCM_UNDEFINED)
   {
     destroy_txf_infos (infos);
     return NULL;
   }
 
-  codes = scm_call_1 (getters.codes, category);
+  codes = scm_call_2 (getters.codes, category, tax_entity_type);
   if (!SCM_LISTP (codes))
   {
     destroy_txf_infos (infos);
@@ -173,12 +276,18 @@
     TXFInfo *txf_info;
     SCM code_scm;
     const gchar *str;
+    const gchar *last_yr = _("Last Valid Year: ");
+    const gchar *form_line = _("Form Line Data: ");
+    gchar *form_line_data = NULL;
     SCM scm;
+    gint year;
+    gboolean cpy;
 
     code_scm  = SCM_CAR (codes);
     codes     = SCM_CDR (codes);
 
-    scm = scm_call_2 (getters.payer_name_source, category, code_scm);
+    scm = scm_call_3 (getters.payer_name_source, category, code_scm,
+                                                               tax_entity_type);
     str = SCM_SYMBOL_CHARS (scm);
     if (safe_strcmp (str, "not-impl") == 0)
     {
@@ -195,18 +304,77 @@
     str = SCM_SYMBOLP(code_scm) ? SCM_SYMBOL_CHARS(code_scm) : "";
     txf_info->code = g_strdup (str);
 
-    scm = scm_call_2 (getters.form, category, code_scm);
+    scm = scm_call_3 (getters.form, category, code_scm, tax_entity_type);
     str = SCM_STRINGP(scm) ? SCM_STRING_CHARS(scm) : "";
     txf_info->form = g_strdup (str);
 
-    scm = scm_call_2 (getters.description, category, code_scm);
+    scm = scm_call_3 (getters.description, category, code_scm, tax_entity_type);
     str = SCM_STRINGP(scm) ? SCM_STRING_CHARS(scm) : "";
     txf_info->description = g_strdup (str);
 
     scm = scm_call_2 (getters.help, category, code_scm);
     str = SCM_STRINGP(scm) ? SCM_STRING_CHARS(scm) : "";
-    txf_info->help = g_strdup (str);
+    scm = scm_call_3 (getters.last_year, category, code_scm, tax_entity_type);
+/*    year = scm_is_bool (scm) ? 0 : scm_to_int(scm); <- Req's guile 1.8 */
+    year = SCM_BOOLP (scm) ? 0 : SCM_INUM(scm); /* <-guile 1.6  */
+    scm = scm_call_3 (getters.line_data, category, code_scm, tax_entity_type);
+    if (SCM_LISTP (scm))
+    {
+      const gchar *until = _("now");
 
+      if (year != 0)
+        until = g_strdup_printf ("%d", year);
+      form_line_data = g_strconcat ("\n", "\n", form_line, NULL);
+      while (!SCM_NULLP (scm))
+      {
+        SCM year_scm;
+        gint line_year;
+        const gchar *line;
+        gchar *temp;
+
+        year_scm  = SCM_CAR (scm);
+        scm       = SCM_CDR (scm);
+
+/*        line_year = scm_is_bool (SCM_CAR (year_scm)) ? 0 :
+                          scm_to_int (SCM_CAR (year_scm)); <- Req's guile 1.8 */
+        line_year = SCM_BOOLP (SCM_CAR (year_scm)) ? 0 :
+                            SCM_INUM (SCM_CAR (year_scm)); /* <-guile 1.6  */
+        line = SCM_STRINGP((SCM_CAR (SCM_CDR (year_scm))))
+                        ? SCM_STRING_CHARS((SCM_CAR (SCM_CDR (year_scm)))) : "";
+        temp = g_strconcat (form_line_data, "\n",
+                            g_strdup_printf ("%d", line_year), " - ", until,
+                            "   ", line, NULL);
+        until = g_strdup_printf ("%d", (line_year - 1));
+        g_free(form_line_data);
+        form_line_data = g_strdup (temp);
+        g_free(temp);
+      }
+    }
+    if (year != 0)
+    {
+      if (form_line_data != NULL)
+        txf_info->help = g_strconcat (last_yr, g_strdup_printf ("%d", year),
+                                         "\n", "\n", str, form_line_data, NULL);
+      else
+        txf_info->help = g_strconcat (last_yr, g_strdup_printf ("%d", year),
+                                                         "\n", "\n", str, NULL);
+    }
+    else
+    {
+      if (form_line_data != NULL)
+        txf_info->help = g_strconcat (str, form_line_data, NULL);
+      else
+        txf_info->help = g_strdup (str);
+    }
+
+    if (form_line_data != NULL)
+      g_free(form_line_data);
+
+    scm = scm_call_3 (getters.copy, category, code_scm, tax_entity_type);
+/*    cpy = scm_is_bool (scm) ? (scm_is_false (scm) ? FALSE : TRUE): FALSE; <- Req's guile 1.8 */
+    cpy = SCM_BOOLP (scm) ? (SCM_FALSEP (scm) ? FALSE : TRUE): FALSE; /* <-guile 1.6  */
+    txf_info->copy = cpy;
+
     infos = g_list_prepend (infos, txf_info);
   }
 
@@ -217,11 +385,69 @@
 tax_infos (TaxInfoDialog *ti_dialog)
 {
   return
-    ti_dialog->income ?
-    ti_dialog->income_txf_infos : ti_dialog->expense_txf_infos;
+      (ti_dialog->account_type == ACCT_TYPE_INCOME)
+                                              ? ti_dialog->income_txf_infos :
+     ((ti_dialog->account_type == ACCT_TYPE_EXPENSE)
+                                              ? ti_dialog->expense_txf_infos :
+    (((ti_dialog->account_type == ACCT_TYPE_ASSET)
+                                              ? ti_dialog->asset_txf_infos :
+                                                ti_dialog->liab_eq_txf_infos)));
 }
 
 static void
+load_tax_entity_type_list (TaxInfoDialog *ti_dialog)
+{
+  GList *types = NULL;
+  SCM tax_types;
+
+  ti_dialog->tax_type_combo_text = NULL;
+  tax_types = scm_call_0 (getters.tax_entity_types);
+  if (!SCM_LISTP (tax_types))
+  {
+    destroy_tax_type_infos (types);
+    return;
+  }
+
+  while (!SCM_NULLP (tax_types))
+  {
+    TaxTypeInfo *tax_type_info;
+    SCM type_scm;
+    const gchar *str;
+    SCM scm;
+
+    type_scm  = SCM_CAR (tax_types);
+    tax_types = SCM_CDR (tax_types);
+
+    ti_dialog->default_tax_type = NULL;
+
+    tax_type_info = g_new0 (TaxTypeInfo, 1);
+
+    str = SCM_SYMBOLP(type_scm) ? SCM_SYMBOL_CHARS(type_scm) : "";
+    tax_type_info->type_code = g_strdup (str);
+
+    scm = scm_call_1 (getters.tax_entity_type, type_scm);
+    str = SCM_STRINGP(scm) ? SCM_STRING_CHARS (scm) : "";
+    tax_type_info->type = g_strdup (str);
+
+    scm = scm_call_1 (getters.tax_entity_desc, type_scm);
+    str = SCM_STRINGP(scm) ? SCM_STRING_CHARS (scm) : "";
+    tax_type_info->description = g_strdup (str);
+
+    tax_type_info->combo_box_entry = g_strconcat(tax_type_info->type, " - ", 
+                                             tax_type_info->description, NULL);
+    /* save combo text for current tax type code */
+    if (safe_strcmp (ti_dialog->tax_type, tax_type_info->type_code) == 0)
+       ti_dialog->tax_type_combo_text = g_strdup (tax_type_info->combo_box_entry);
+     /* the last will be default */
+    ti_dialog->default_tax_type = g_strdup (tax_type_info->combo_box_entry);
+
+    types = g_list_prepend (types, tax_type_info);
+  }
+
+  ti_dialog->entity_type_infos = g_list_reverse (types);
+}
+
+static void
 load_category_list (TaxInfoDialog *ti_dialog)
 {
   GtkTreeView *view;
@@ -267,6 +493,9 @@
 
   gtk_toggle_button_set_active
     (GTK_TOGGLE_BUTTON (ti_dialog->current_account_button), TRUE);
+
+  gtk_spin_button_set_value
+    (GTK_SPIN_BUTTON (ti_dialog->copy_spin_button), 1);
 }
 
 static gboolean
@@ -274,8 +503,26 @@
 					 gpointer data)
 {
   TaxInfoDialog *dialog = data;
+  gboolean included = FALSE;
 
-  return xaccAccountGetType (account) == dialog->account_type;
+  if ((dialog->account_type == ACCT_TYPE_INCOME) ||
+      (dialog->account_type == ACCT_TYPE_EXPENSE))
+     included = (xaccAccountGetType (account) == dialog->account_type);
+  else if (dialog->account_type == ACCT_TYPE_ASSET)
+     included = ((xaccAccountGetType (account) == ACCT_TYPE_BANK) ||
+                 (xaccAccountGetType (account) == ACCT_TYPE_CASH) ||
+                 (xaccAccountGetType (account) == ACCT_TYPE_ASSET) ||
+                 (xaccAccountGetType (account) == ACCT_TYPE_STOCK) ||
+                 (xaccAccountGetType (account) == ACCT_TYPE_MUTUAL) ||
+                 (xaccAccountGetType (account) == ACCT_TYPE_RECEIVABLE));
+  else if (dialog->account_type == ACCT_TYPE_LIABILITY)
+     included = ((xaccAccountGetType (account) == ACCT_TYPE_CREDIT) ||
+                 (xaccAccountGetType (account) == ACCT_TYPE_LIABILITY) ||
+                 (xaccAccountGetType (account) == ACCT_TYPE_EQUITY) ||
+                 (xaccAccountGetType (account) == ACCT_TYPE_PAYABLE));
+  else
+     included = FALSE;
+  return included;
 }
 
 static TXFInfo *
@@ -302,7 +549,7 @@
   const char *str;
   TXFInfo *info;
   GList *infos;
-  gint index;
+  guint index;
 
   if (!account)
   {
@@ -339,6 +586,10 @@
   else
     gtk_toggle_button_set_active
       (GTK_TOGGLE_BUTTON (ti_dialog->current_account_button), TRUE);
+
+  gtk_spin_button_set_value
+      (GTK_SPIN_BUTTON (ti_dialog->copy_spin_button),
+                (gdouble) xaccAccountGetTaxUSCopyNumber (account));
 }
 
 static void
@@ -357,6 +608,7 @@
   TXFInfo *info;
   GList *infos;
   GList *node;
+  gint64 copy_number;
 
   tax_related = gtk_toggle_button_get_active
     (GTK_TOGGLE_BUTTON (ti_dialog->tax_related_button));
@@ -387,6 +639,14 @@
   else
     pns = NULL;
 
+  if (tax_related && info->copy)
+  {
+    copy_number = gtk_spin_button_get_value_as_int
+      (GTK_SPIN_BUTTON (ti_dialog->copy_spin_button));
+  }
+  else
+    copy_number = 0;/* setting to zero removes slot */
+
   accounts = gnc_tree_view_account_get_selected_accounts
     (GNC_TREE_VIEW_ACCOUNT(ti_dialog->account_treeview));
 
@@ -397,26 +657,48 @@
     xaccAccountBeginEdit (account);
 
     xaccAccountSetTaxRelated (account, tax_related);
+    xaccAccountSetTaxUSPayerNameSource (account, pns);
+    xaccAccountSetTaxUSCopyNumber (account, copy_number);
+    /* USCode is last because it removes TaxUS KVP if not tax_related */
     xaccAccountSetTaxUSCode (account, code);
-    xaccAccountSetTaxUSPayerNameSource (account, pns);
 
     xaccAccountCommitEdit (account);
   }
 }
 
 static void
+identity_edit_destroy_cb (GtkObject *object, gpointer data)
+{
+  TaxInfoDialog *ti_dialog = data;
+
+  ti_dialog->entity_name_entry = NULL;
+  ti_dialog->entity_type_combo = NULL;
+
+  gtk_object_destroy (object);
+}
+
+static void
 window_destroy_cb (GtkObject *object, gpointer data)
 {
   TaxInfoDialog *ti_dialog = data;
 
   gnc_unregister_gui_component_by_data (DIALOG_TAX_INFO_CM_CLASS, ti_dialog);
 
+  destroy_tax_type_infos (ti_dialog->entity_type_infos);
+  ti_dialog->entity_type_infos = NULL;
+
   destroy_txf_infos (ti_dialog->income_txf_infos);
   ti_dialog->income_txf_infos = NULL;
 
   destroy_txf_infos (ti_dialog->expense_txf_infos);
   ti_dialog->expense_txf_infos = NULL;
 
+  destroy_txf_infos (ti_dialog->asset_txf_infos);
+  ti_dialog->asset_txf_infos = NULL;
+
+  destroy_txf_infos (ti_dialog->liab_eq_txf_infos);
+  ti_dialog->liab_eq_txf_infos = NULL;
+
   g_free (ti_dialog);
 }
 
@@ -468,22 +750,37 @@
 }
 
 static void
-tax_info_show_income_accounts (TaxInfoDialog *ti_dialog, gboolean show_income)
+tax_info_show_acct_type_accounts (TaxInfoDialog *ti_dialog)
 {
   GncTreeViewAccount *tree;
   AccountViewInfo info;
   GNCAccountType type;
-  GNCAccountType show_type;
 
-  ti_dialog->income = show_income;
-
   tree = GNC_TREE_VIEW_ACCOUNT (ti_dialog->account_treeview);
-  show_type = show_income ? ACCT_TYPE_INCOME : ACCT_TYPE_EXPENSE;
 
   gnc_tree_view_account_get_view_info (tree, &info);
 
-  for (type = 0; type < NUM_ACCOUNT_TYPES; type++)
-    info.include_type[type] = (type == show_type);
+  for (type = 0; type < NUM_ACCOUNT_TYPES; type++) /* from Account.h */
+  {
+    if (ti_dialog->account_type == ACCT_TYPE_EXPENSE)
+       info.include_type[type] = (type == ACCT_TYPE_EXPENSE);
+    else if (ti_dialog->account_type == ACCT_TYPE_INCOME)
+       info.include_type[type] = (type == ACCT_TYPE_INCOME);
+    else if (ti_dialog->account_type == ACCT_TYPE_ASSET)
+       info.include_type[type] = ((type == ACCT_TYPE_BANK)      ||
+                                  (type == ACCT_TYPE_CASH)      ||
+                                  (type == ACCT_TYPE_ASSET)     ||
+                                  (type == ACCT_TYPE_STOCK)     ||
+                                  (type == ACCT_TYPE_MUTUAL)    ||
+                                  (type == ACCT_TYPE_RECEIVABLE));
+    else if (ti_dialog->account_type == ACCT_TYPE_LIABILITY)
+       info.include_type[type] = ((type == ACCT_TYPE_CREDIT)    ||
+                                  (type == ACCT_TYPE_LIABILITY) ||
+                                  (type == ACCT_TYPE_EQUITY)    ||
+                                  (type == ACCT_TYPE_PAYABLE));
+    else
+       info.include_type[type] = FALSE;
+  }
 
   gnc_tree_view_account_set_view_info (tree, &info);
 
@@ -518,21 +815,32 @@
 }
 
 static void
-gnc_tax_info_income_cb (GtkWidget *w, gpointer data)
+gnc_tax_info_acct_type_cb (GtkWidget *w, gpointer data)
 {
   TaxInfoDialog *ti_dialog = data;
-  gboolean show_income;
+  const gchar *button_name;
 
-  show_income = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (w));
-
-  tax_info_show_income_accounts (ti_dialog, show_income);
-
-  ti_dialog->account_type = show_income ? ACCT_TYPE_INCOME : ACCT_TYPE_EXPENSE;
-  gnc_tree_view_account_refilter (GNC_TREE_VIEW_ACCOUNT (ti_dialog->account_treeview));
-
-  gnc_tax_info_update_accounts (ti_dialog);
-
-  clear_gui (ti_dialog);
+  if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (w)))
+  {
+     button_name = gtk_widget_get_name (w);
+     if (safe_strcmp (button_name, "income_radio") == 0)
+        ti_dialog->account_type = ACCT_TYPE_INCOME;
+     else if (safe_strcmp (button_name, "expense_radio") == 0)
+        ti_dialog->account_type = ACCT_TYPE_EXPENSE;
+     else if (safe_strcmp (button_name, "asset_radio") == 0)
+        ti_dialog->account_type = ACCT_TYPE_ASSET;
+     else if (safe_strcmp (button_name, "liab_eq_radio") == 0)
+        ti_dialog->account_type = ACCT_TYPE_LIABILITY;
+     else
+        return;
+     tax_info_show_acct_type_accounts (ti_dialog);
+     gnc_tree_view_account_refilter
+                          (GNC_TREE_VIEW_ACCOUNT (ti_dialog->account_treeview));
+     gnc_tax_info_update_accounts (ti_dialog);
+     clear_gui (ti_dialog);
+  }
+  else
+     return;
 }
 
 static void
@@ -629,23 +937,234 @@
       (GTK_TOGGLE_BUTTON (ti_dialog->current_account_button), TRUE);
   }
 
+  vbox = gnc_glade_lookup_widget (GTK_WIDGET (ti_dialog->dialog),
+                                   "copy_number_vbox");
+
+  if (txf_info && txf_info->copy)
+  {
+    gtk_widget_set_sensitive (vbox, TRUE);
+  }
+  else
+  {
+    gtk_widget_set_sensitive (vbox, FALSE);
+  }
+
   gnc_tax_info_set_changed (ti_dialog, TRUE);
 }
 
 static void
+set_focus_sensitivity (TaxInfoDialog *ti_dialog)
+{
+  if ((ti_dialog->tax_type == NULL) ||
+      (safe_strcmp (ti_dialog->tax_type, "Other") == 0) ||
+      (safe_strcmp (ti_dialog->tax_type, "") == 0))
+  {
+     gtk_widget_grab_focus (ti_dialog->tax_identity_edit_button);
+     gtk_widget_set_sensitive (ti_dialog->acct_info, FALSE);
+     gtk_widget_set_sensitive (ti_dialog->txf_info, FALSE);
+     gtk_widget_hide (ti_dialog->txf_help_text); /* doesn't go insensitive!? */
+  }
+  else if (ti_dialog->tax_type_changed)
+  {
+     gtk_widget_set_sensitive (ti_dialog->acct_info, TRUE);
+     gtk_widget_set_sensitive (ti_dialog->txf_info, TRUE);
+     gtk_widget_show (ti_dialog->txf_help_text);
+     gtk_widget_grab_focus (ti_dialog->account_treeview);
+
+  }
+  else
+  {
+     gtk_widget_set_sensitive (ti_dialog->acct_info, TRUE);
+     gtk_widget_grab_focus (ti_dialog->account_treeview);
+  }
+  if (ti_dialog->asset_txf_infos == NULL)
+     gtk_widget_hide (ti_dialog->asset_radio);
+  else
+     gtk_widget_show (ti_dialog->asset_radio);
+  if (ti_dialog->liab_eq_txf_infos == NULL)
+     gtk_widget_hide (ti_dialog->liab_eq_radio);
+  else
+     gtk_widget_show (ti_dialog->liab_eq_radio);
+}
+
+static void
+identity_edit_response_cb (GtkDialog *dialog, gint response, gpointer data)
+{
+  TaxInfoDialog *ti_dialog = data;
+  const gchar *entry_name = NULL;
+  const gchar *entry_type = NULL;
+  gint active_item = 0;
+  TaxTypeInfo *selected_type = NULL;
+
+  if (response == GTK_RESPONSE_APPLY)
+  {
+     entry_name = gtk_entry_get_text (GTK_ENTRY (ti_dialog->entity_name_entry));
+     active_item = gtk_combo_box_get_active
+                              (GTK_COMBO_BOX (ti_dialog->entity_type_combo));
+     if (active_item != -1)  /* -1 if there's no active item */
+     {
+        selected_type = g_list_nth_data (ti_dialog->entity_type_infos,
+                                                       (guint) active_item);
+        if (selected_type)
+        {
+           entry_type = selected_type->type_code;
+           if (!(safe_strcmp (ti_dialog->tax_type, entry_type) == 0))
+           {
+              ti_dialog->tax_type_changed = TRUE;
+              gnc_set_current_book_tax_type (entry_type);
+              qof_book_kvp_changed(ti_dialog->this_book);
+              ti_dialog->tax_type = g_strdup (entry_type);
+              if (entry_type != NULL)
+              {
+                 gtk_label_set_text (GTK_LABEL (ti_dialog->entity_type_display),
+                                                selected_type->combo_box_entry);
+              }
+              else
+              {
+                 gtk_label_set_text (GTK_LABEL (ti_dialog->entity_type_display),
+                                                   ti_dialog->default_tax_type);
+              }
+              ti_dialog->income_txf_infos = load_txf_info (INCOME, ti_dialog);
+              ti_dialog->expense_txf_infos = load_txf_info (EXPENSE, ti_dialog);
+              ti_dialog->asset_txf_infos = load_txf_info (ASSET, ti_dialog);
+              ti_dialog->liab_eq_txf_infos = load_txf_info (LIAB_EQ, ti_dialog);
+              gtk_toggle_button_set_active
+                            (GTK_TOGGLE_BUTTON(ti_dialog->expense_radio), TRUE);
+              tax_info_show_acct_type_accounts (ti_dialog);
+              gnc_tree_view_account_refilter
+                          (GNC_TREE_VIEW_ACCOUNT (ti_dialog->account_treeview));
+              gnc_tax_info_update_accounts (ti_dialog);
+              clear_gui (ti_dialog);
+           }           
+        }
+     }
+     if (!(safe_strcmp (ti_dialog->tax_name, entry_name) == 0))
+     {
+        gnc_set_current_book_tax_name (entry_name);
+        qof_book_kvp_changed(ti_dialog->this_book);
+        ti_dialog->tax_name = g_strdup (entry_name);
+        gtk_label_set_text (GTK_LABEL (ti_dialog->entity_name_display),
+                                                                    entry_name);
+     }
+     set_focus_sensitivity (ti_dialog);
+     ti_dialog->tax_type_changed = FALSE;
+  }
+  identity_edit_destroy_cb (GTK_OBJECT (dialog), ti_dialog);
+}
+
+static void
+identity_edit_clicked_cb (GtkButton *button,
+                        gpointer user_data)
+{
+  TaxInfoDialog *ti_dialog = user_data;
+  GtkWidget *dialog;
+  GtkWidget *content_area;
+  GtkWidget *name_entry;
+  GtkWidget *label;
+  GtkWidget *alignment;
+  GtkWidget *table;
+  GtkListStore *store;
+  GList *types = NULL;
+  GtkTreeIter iter;
+  gint current_item = -1;
+  gint item = 0;
+  GtkCellRenderer *renderer; 
+  GtkWidget *type_combo;
+
+  dialog = gtk_dialog_new_with_buttons (_("Income Tax Identity"),
+                                        (GtkWindow *)ti_dialog->dialog,
+                                        GTK_DIALOG_MODAL |
+                                                GTK_DIALOG_DESTROY_WITH_PARENT,
+                                        GTK_STOCK_CANCEL,
+                                        GTK_RESPONSE_CANCEL,
+                                        GTK_STOCK_APPLY,
+                                        GTK_RESPONSE_APPLY,
+                                        NULL);
+  content_area = gtk_dialog_get_content_area (GTK_DIALOG (dialog));
+  name_entry = gtk_entry_new();
+  ti_dialog->entity_name_entry = name_entry;
+  gtk_entry_set_text (GTK_ENTRY (name_entry), ti_dialog->tax_name);
+  label = gtk_label_new (_("Name"));
+  gtk_misc_set_alignment (GTK_MISC (label), 1.00, 0.50);
+  alignment = gtk_alignment_new(1.00, 0.50, 1.00, 0.00);
+  gtk_alignment_set_padding (GTK_ALIGNMENT (alignment), 0, 0, 12, 0);
+  gtk_container_add (GTK_CONTAINER (alignment), label);
+  table = gtk_table_new (3, 2, FALSE);
+  gtk_table_attach_defaults (GTK_TABLE (table), alignment, 0, 1, 0, 1);
+  alignment = gtk_alignment_new(0.00, 0.50, 1.00, 0.00);
+  gtk_alignment_set_padding (GTK_ALIGNMENT (alignment), 0, 0, 12, 0);
+  gtk_container_add (GTK_CONTAINER (alignment), name_entry);
+  gtk_table_attach_defaults (GTK_TABLE (table), alignment, 1, 2, 0, 1);
+  store = gtk_list_store_new (1, G_TYPE_STRING);
+  gtk_list_store_clear(store);
+  types = ti_dialog->entity_type_infos;
+  for ( ; types; types = types->next)
+  {
+    TaxTypeInfo *tax_type_info = types->data;
+
+    gtk_list_store_append(store, &iter);
+    gtk_list_store_set(store, &iter, 0, tax_type_info->combo_box_entry, -1);
+    if (safe_strcmp (ti_dialog->tax_type, tax_type_info->type_code) == 0)
+        current_item = item;
+    item++;
+  }
+  type_combo = gtk_combo_box_new_with_model (GTK_TREE_MODEL(store));
+  g_object_unref(G_OBJECT (store));
+  renderer = gtk_cell_renderer_text_new();
+  gtk_cell_layout_pack_start(GTK_CELL_LAYOUT(type_combo), renderer, TRUE);
+  gtk_cell_layout_set_attributes(GTK_CELL_LAYOUT(type_combo), renderer,
+    "text", 0, NULL);
+  ti_dialog->entity_type_combo = type_combo;
+  if (ti_dialog->tax_type) {
+     gtk_combo_box_set_active (GTK_COMBO_BOX (type_combo), current_item);
+  }
+  else {   /* set to no active item */
+     gtk_combo_box_set_active (GTK_COMBO_BOX (type_combo), -1);
+  }
+  label = gtk_label_new (_("Type"));
+  gtk_misc_set_alignment (GTK_MISC (label), 1.00, 0.50);
+  alignment = gtk_alignment_new(1.00, 0.50, 1.00, 0.00);
+  gtk_alignment_set_padding (GTK_ALIGNMENT (alignment), 0, 0, 12, 0);
+  gtk_container_add (GTK_CONTAINER (alignment), label);
+  gtk_table_attach_defaults (GTK_TABLE (table), alignment, 0, 1, 1, 2);
+  alignment = gtk_alignment_new(0.00, 0.50, 1.00, 0.00);
+  gtk_alignment_set_padding (GTK_ALIGNMENT (alignment), 0, 0, 12, 0);
+  gtk_container_add (GTK_CONTAINER (alignment), type_combo);
+  gtk_table_attach_defaults (GTK_TABLE (table), alignment, 1, 2, 1, 2);
+  label = gtk_label_new (_("CAUTION: If you set TXF categories, and later change 'Type', you will need to manually reset those categories one at a time"));
+  gtk_misc_set_alignment (GTK_MISC (label), 0.50, 0.50);
+  alignment = gtk_alignment_new(0.50, 0.50, 1.00, 0.00);
+  gtk_alignment_set_padding (GTK_ALIGNMENT (alignment), 6, 6, 4, 4);
+  gtk_container_add (GTK_CONTAINER (alignment), label);
+  gtk_table_attach_defaults (GTK_TABLE (table), alignment, 0, 2, 2, 3);
+  gtk_container_add (GTK_CONTAINER (content_area), table);
+  gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_APPLY);
+  g_signal_connect (G_OBJECT (dialog), "response",
+                          G_CALLBACK (identity_edit_response_cb), ti_dialog);
+  g_signal_connect (G_OBJECT (dialog), "destroy",
+                          G_CALLBACK (identity_edit_destroy_cb), ti_dialog);
+  gtk_widget_show_all (dialog);
+}
+
+static void
 tax_related_toggled_cb (GtkToggleButton *togglebutton,
                         gpointer user_data)
 {
   TaxInfoDialog *ti_dialog = user_data;
   GtkWidget *vbox;
+  GtkWidget *hbox;
   gboolean on;
 
   on = gtk_toggle_button_get_active (togglebutton);
 
   vbox = gnc_glade_lookup_widget (GTK_WIDGET (togglebutton),
                                    "txf_categories_vbox");
+  hbox = gnc_glade_lookup_widget (GTK_WIDGET (togglebutton),
+                                   "pns_copy_hbox");
   gtk_widget_set_sensitive (vbox, on);
 
+  gtk_widget_set_sensitive (hbox, on);
+
   gnc_tax_info_set_changed (ti_dialog, TRUE);
 }
 
@@ -659,6 +1178,15 @@
 }
 
 static void
+copy_number_value_changed_cb (GtkSpinButton *spinbutton,
+                            gpointer user_data)
+{
+  TaxInfoDialog *ti_dialog = user_data;
+
+  gnc_tax_info_set_changed (ti_dialog, TRUE);
+}
+
+static void
 gnc_tax_info_dialog_create (GtkWidget * parent, TaxInfoDialog *ti_dialog)
 {
   GtkWidget *dialog;
@@ -674,9 +1202,7 @@
   ti_dialog->dialog = dialog;
   tido = GTK_OBJECT (dialog);
 
-  ti_dialog->account_type = ACCT_TYPE_EXPENSE;
-  ti_dialog->income_txf_infos = load_txf_info (TRUE);
-  ti_dialog->expense_txf_infos = load_txf_info (FALSE);
+  initialize_getters ();
 
   g_signal_connect (G_OBJECT (dialog), "response",
                     G_CALLBACK (gnc_tax_info_dialog_response), ti_dialog);
@@ -691,6 +1217,40 @@
   /* default to ok */
   gtk_dialog_set_default_response (GTK_DIALOG(dialog), GTK_RESPONSE_OK);
 
+  /* tax identity */
+  {
+    GtkWidget *label;
+    GtkWidget *edit_button;
+
+    ti_dialog->this_book = gnc_get_current_book();
+    ti_dialog->tax_name = gnc_get_current_book_tax_name();
+    ti_dialog->tax_type = gnc_get_current_book_tax_type();
+
+    label = glade_xml_get_widget (xml, "entity_name");
+    ti_dialog->entity_name_display = label;
+    gtk_label_set_text (GTK_LABEL (label), ti_dialog->tax_name);
+    ti_dialog->entity_name_entry = NULL;
+
+    load_tax_entity_type_list (ti_dialog); /* initialize tax_type_combo_text */
+
+    label = glade_xml_get_widget (xml, "entity_type");
+    ti_dialog->entity_type_display = label;
+    if (ti_dialog->tax_type != NULL)
+       gtk_label_set_text (GTK_LABEL (label), ti_dialog->tax_type_combo_text);
+    ti_dialog->entity_type_combo = NULL;
+
+    edit_button = glade_xml_get_widget (xml, "identity_edit_button");
+    ti_dialog->tax_identity_edit_button = edit_button;
+    g_signal_connect (G_OBJECT (edit_button), "clicked",
+                        G_CALLBACK (identity_edit_clicked_cb), ti_dialog);
+    ti_dialog->tax_type_changed = FALSE;
+  }
+
+  ti_dialog->income_txf_infos = load_txf_info (INCOME, ti_dialog);
+  ti_dialog->expense_txf_infos = load_txf_info (EXPENSE, ti_dialog);
+  ti_dialog->asset_txf_infos = load_txf_info (ASSET, ti_dialog);
+  ti_dialog->liab_eq_txf_infos = load_txf_info (LIAB_EQ, ti_dialog);
+
   /* tax information */
   {
     GtkListStore *store;
@@ -699,6 +1259,7 @@
     GtkWidget *button;
     GtkWidget *text;
 
+    ti_dialog->txf_info = glade_xml_get_widget (xml, "tax_info_vbox");
     button = glade_xml_get_widget (xml, "tax_related_button");
     ti_dialog->tax_related_button = button;
 
@@ -739,12 +1300,20 @@
     g_signal_connect (G_OBJECT (button), "toggled",
                       G_CALLBACK  (current_account_toggled_cb),
                         ti_dialog);
+
+    button = glade_xml_get_widget (xml, "copy_spin_button");
+    ti_dialog->copy_spin_button = button;
+
+    g_signal_connect (G_OBJECT (button), "value-changed",
+                      G_CALLBACK  (copy_number_value_changed_cb),
+                        ti_dialog);
   }
 
   /* account tree */
   {
-    GtkWidget *income_radio, *expense_radio, *box;
+    GtkWidget *income_radio, *expense_radio, *asset_radio, *liab_eq_radio, *box;
 
+    ti_dialog->acct_info = glade_xml_get_widget (xml, "acct_info_vbox");
     box = glade_xml_get_widget (xml, "account_scroll");
     tree_view = gnc_tree_view_account_new (FALSE);
     gnc_tree_view_account_set_filter (GNC_TREE_VIEW_ACCOUNT(tree_view), 
@@ -766,12 +1335,26 @@
 
     income_radio = glade_xml_get_widget (xml, "income_radio");
     expense_radio = glade_xml_get_widget (xml, "expense_radio");
+    ti_dialog->expense_radio = expense_radio;
+    asset_radio = glade_xml_get_widget (xml, "asset_radio");
+    ti_dialog->asset_radio = asset_radio;
+    liab_eq_radio = glade_xml_get_widget (xml, "liab_eq_radio");
+    ti_dialog->liab_eq_radio = liab_eq_radio;
     gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(expense_radio), TRUE);
+    ti_dialog->account_type = ACCT_TYPE_EXPENSE;
     g_signal_connect (G_OBJECT (income_radio), "toggled",
-                      G_CALLBACK  (gnc_tax_info_income_cb),
+                      G_CALLBACK  (gnc_tax_info_acct_type_cb),
                         ti_dialog);
-    //   gtk_button_clicked (GtkButton *button);
- }
+    g_signal_connect (G_OBJECT (expense_radio), "toggled",
+                      G_CALLBACK  (gnc_tax_info_acct_type_cb),
+                        ti_dialog);
+    g_signal_connect (G_OBJECT (asset_radio), "toggled",
+                      G_CALLBACK  (gnc_tax_info_acct_type_cb),
+                        ti_dialog);
+    g_signal_connect (G_OBJECT (liab_eq_radio), "toggled",
+                      G_CALLBACK  (gnc_tax_info_acct_type_cb),
+                        ti_dialog);
+  }
 
   /* select subaccounts button */
   {
@@ -788,7 +1371,7 @@
 		      ti_dialog);
   }
 
-  tax_info_show_income_accounts (ti_dialog, FALSE);
+  tax_info_show_acct_type_accounts (ti_dialog);
   gnc_tax_info_update_accounts (ti_dialog);
   clear_gui (ti_dialog);
   gnc_tax_info_set_changed (ti_dialog, FALSE);
@@ -822,8 +1405,6 @@
 {
   TaxInfoDialog *ti_dialog = user_data;
 
-/*  gnc_account_tree_refresh (GNC_ACCOUNT_TREE (ti_dialog->account_tree));*/
-
   gnc_tax_info_update_accounts (ti_dialog);
 }
 
@@ -853,7 +1434,7 @@
                                        GNC_ID_ACCOUNT,
                                        QOF_EVENT_MODIFY | QOF_EVENT_DESTROY);
 
-  gtk_widget_grab_focus (ti_dialog->account_treeview);
+  set_focus_sensitivity (ti_dialog);
 
   gtk_widget_show (ti_dialog->dialog);
 }

Modified: gnucash/trunk/src/gnome/glade/tax.glade
===================================================================
--- gnucash/trunk/src/gnome/glade/tax.glade	2009-11-11 21:17:32 UTC (rev 18412)
+++ gnucash/trunk/src/gnome/glade/tax.glade	2009-11-15 20:35:50 UTC (rev 18413)
@@ -1,733 +1,710 @@
-<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
-<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
-
+<?xml version="1.0"?>
 <glade-interface>
-<requires lib="gnome"/>
-
-<widget class="GtkDialog" id="Tax Information Dialog">
-  <property name="visible">False</property>
-  <property name="title" translatable="yes">Tax Information</property>
-  <property name="type">GTK_WINDOW_TOPLEVEL</property>
-  <property name="window_position">GTK_WIN_POS_NONE</property>
-  <property name="modal">False</property>
-  <property name="resizable">True</property>
-  <property name="destroy_with_parent">False</property>
-  <property name="decorated">True</property>
-  <property name="skip_taskbar_hint">False</property>
-  <property name="skip_pager_hint">False</property>
-  <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
-  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
-  <property name="focus_on_map">True</property>
-  <property name="has_separator">True</property>
-
-  <child internal-child="vbox">
-    <widget class="GtkVBox" id="dialog-vbox14">
-      <property name="visible">True</property>
-      <property name="homogeneous">False</property>
-      <property name="spacing">6</property>
-
-      <child internal-child="action_area">
-	<widget class="GtkHButtonBox" id="dialog-action_area14">
-	  <property name="visible">True</property>
-	  <property name="layout_style">GTK_BUTTONBOX_END</property>
-
-	  <child>
-	    <widget class="GtkButton" id="button73">
-	      <property name="visible">True</property>
-	      <property name="can_default">True</property>
-	      <property name="can_focus">True</property>
-	      <property name="label">gtk-cancel</property>
-	      <property name="use_stock">True</property>
-	      <property name="relief">GTK_RELIEF_NORMAL</property>
-	      <property name="focus_on_click">True</property>
-	      <property name="response_id">-6</property>
-	    </widget>
-	  </child>
-
-	  <child>
-	    <widget class="GtkButton" id="button75">
-	      <property name="visible">True</property>
-	      <property name="can_default">True</property>
-	      <property name="can_focus">True</property>
-	      <property name="label">gtk-ok</property>
-	      <property name="use_stock">True</property>
-	      <property name="relief">GTK_RELIEF_NORMAL</property>
-	      <property name="focus_on_click">True</property>
-	      <property name="response_id">-5</property>
-	    </widget>
-	  </child>
-	</widget>
-	<packing>
-	  <property name="padding">0</property>
-	  <property name="expand">False</property>
-	  <property name="fill">True</property>
-	  <property name="pack_type">GTK_PACK_END</property>
-	</packing>
-      </child>
-
-      <child>
-	<widget class="GtkHPaned" id="paned">
-	  <property name="visible">True</property>
-	  <property name="can_focus">True</property>
-	  <property name="position">0</property>
-
-	  <child>
-	    <widget class="GtkVBox" id="vbox97">
-	      <property name="border_width">6</property>
-	      <property name="visible">True</property>
-	      <property name="homogeneous">False</property>
-	      <property name="spacing">0</property>
-
-	      <child>
-		<widget class="GtkLabel" id="accounts_label">
-		  <property name="visible">True</property>
-		  <property name="label" translatable="yes">&lt;b&gt;_Accounts&lt;/b&gt;</property>
-		  <property name="use_underline">True</property>
-		  <property name="use_markup">True</property>
-		  <property name="justify">GTK_JUSTIFY_LEFT</property>
-		  <property name="wrap">False</property>
-		  <property name="selectable">False</property>
-		  <property name="xalign">0</property>
-		  <property name="yalign">0.5</property>
-		  <property name="xpad">0</property>
-		  <property name="ypad">0</property>
-		  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		  <property name="width_chars">-1</property>
-		  <property name="single_line_mode">False</property>
-		  <property name="angle">0</property>
-		</widget>
-		<packing>
-		  <property name="padding">0</property>
-		  <property name="expand">False</property>
-		  <property name="fill">False</property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkAlignment" id="alignment2">
-		  <property name="visible">True</property>
-		  <property name="xalign">0.5</property>
-		  <property name="yalign">0.5</property>
-		  <property name="xscale">1</property>
-		  <property name="yscale">1</property>
-		  <property name="top_padding">0</property>
-		  <property name="bottom_padding">0</property>
-		  <property name="left_padding">12</property>
-		  <property name="right_padding">0</property>
-
-		  <child>
-		    <widget class="GtkVBox" id="vbox96">
-		      <property name="visible">True</property>
-		      <property name="homogeneous">False</property>
-		      <property name="spacing">0</property>
-
-		      <child>
-			<widget class="GtkHButtonBox" id="hbox97">
-			  <property name="visible">True</property>
-			  <property name="layout_style">GTK_BUTTONBOX_SPREAD</property>
-			  <property name="spacing">0</property>
-
-			  <child>
-			    <widget class="GtkRadioButton" id="income_radio">
-			      <property name="visible">True</property>
-			      <property name="can_focus">True</property>
-			      <property name="label" translatable="yes">_Income</property>
-			      <property name="use_underline">True</property>
-			      <property name="relief">GTK_RELIEF_NORMAL</property>
-			      <property name="focus_on_click">True</property>
-			      <property name="active">False</property>
-			      <property name="inconsistent">False</property>
-			      <property name="draw_indicator">True</property>
-			    </widget>
-			  </child>
-
-			  <child>
-			    <widget class="GtkRadioButton" id="expense_radio">
-			      <property name="visible">True</property>
-			      <property name="can_focus">True</property>
-			      <property name="label" translatable="yes">_Expense</property>
-			      <property name="use_underline">True</property>
-			      <property name="relief">GTK_RELIEF_NORMAL</property>
-			      <property name="focus_on_click">True</property>
-			      <property name="active">True</property>
-			      <property name="inconsistent">False</property>
-			      <property name="draw_indicator">True</property>
-			      <property name="group">income_radio</property>
-			    </widget>
-			  </child>
-			</widget>
-			<packing>
-			  <property name="padding">2</property>
-			  <property name="expand">False</property>
-			  <property name="fill">False</property>
-			</packing>
-		      </child>
-
-		      <child>
-			<widget class="GtkScrolledWindow" id="account_scroll">
-			  <property name="visible">True</property>
-			  <property name="can_focus">True</property>
-			  <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
-			  <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
-			  <property name="shadow_type">GTK_SHADOW_IN</property>
-			  <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
-
-			  <child>
-			    <placeholder/>
-			  </child>
-			</widget>
-			<packing>
-			  <property name="padding">0</property>
-			  <property name="expand">True</property>
-			  <property name="fill">True</property>
-			</packing>
-		      </child>
-
-		      <child>
-			<widget class="GtkHBox" id="hbox98">
-			  <property name="border_width">3</property>
-			  <property name="visible">True</property>
-			  <property name="homogeneous">False</property>
-			  <property name="spacing">2</property>
-
-			  <child>
-			    <widget class="GtkLabel" id="label42">
-			      <property name="visible">True</property>
-			      <property name="label" translatable="yes"></property>
-			      <property name="use_underline">False</property>
-			      <property name="use_markup">False</property>
-			      <property name="justify">GTK_JUSTIFY_LEFT</property>
-			      <property name="wrap">False</property>
-			      <property name="selectable">False</property>
-			      <property name="xalign">0.5</property>
-			      <property name="yalign">0.5</property>
-			      <property name="xpad">0</property>
-			      <property name="ypad">0</property>
-			      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-			      <property name="width_chars">-1</property>
-			      <property name="single_line_mode">False</property>
-			      <property name="angle">0</property>
-			    </widget>
-			    <packing>
-			      <property name="padding">0</property>
-			      <property name="expand">True</property>
-			      <property name="fill">False</property>
-			    </packing>
-			  </child>
-
-			  <child>
-			    <widget class="GtkLabel" id="label847733">
-			      <property name="visible">True</property>
-			      <property name="label" translatable="yes">Accounts Selected:</property>
-			      <property name="use_underline">False</property>
-			      <property name="use_markup">False</property>
-			      <property name="justify">GTK_JUSTIFY_CENTER</property>
-			      <property name="wrap">False</property>
-			      <property name="selectable">False</property>
-			      <property name="xalign">1</property>
-			      <property name="yalign">0.5</property>
-			      <property name="xpad">0</property>
-			      <property name="ypad">0</property>
-			      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-			      <property name="width_chars">-1</property>
-			      <property name="single_line_mode">False</property>
-			      <property name="angle">0</property>
-			    </widget>
-			    <packing>
-			      <property name="padding">0</property>
-			      <property name="expand">False</property>
-			      <property name="fill">False</property>
-			    </packing>
-			  </child>
-
-			  <child>
-			    <widget class="GtkLabel" id="num_accounts_label">
-			      <property name="visible">True</property>
-			      <property name="label" translatable="yes">0</property>
-			      <property name="use_underline">False</property>
-			      <property name="use_markup">False</property>
-			      <property name="justify">GTK_JUSTIFY_CENTER</property>
-			      <property name="wrap">False</property>
-			      <property name="selectable">False</property>
-			      <property name="xalign">0.5</property>
-			      <property name="yalign">0.5</property>
-			      <property name="xpad">0</property>
-			      <property name="ypad">0</property>
-			      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-			      <property name="width_chars">-1</property>
-			      <property name="single_line_mode">False</property>
-			      <property name="angle">0</property>
-			    </widget>
-			    <packing>
-			      <property name="padding">0</property>
-			      <property name="expand">False</property>
-			      <property name="fill">False</property>
-			    </packing>
-			  </child>
-
-			  <child>
-			    <widget class="GtkLabel" id="label43">
-			      <property name="visible">True</property>
-			      <property name="label" translatable="yes"></property>
-			      <property name="use_underline">False</property>
-			      <property name="use_markup">False</property>
-			      <property name="justify">GTK_JUSTIFY_LEFT</property>
-			      <property name="wrap">False</property>
-			      <property name="selectable">False</property>
-			      <property name="xalign">0.5</property>
-			      <property name="yalign">0.5</property>
-			      <property name="xpad">0</property>
-			      <property name="ypad">0</property>
-			      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-			      <property name="width_chars">-1</property>
-			      <property name="single_line_mode">False</property>
-			      <property name="angle">0</property>
-			    </widget>
-			    <packing>
-			      <property name="padding">0</property>
-			      <property name="expand">True</property>
-			      <property name="fill">False</property>
-			    </packing>
-			  </child>
-			</widget>
-			<packing>
-			  <property name="padding">0</property>
-			  <property name="expand">False</property>
-			  <property name="fill">True</property>
-			</packing>
-		      </child>
-
-		      <child>
-			<widget class="GtkHButtonBox" id="hbox99">
-			  <property name="visible">True</property>
-			  <property name="layout_style">GTK_BUTTONBOX_DEFAULT_STYLE</property>
-			  <property name="spacing">0</property>
-
-			  <child>
-			    <widget class="GtkButton" id="select_subaccounts_button">
-			      <property name="border_width">3</property>
-			      <property name="visible">True</property>
-			      <property name="can_focus">True</property>
-			      <property name="relief">GTK_RELIEF_NORMAL</property>
-			      <property name="focus_on_click">True</property>
-
-			      <child>
-				<widget class="GtkAlignment" id="alignment1">
-				  <property name="visible">True</property>
-				  <property name="xalign">0.5</property>
-				  <property name="yalign">0.5</property>
-				  <property name="xscale">0</property>
-				  <property name="yscale">0</property>
-				  <property name="top_padding">0</property>
-				  <property name="bottom_padding">0</property>
-				  <property name="left_padding">0</property>
-				  <property name="right_padding">0</property>
-
-				  <child>
-				    <widget class="GtkHBox" id="hbox100">
-				      <property name="visible">True</property>
-				      <property name="homogeneous">False</property>
-				      <property name="spacing">2</property>
-
-				      <child>
-					<widget class="GtkImage" id="image1">
-					  <property name="visible">True</property>
-					  <property name="stock">gtk-add</property>
-					  <property name="icon_size">4</property>
-					  <property name="xalign">0.5</property>
-					  <property name="yalign">0.5</property>
-					  <property name="xpad">0</property>
-					  <property name="ypad">0</property>
-					</widget>
-					<packing>
-					  <property name="padding">0</property>
-					  <property name="expand">False</property>
-					  <property name="fill">False</property>
-					</packing>
-				      </child>
-
-				      <child>
-					<widget class="GtkLabel" id="label847737">
-					  <property name="visible">True</property>
-					  <property name="label" translatable="yes">_Select Subaccounts</property>
-					  <property name="use_underline">True</property>
-					  <property name="use_markup">False</property>
-					  <property name="justify">GTK_JUSTIFY_LEFT</property>
-					  <property name="wrap">False</property>
-					  <property name="selectable">False</property>
-					  <property name="xalign">0.5</property>
-					  <property name="yalign">0.5</property>
-					  <property name="xpad">0</property>
-					  <property name="ypad">0</property>
-					  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-					  <property name="width_chars">-1</property>
-					  <property name="single_line_mode">False</property>
-					  <property name="angle">0</property>
-					</widget>
-					<packing>
-					  <property name="padding">0</property>
-					  <property name="expand">False</property>
-					  <property name="fill">False</property>
-					</packing>
-				      </child>
-				    </widget>
-				  </child>
-				</widget>
-			      </child>
-			    </widget>
-			  </child>
-			</widget>
-			<packing>
-			  <property name="padding">0</property>
-			  <property name="expand">False</property>
-			  <property name="fill">True</property>
-			</packing>
-		      </child>
-		    </widget>
-		  </child>
-		</widget>
-		<packing>
-		  <property name="padding">0</property>
-		  <property name="expand">True</property>
-		  <property name="fill">True</property>
-		</packing>
-	      </child>
-	    </widget>
-	    <packing>
-	      <property name="shrink">False</property>
-	      <property name="resize">False</property>
-	    </packing>
-	  </child>
-
-	  <child>
-	    <widget class="GtkVBox" id="tax_info_vbox">
-	      <property name="border_width">6</property>
-	      <property name="visible">True</property>
-	      <property name="homogeneous">False</property>
-	      <property name="spacing">12</property>
-
-	      <child>
-		<widget class="GtkVBox" id="vbox100">
-		  <property name="visible">True</property>
-		  <property name="homogeneous">False</property>
-		  <property name="spacing">0</property>
-
-		  <child>
-		    <widget class="GtkLabel" id="label847734">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">&lt;b&gt;Tax Information&lt;/b&gt;</property>
-		      <property name="use_underline">False</property>
-		      <property name="use_markup">True</property>
-		      <property name="justify">GTK_JUSTIFY_LEFT</property>
-		      <property name="wrap">False</property>
-		      <property name="selectable">False</property>
-		      <property name="xalign">0</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">0</property>
-		      <property name="ypad">0</property>
-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		      <property name="width_chars">-1</property>
-		      <property name="single_line_mode">False</property>
-		      <property name="angle">0</property>
-		    </widget>
-		    <packing>
-		      <property name="padding">0</property>
-		      <property name="expand">False</property>
-		      <property name="fill">False</property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkAlignment" id="alignment4">
-		      <property name="visible">True</property>
-		      <property name="xalign">0.5</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xscale">1</property>
-		      <property name="yscale">1</property>
-		      <property name="top_padding">0</property>
-		      <property name="bottom_padding">0</property>
-		      <property name="left_padding">12</property>
-		      <property name="right_padding">0</property>
-
-		      <child>
-			<widget class="GtkCheckButton" id="tax_related_button">
-			  <property name="visible">True</property>
-			  <property name="can_focus">True</property>
-			  <property name="label" translatable="yes">Tax _Related</property>
-			  <property name="use_underline">True</property>
-			  <property name="relief">GTK_RELIEF_NORMAL</property>
-			  <property name="focus_on_click">True</property>
-			  <property name="active">False</property>
-			  <property name="inconsistent">False</property>
-			  <property name="draw_indicator">True</property>
-			</widget>
-		      </child>
-		    </widget>
-		    <packing>
-		      <property name="padding">0</property>
-		      <property name="expand">True</property>
-		      <property name="fill">True</property>
-		    </packing>
-		  </child>
-		</widget>
-		<packing>
-		  <property name="padding">0</property>
-		  <property name="expand">False</property>
-		  <property name="fill">False</property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkVBox" id="txf_categories_vbox">
-		  <property name="visible">True</property>
-		  <property name="sensitive">False</property>
-		  <property name="homogeneous">False</property>
-		  <property name="spacing">0</property>
-
-		  <child>
-		    <widget class="GtkLabel" id="txf_category_label">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">&lt;b&gt;_TXF Categories&lt;/b&gt;</property>
-		      <property name="use_underline">True</property>
-		      <property name="use_markup">True</property>
-		      <property name="justify">GTK_JUSTIFY_LEFT</property>
-		      <property name="wrap">False</property>
-		      <property name="selectable">False</property>
-		      <property name="xalign">0</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">0</property>
-		      <property name="ypad">0</property>
-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		      <property name="width_chars">-1</property>
-		      <property name="single_line_mode">False</property>
-		      <property name="angle">0</property>
-		    </widget>
-		    <packing>
-		      <property name="padding">0</property>
-		      <property name="expand">False</property>
-		      <property name="fill">False</property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkAlignment" id="alignment5">
-		      <property name="visible">True</property>
-		      <property name="xalign">0.5</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xscale">1</property>
-		      <property name="yscale">1</property>
-		      <property name="top_padding">0</property>
-		      <property name="bottom_padding">0</property>
-		      <property name="left_padding">12</property>
-		      <property name="right_padding">0</property>
-
-		      <child>
-			<widget class="GtkScrolledWindow" id="scrolledwindow28">
-			  <property name="visible">True</property>
-			  <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
-			  <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
-			  <property name="shadow_type">GTK_SHADOW_IN</property>
-			  <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
-
-			  <child>
-			    <widget class="GtkTreeView" id="txf_category_view">
-			      <property name="visible">True</property>
-			      <property name="can_focus">True</property>
-			      <property name="headers_visible">True</property>
-			      <property name="rules_hint">True</property>
-			      <property name="reorderable">True</property>
-			      <property name="enable_search">True</property>
-			      <property name="fixed_height_mode">False</property>
-			      <property name="hover_selection">False</property>
-			      <property name="hover_expand">False</property>
-			    </widget>
-			  </child>
-			</widget>
-		      </child>
-		    </widget>
-		    <packing>
-		      <property name="padding">0</property>
-		      <property name="expand">True</property>
-		      <property name="fill">True</property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkAlignment" id="alignment6">
-		      <property name="visible">True</property>
-		      <property name="xalign">0.5</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xscale">1</property>
-		      <property name="yscale">1</property>
-		      <property name="top_padding">0</property>
-		      <property name="bottom_padding">0</property>
-		      <property name="left_padding">12</property>
-		      <property name="right_padding">0</property>
-
-		      <child>
-			<widget class="GtkScrolledWindow" id="help_scroll">
-			  <property name="visible">True</property>
-			  <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
-			  <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
-			  <property name="shadow_type">GTK_SHADOW_IN</property>
-			  <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
-
-			  <child>
-			    <widget class="GtkTextView" id="txf_help_text">
-			      <property name="visible">True</property>
-			      <property name="sensitive">False</property>
-			      <property name="editable">False</property>
-			      <property name="overwrite">False</property>
-			      <property name="accepts_tab">True</property>
-			      <property name="justification">GTK_JUSTIFY_LEFT</property>
-			      <property name="wrap_mode">GTK_WRAP_WORD</property>
-			      <property name="cursor_visible">True</property>
-			      <property name="pixels_above_lines">0</property>
-			      <property name="pixels_below_lines">0</property>
-			      <property name="pixels_inside_wrap">0</property>
-			      <property name="left_margin">0</property>
-			      <property name="right_margin">0</property>
-			      <property name="indent">0</property>
-			      <property name="text" translatable="yes"></property>
-			    </widget>
-			  </child>
-			</widget>
-		      </child>
-		    </widget>
-		    <packing>
-		      <property name="padding">0</property>
-		      <property name="expand">False</property>
-		      <property name="fill">False</property>
-		    </packing>
-		  </child>
-		</widget>
-		<packing>
-		  <property name="padding">0</property>
-		  <property name="expand">True</property>
-		  <property name="fill">True</property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkVBox" id="payer_name_source_vbox">
-		  <property name="visible">True</property>
-		  <property name="sensitive">False</property>
-		  <property name="homogeneous">False</property>
-		  <property name="spacing">0</property>
-
-		  <child>
-		    <widget class="GtkLabel" id="label847736">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">&lt;b&gt;Payer Name Source&lt;/b&gt;</property>
-		      <property name="use_underline">False</property>
-		      <property name="use_markup">True</property>
-		      <property name="justify">GTK_JUSTIFY_LEFT</property>
-		      <property name="wrap">False</property>
-		      <property name="selectable">False</property>
-		      <property name="xalign">0</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">0</property>
-		      <property name="ypad">0</property>
-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		      <property name="width_chars">-1</property>
-		      <property name="single_line_mode">False</property>
-		      <property name="angle">0</property>
-		    </widget>
-		    <packing>
-		      <property name="padding">0</property>
-		      <property name="expand">False</property>
-		      <property name="fill">False</property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkAlignment" id="alignment7">
-		      <property name="visible">True</property>
-		      <property name="xalign">0.5</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xscale">1</property>
-		      <property name="yscale">1</property>
-		      <property name="top_padding">0</property>
-		      <property name="bottom_padding">0</property>
-		      <property name="left_padding">12</property>
-		      <property name="right_padding">0</property>
-
-		      <child>
-			<widget class="GtkRadioButton" id="current_account_button">
-			  <property name="visible">True</property>
-			  <property name="can_focus">True</property>
-			  <property name="label" translatable="yes">C_urrent Account</property>
-			  <property name="use_underline">True</property>
-			  <property name="relief">GTK_RELIEF_NORMAL</property>
-			  <property name="focus_on_click">True</property>
-			  <property name="active">False</property>
-			  <property name="inconsistent">False</property>
-			  <property name="draw_indicator">True</property>
-			</widget>
-		      </child>
-		    </widget>
-		    <packing>
-		      <property name="padding">0</property>
-		      <property name="expand">True</property>
-		      <property name="fill">True</property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkAlignment" id="alignment8">
-		      <property name="visible">True</property>
-		      <property name="xalign">0.5</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xscale">1</property>
-		      <property name="yscale">1</property>
-		      <property name="top_padding">0</property>
-		      <property name="bottom_padding">0</property>
-		      <property name="left_padding">12</property>
-		      <property name="right_padding">0</property>
-
-		      <child>
-			<widget class="GtkRadioButton" id="parent_account_button">
-			  <property name="visible">True</property>
-			  <property name="can_focus">True</property>
-			  <property name="label" translatable="yes">_Parent Account</property>
-			  <property name="use_underline">True</property>
-			  <property name="relief">GTK_RELIEF_NORMAL</property>
-			  <property name="focus_on_click">True</property>
-			  <property name="active">False</property>
-			  <property name="inconsistent">False</property>
-			  <property name="draw_indicator">True</property>
-			  <property name="group">current_account_button</property>
-			</widget>
-		      </child>
-		    </widget>
-		    <packing>
-		      <property name="padding">0</property>
-		      <property name="expand">False</property>
-		      <property name="fill">False</property>
-		    </packing>
-		  </child>
-		</widget>
-		<packing>
-		  <property name="padding">0</property>
-		  <property name="expand">False</property>
-		  <property name="fill">False</property>
-		</packing>
-	      </child>
-	    </widget>
-	    <packing>
-	      <property name="shrink">False</property>
-	      <property name="resize">True</property>
-	    </packing>
-	  </child>
-	</widget>
-	<packing>
-	  <property name="padding">0</property>
-	  <property name="expand">True</property>
-	  <property name="fill">True</property>
-	</packing>
-      </child>
-    </widget>
-  </child>
-</widget>
-
+  <!-- interface-requires gtk+ 2.16 -->
+  <!-- interface-naming-policy toplevel-contextual -->
+  <widget class="GtkDialog" id="Tax Information Dialog">
+    <property name="title" translatable="yes">Income Tax Information</property>
+    <property name="type_hint">dialog</property>
+    <child internal-child="vbox">
+      <widget class="GtkVBox" id="dialog-vbox14">
+        <property name="visible">True</property>
+        <property name="spacing">6</property>
+        <child>
+          <widget class="GtkVBox" id="vbox101">
+            <property name="visible">True</property>
+            <child>
+              <widget class="GtkAlignment" id="alignment14">
+                <property name="visible">True</property>
+                <property name="left_padding">5</property>
+                <child>
+                  <widget class="GtkLabel" id="label847741">
+                    <property name="visible">True</property>
+                    <property name="xalign">0</property>
+                    <property name="label" translatable="yes">&lt;b&gt;Income Tax Identity&lt;/b&gt;</property>
+                    <property name="use_markup">True</property>
+                    <property name="use_underline">True</property>
+                  </widget>
+                </child>
+              </widget>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <widget class="GtkAlignment" id="alignment16">
+                <property name="visible">True</property>
+                <property name="xalign">0</property>
+                <property name="xscale">0</property>
+                <property name="yscale">0</property>
+                <property name="top_padding">4</property>
+                <property name="left_padding">12</property>
+                <child>
+                  <widget class="GtkTable" id="table1">
+                    <property name="visible">True</property>
+                    <property name="n_rows">3</property>
+                    <property name="n_columns">2</property>
+                    <child>
+                      <widget class="GtkAlignment" id="alignment17">
+                        <property name="visible">True</property>
+                        <property name="xalign">1</property>
+                        <property name="yscale">0</property>
+                        <property name="left_padding">12</property>
+                        <child>
+                          <widget class="GtkLabel" id="label847743">
+                            <property name="visible">True</property>
+                            <property name="xalign">1</property>
+                            <property name="label" translatable="yes">Name:</property>
+                            <property name="use_markup">True</property>
+                            <property name="use_underline">True</property>
+                            <property name="justify">right</property>
+                          </widget>
+                        </child>
+                      </widget>
+                      <packing>
+                        <property name="y_options">GTK_FILL</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkAlignment" id="alignment18">
+                        <property name="visible">True</property>
+                        <property name="xalign">1</property>
+                        <property name="yscale">0</property>
+                        <property name="left_padding">12</property>
+                        <child>
+                          <widget class="GtkLabel" id="label847742">
+                            <property name="visible">True</property>
+                            <property name="xalign">1</property>
+                            <property name="label" translatable="yes">Type:</property>
+                            <property name="use_markup">True</property>
+                            <property name="use_underline">True</property>
+                            <property name="justify">right</property>
+                          </widget>
+                        </child>
+                      </widget>
+                      <packing>
+                        <property name="top_attach">1</property>
+                        <property name="bottom_attach">2</property>
+                        <property name="y_options">GTK_FILL</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkAlignment" id="alignment19">
+                        <property name="visible">True</property>
+                        <property name="xalign">0</property>
+                        <property name="xscale">0</property>
+                        <property name="yscale">0</property>
+                        <property name="left_padding">12</property>
+                        <child>
+                          <widget class="GtkLabel" id="entity_name">
+                            <property name="visible">True</property>
+                            <property name="xalign">0</property>
+                          </widget>
+                        </child>
+                      </widget>
+                      <packing>
+                        <property name="left_attach">1</property>
+                        <property name="right_attach">2</property>
+                        <property name="y_options">GTK_FILL</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkAlignment" id="alignment21">
+                        <property name="visible">True</property>
+                        <property name="xalign">1</property>
+                        <property name="yscale">0</property>
+                        <property name="left_padding">12</property>
+                        <child>
+                          <widget class="GtkButton" id="identity_edit_button">
+                            <property name="label">gtk-edit</property>
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="receives_default">False</property>
+                            <property name="tooltip" translatable="yes">Click to change Tax Name and/or Tax Type</property>
+                            <property name="use_stock">True</property>
+                          </widget>
+                        </child>
+                      </widget>
+                      <packing>
+                        <property name="right_attach">2</property>
+                        <property name="top_attach">2</property>
+                        <property name="bottom_attach">3</property>
+                        <property name="x_options"></property>
+                        <property name="y_options"></property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkAlignment" id="alignment3">
+                        <property name="visible">True</property>
+                        <property name="xalign">0</property>
+                        <property name="xscale">0</property>
+                        <property name="yscale">0</property>
+                        <property name="left_padding">12</property>
+                        <child>
+                          <widget class="GtkLabel" id="entity_type">
+                            <property name="visible">True</property>
+                            <property name="xalign">0</property>
+                          </widget>
+                        </child>
+                      </widget>
+                      <packing>
+                        <property name="left_attach">1</property>
+                        <property name="right_attach">2</property>
+                        <property name="top_attach">1</property>
+                        <property name="bottom_attach">2</property>
+                        <property name="y_options">GTK_FILL</property>
+                      </packing>
+                    </child>
+                  </widget>
+                </child>
+              </widget>
+              <packing>
+                <property name="position">1</property>
+              </packing>
+            </child>
+          </widget>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">False</property>
+            <property name="position">2</property>
+          </packing>
+        </child>
+        <child>
+          <widget class="GtkHPaned" id="paned">
+            <property name="visible">True</property>
+            <property name="can_focus">True</property>
+            <child>
+              <widget class="GtkVBox" id="acct_info_vbox">
+                <property name="visible">True</property>
+                <property name="border_width">6</property>
+                <child>
+                  <widget class="GtkLabel" id="accounts_label">
+                    <property name="visible">True</property>
+                    <property name="xalign">0</property>
+                    <property name="label" translatable="yes">&lt;b&gt;_Accounts&lt;/b&gt;</property>
+                    <property name="use_markup">True</property>
+                    <property name="use_underline">True</property>
+                  </widget>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">False</property>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkAlignment" id="alignment2">
+                    <property name="visible">True</property>
+                    <property name="left_padding">12</property>
+                    <child>
+                      <widget class="GtkVBox" id="vbox96">
+                        <property name="visible">True</property>
+                        <child>
+                          <widget class="GtkTable" id="table3">
+                            <property name="visible">True</property>
+                            <property name="n_rows">2</property>
+                            <property name="n_columns">2</property>
+                            <child>
+                              <widget class="GtkRadioButton" id="income_radio">
+                                <property name="label" translatable="yes">_Income</property>
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="receives_default">False</property>
+                                <property name="use_underline">True</property>
+                                <property name="active">True</property>
+                                <property name="draw_indicator">True</property>
+                              </widget>
+                            </child>
+                            <child>
+                              <widget class="GtkRadioButton" id="expense_radio">
+                                <property name="label" translatable="yes">_Expense</property>
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="receives_default">False</property>
+                                <property name="use_underline">True</property>
+                                <property name="draw_indicator">True</property>
+                                <property name="group">income_radio</property>
+                              </widget>
+                              <packing>
+                                <property name="left_attach">1</property>
+                                <property name="right_attach">2</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <widget class="GtkRadioButton" id="asset_radio">
+                                <property name="label" translatable="yes">_Asset</property>
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="receives_default">False</property>
+                                <property name="use_underline">True</property>
+                                <property name="draw_indicator">True</property>
+                                <property name="group">income_radio</property>
+                              </widget>
+                              <packing>
+                                <property name="top_attach">1</property>
+                                <property name="bottom_attach">2</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <widget class="GtkRadioButton" id="liab_eq_radio">
+                                <property name="label" translatable="yes">_Liability/Equity</property>
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="receives_default">False</property>
+                                <property name="use_underline">True</property>
+                                <property name="draw_indicator">True</property>
+                                <property name="group">income_radio</property>
+                              </widget>
+                              <packing>
+                                <property name="left_attach">1</property>
+                                <property name="right_attach">2</property>
+                                <property name="top_attach">1</property>
+                                <property name="bottom_attach">2</property>
+                              </packing>
+                            </child>
+                          </widget>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="position">0</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <widget class="GtkScrolledWindow" id="account_scroll">
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="hscrollbar_policy">automatic</property>
+                            <property name="vscrollbar_policy">automatic</property>
+                            <property name="shadow_type">in</property>
+                            <child>
+                              <placeholder/>
+                            </child>
+                          </widget>
+                          <packing>
+                            <property name="position">1</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <widget class="GtkHBox" id="hbox98">
+                            <property name="visible">True</property>
+                            <property name="border_width">3</property>
+                            <property name="spacing">2</property>
+                            <child>
+                              <widget class="GtkLabel" id="label42">
+                                <property name="visible">True</property>
+                              </widget>
+                              <packing>
+                                <property name="fill">False</property>
+                                <property name="position">0</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <widget class="GtkLabel" id="label847733">
+                                <property name="visible">True</property>
+                                <property name="xalign">1</property>
+                                <property name="label" translatable="yes">Accounts Selected:</property>
+                                <property name="justify">center</property>
+                              </widget>
+                              <packing>
+                                <property name="expand">False</property>
+                                <property name="fill">False</property>
+                                <property name="position">1</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <widget class="GtkLabel" id="num_accounts_label">
+                                <property name="visible">True</property>
+                                <property name="label" translatable="yes">0</property>
+                                <property name="justify">center</property>
+                              </widget>
+                              <packing>
+                                <property name="expand">False</property>
+                                <property name="fill">False</property>
+                                <property name="position">2</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <widget class="GtkLabel" id="label43">
+                                <property name="visible">True</property>
+                              </widget>
+                              <packing>
+                                <property name="fill">False</property>
+                                <property name="position">3</property>
+                              </packing>
+                            </child>
+                          </widget>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="position">2</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <widget class="GtkHButtonBox" id="hbox99">
+                            <property name="visible">True</property>
+                            <child>
+                              <widget class="GtkButton" id="select_subaccounts_button">
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="receives_default">True</property>
+                                <property name="border_width">3</property>
+                                <child>
+                                  <widget class="GtkAlignment" id="alignment1">
+                                    <property name="visible">True</property>
+                                    <property name="xscale">0</property>
+                                    <property name="yscale">0</property>
+                                    <child>
+                                      <widget class="GtkHBox" id="hbox100">
+                                        <property name="visible">True</property>
+                                        <property name="spacing">2</property>
+                                        <child>
+                                          <widget class="GtkImage" id="image1">
+                                            <property name="visible">True</property>
+                                            <property name="stock">gtk-add</property>
+                                            <property name="icon-size">4</property>
+                                          </widget>
+                                          <packing>
+                                            <property name="expand">False</property>
+                                            <property name="fill">False</property>
+                                            <property name="position">0</property>
+                                          </packing>
+                                        </child>
+                                        <child>
+                                          <widget class="GtkLabel" id="label847737">
+                                            <property name="visible">True</property>
+                                            <property name="label" translatable="yes">_Select Subaccounts</property>
+                                            <property name="use_underline">True</property>
+                                          </widget>
+                                          <packing>
+                                            <property name="expand">False</property>
+                                            <property name="fill">False</property>
+                                            <property name="position">1</property>
+                                          </packing>
+                                        </child>
+                                      </widget>
+                                    </child>
+                                  </widget>
+                                </child>
+                              </widget>
+                              <packing>
+                                <property name="expand">False</property>
+                                <property name="fill">False</property>
+                                <property name="position">0</property>
+                              </packing>
+                            </child>
+                          </widget>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="position">3</property>
+                          </packing>
+                        </child>
+                      </widget>
+                    </child>
+                  </widget>
+                  <packing>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+              </widget>
+              <packing>
+                <property name="resize">False</property>
+                <property name="shrink">False</property>
+              </packing>
+            </child>
+            <child>
+              <widget class="GtkVBox" id="tax_info_vbox">
+                <property name="visible">True</property>
+                <property name="border_width">6</property>
+                <property name="spacing">12</property>
+                <child>
+                  <widget class="GtkVBox" id="vbox100">
+                    <property name="visible">True</property>
+                    <child>
+                      <widget class="GtkLabel" id="label847734">
+                        <property name="visible">True</property>
+                        <property name="xalign">0</property>
+                        <property name="label" translatable="yes">&lt;b&gt;Account Tax Information&lt;/b&gt;</property>
+                        <property name="use_markup">True</property>
+                      </widget>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">False</property>
+                        <property name="position">0</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkAlignment" id="alignment13">
+                        <property name="visible">True</property>
+                        <property name="left_padding">12</property>
+                        <child>
+                          <widget class="GtkCheckButton" id="tax_related_button">
+                            <property name="label" translatable="yes">Tax _Related</property>
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="receives_default">False</property>
+                            <property name="use_underline">True</property>
+                            <property name="draw_indicator">True</property>
+                          </widget>
+                        </child>
+                      </widget>
+                      <packing>
+                        <property name="position">1</property>
+                      </packing>
+                    </child>
+                  </widget>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">False</property>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkVBox" id="txf_categories_vbox">
+                    <property name="visible">True</property>
+                    <property name="sensitive">False</property>
+                    <child>
+                      <widget class="GtkLabel" id="txf_category_label">
+                        <property name="visible">True</property>
+                        <property name="xalign">0</property>
+                        <property name="label" translatable="yes">&lt;b&gt;_TXF Categories&lt;/b&gt;</property>
+                        <property name="use_markup">True</property>
+                        <property name="use_underline">True</property>
+                      </widget>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">False</property>
+                        <property name="position">0</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkAlignment" id="alignment5">
+                        <property name="visible">True</property>
+                        <property name="left_padding">12</property>
+                        <child>
+                          <widget class="GtkScrolledWindow" id="scrolledwindow28">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="hscrollbar_policy">automatic</property>
+                            <property name="vscrollbar_policy">automatic</property>
+                            <property name="shadow_type">in</property>
+                            <child>
+                              <widget class="GtkTreeView" id="txf_category_view">
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="reorderable">True</property>
+                                <property name="rules_hint">True</property>
+                              </widget>
+                            </child>
+                          </widget>
+                        </child>
+                      </widget>
+                      <packing>
+                        <property name="position">1</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkAlignment" id="alignment6">
+                        <property name="visible">True</property>
+                        <property name="left_padding">12</property>
+                        <child>
+                          <widget class="GtkScrolledWindow" id="help_scroll">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="hscrollbar_policy">automatic</property>
+                            <property name="vscrollbar_policy">automatic</property>
+                            <property name="shadow_type">in</property>
+                            <child>
+                              <widget class="GtkTextView" id="txf_help_text">
+                                <property name="visible">True</property>
+                                <property name="sensitive">False</property>
+                                <property name="editable">False</property>
+                                <property name="wrap_mode">word</property>
+                              </widget>
+                            </child>
+                          </widget>
+                        </child>
+                      </widget>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">False</property>
+                        <property name="position">2</property>
+                      </packing>
+                    </child>
+                  </widget>
+                  <packing>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkHBox" id="pns_copy_hbox">
+                    <property name="visible">True</property>
+                    <property name="spacing">30</property>
+                    <child>
+                      <widget class="GtkVBox" id="payer_name_source_vbox">
+                        <property name="visible">True</property>
+                        <property name="sensitive">False</property>
+                        <child>
+                          <widget class="GtkLabel" id="label847736">
+                            <property name="visible">True</property>
+                            <property name="xalign">0</property>
+                            <property name="label" translatable="yes">&lt;b&gt;Payer Name Source&lt;/b&gt;</property>
+                            <property name="use_markup">True</property>
+                          </widget>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">False</property>
+                            <property name="position">0</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <widget class="GtkAlignment" id="alignment7">
+                            <property name="visible">True</property>
+                            <property name="left_padding">12</property>
+                            <child>
+                              <widget class="GtkRadioButton" id="current_account_button">
+                                <property name="label" translatable="yes">C_urrent Account</property>
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="receives_default">False</property>
+                                <property name="use_underline">True</property>
+                                <property name="draw_indicator">True</property>
+                              </widget>
+                            </child>
+                          </widget>
+                          <packing>
+                            <property name="position">1</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <widget class="GtkAlignment" id="alignment8">
+                            <property name="visible">True</property>
+                            <property name="left_padding">12</property>
+                            <child>
+                              <widget class="GtkRadioButton" id="parent_account_button">
+                                <property name="label" translatable="yes">_Parent Account</property>
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="receives_default">False</property>
+                                <property name="use_underline">True</property>
+                                <property name="draw_indicator">True</property>
+                                <property name="group">current_account_button</property>
+                              </widget>
+                            </child>
+                          </widget>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">False</property>
+                            <property name="position">2</property>
+                          </packing>
+                        </child>
+                      </widget>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">False</property>
+                        <property name="position">0</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkVBox" id="copy_number_vbox">
+                        <property name="visible">True</property>
+                        <property name="sensitive">False</property>
+                        <child>
+                          <widget class="GtkLabel" id="label847738">
+                            <property name="visible">True</property>
+                            <property name="xalign">0</property>
+                            <property name="label" translatable="yes">&lt;b&gt;Copy Number&lt;/b&gt;</property>
+                            <property name="use_markup">True</property>
+                          </widget>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">False</property>
+                            <property name="position">0</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <widget class="GtkAlignment" id="alignment11">
+                            <property name="visible">True</property>
+                            <property name="left_padding">12</property>
+                            <child>
+                              <widget class="GtkSpinButton" id="copy_spin_button">
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="adjustment">1 1 100 1 0 0</property>
+                                <property name="climb_rate">1</property>
+                              </widget>
+                            </child>
+                          </widget>
+                          <packing>
+                            <property name="position">1</property>
+                          </packing>
+                        </child>
+                      </widget>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">False</property>
+                        <property name="position">1</property>
+                      </packing>
+                    </child>
+                  </widget>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">False</property>
+                    <property name="position">2</property>
+                  </packing>
+                </child>
+              </widget>
+              <packing>
+                <property name="resize">True</property>
+                <property name="shrink">False</property>
+              </packing>
+            </child>
+          </widget>
+          <packing>
+            <property name="position">3</property>
+          </packing>
+        </child>
+        <child internal-child="action_area">
+          <widget class="GtkHButtonBox" id="dialog-action_area14">
+            <property name="visible">True</property>
+            <property name="layout_style">end</property>
+            <child>
+              <widget class="GtkButton" id="button73">
+                <property name="label">gtk-cancel</property>
+                <property name="response_id">-6</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_stock">True</property>
+              </widget>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <widget class="GtkButton" id="button75">
+                <property name="label">gtk-ok</property>
+                <property name="response_id">-5</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_stock">True</property>
+              </widget>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+          </widget>
+          <packing>
+            <property name="expand">False</property>
+            <property name="pack_type">end</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+      </widget>
+    </child>
+  </widget>
 </glade-interface>

Modified: gnucash/trunk/src/gnome/gnc-plugin-basic-commands.c
===================================================================
--- gnucash/trunk/src/gnome/gnc-plugin-basic-commands.c	2009-11-11 21:17:32 UTC (rev 18412)
+++ gnucash/trunk/src/gnome/gnc-plugin-basic-commands.c	2009-11-15 20:35:50 UTC (rev 18413)
@@ -130,8 +130,8 @@
   { "EditFindTransactionsAction", GTK_STOCK_FIND, N_("_Find..."), "<control>f",
     N_("Find transactions with a search"),
     G_CALLBACK (gnc_main_window_cmd_tools_find_transactions) },
-  { "EditTaxOptionsAction", NULL, N_("Ta_x Options"), NULL,
-    N_("Setup tax information for all income and expense accounts"),
+  { "EditTaxOptionsAction", NULL, N_("Income Ta_x Options"), NULL,
+    N_("Setup income tax information for relevant accounts"),
     G_CALLBACK (gnc_main_window_cmd_edit_tax_options) },
 
   /* Actions menu */

Modified: gnucash/trunk/src/report/locale-specific/us/taxtxf-de_DE.scm
===================================================================
--- gnucash/trunk/src/report/locale-specific/us/taxtxf-de_DE.scm	2009-11-11 21:17:32 UTC (rev 18412)
+++ gnucash/trunk/src/report/locale-specific/us/taxtxf-de_DE.scm	2009-11-15 20:35:50 UTC (rev 18413)
@@ -206,7 +206,7 @@
   (gnc:txf-get-format (if income?
                           txf-income-categories
                           txf-expense-categories)
-                      code))
+                      code ""))
 
 (define (gnc:account-get-txf-payer-source account)
   (let ((pns (xaccAccountGetTaxUSPayerNameSource account)))
@@ -341,9 +341,9 @@
                            "Aufwendungen"))
                (category-key (if (eq? type ACCT-TYPE-INCOME)
                                  (gnc:txf-get-category-key 
-                                  txf-income-categories code)
+                                  txf-income-categories code "")
                                  (gnc:txf-get-category-key
-                                  txf-expense-categories code)))
+                                  txf-expense-categories code "")))
                (value-name (if (equal? "ReinvD" action)
                                (string-append 
                                 (substring value 1 (string-length value))

Modified: gnucash/trunk/src/report/locale-specific/us/taxtxf.scm
===================================================================
--- gnucash/trunk/src/report/locale-specific/us/taxtxf.scm	2009-11-11 21:17:32 UTC (rev 18412)
+++ gnucash/trunk/src/report/locale-specific/us/taxtxf.scm	2009-11-15 20:35:50 UTC (rev 18413)
@@ -1,11 +1,11 @@
 ;; -*-scheme-*-
 ;; by  Richard -Gilligan- Uschold 
 ;;
-;; updated by  J. Alex Aycinena, July 2008 
+;; updated by  J. Alex Aycinena, July 2008, October 2009
 ;;
 ;; This report prints transaction detail and account totals for Tax-related
-;; accounts sorted by tax code and form/schedule, and exports TXF files for
-;; import to TaxCut, TurboTax, etc.
+;; accounts sorted by form/schedule, copy, line and tax code, and exports TXF
+;; files for import to TaxCut, TurboTax, etc.
 ;;
 ;; For this to work, the user has to segregate taxable and not taxable
 ;; income to different accounts, as well as deductible and non-
@@ -17,16 +17,16 @@
 ;; same tax code for a given "payer" need to be adjacent to each other in the
 ;; account hierarchy.
 ;;
-;; The user selects the accounts(s) to be printed; if none, all are selected.
-;; Includes all sub-account levels below selected account, that are coded for
-;; taxes.
+;; The user selects the accounts(s) to be printed; if none are specified, all
+;; are selected. Includes all sub-account levels below selected account, that
+;; are coded for taxes.
 ;;
 ;; Optionally, does NOT print tax codes and accounts with $0.00 values.
 ;; Prints data between the From and To dates, inclusive.
 ;; Optional alternate periods:
 ;; "Last Year", "1st Est Tax Quarter", ... "4th Est Tax Quarter"
 ;; "Last Yr Est Tax Qtr", ... "Last Yr Est Tax Qtr"
-;; Estimated Tax Quarters: Dec 31, Mar 31, Jun 30, Aug 31)
+;; Estimated Tax Quarters: Dec 31, Mar 31, Jun 30, Aug 31
 ;; Optionally prints brief or full account names
 ;; Optionally prints multi-split details for transactions
 ;; Optionally prints TXF export parameters for codes and accounts
@@ -40,6 +40,14 @@
 ;;   nearest transaction date or nearest report end date. Converts to zero
 ;;   if there is no entry in pricedb and provides comment accordingly.
 ;;
+;; November, 2009 Update:
+;;
+;; Add support for multiple copies of Forms/Schedules
+;; Add support for Format 6
+;; Use Form/Schedule line #'s to sort report.
+;; Update from "V037" to "V041"
+;; Add support for taxpayer types other than F1040 
+;;
 ;; From prior version:
 ;; NOTE: setting of specific dates is squirly! and seems
 ;; to be current-date dependant!  Actually, time of day dependant!  Just
@@ -229,6 +237,10 @@
 					; accounts from the same payer are
 					; grouped in the accounts list
 (define txf-l-count 0)		; count repeated N codes
+
+;; stores invalid txf codes so we can list
+(define txf-invalid-alist '())
+
 (define txf-account-name "")
 
 (define (gnc:account-get-txf account)
@@ -239,32 +251,113 @@
   (let ((code (xaccAccountGetTaxUSCode account)))
        (string->symbol (if (string-null? code) "N000" code))))
 
-(define (gnc:get-txf-format code income?)
-  (gnc:txf-get-format (if income?
-                          txf-income-categories
-                          txf-expense-categories)
-                      code))
+(define (get-acct-txf-info info-type acct-type code)
+  (let ((tax-entity-type (gnc-get-current-book-tax-type)))
+    (cond
+      ((= acct-type ACCT-TYPE-INCOME)
+       (cond
+         ((eqv? info-type 'form)
+           (gnc:txf-get-form txf-income-categories code tax-entity-type))
+         ((eqv? info-type 'desc)
+           (gnc:txf-get-description txf-income-categories code tax-entity-type))
+         ((eqv? info-type 'pns)
+           (gnc:txf-get-payer-name-source txf-income-categories code
+                                                               tax-entity-type))
+         ((eqv? info-type 'format)
+           (gnc:txf-get-format txf-income-categories code tax-entity-type))
+         ((eqv? info-type 'multiple)
+           (gnc:txf-get-multiple txf-income-categories code tax-entity-type))
+         ((eqv? info-type 'cat-key)
+           (gnc:txf-get-category-key txf-income-categories code tax-entity-type))
+         ((eqv? info-type 'line)
+           (gnc:txf-get-line-data txf-income-categories code tax-entity-type))
+         ((eqv? info-type 'last-yr)
+           (gnc:txf-get-last-year txf-income-categories code tax-entity-type))
+         (else #f)))
+      ((= acct-type ACCT-TYPE-EXPENSE)
+       (cond
+         ((eqv? info-type 'form)
+           (gnc:txf-get-form txf-expense-categories code tax-entity-type))
+         ((eqv? info-type 'desc)
+           (gnc:txf-get-description txf-expense-categories code tax-entity-type))
+         ((eqv? info-type 'pns)
+           (gnc:txf-get-payer-name-source txf-expense-categories code
+                                                               tax-entity-type))
+         ((eqv? info-type 'format)
+           (gnc:txf-get-format txf-expense-categories code tax-entity-type))
+         ((eqv? info-type 'multiple)
+           (gnc:txf-get-multiple txf-expense-categories code tax-entity-type))
+         ((eqv? info-type 'cat-key)
+           (gnc:txf-get-category-key txf-expense-categories code tax-entity-type))
+         ((eqv? info-type 'line)
+           (gnc:txf-get-line-data txf-expense-categories code tax-entity-type))
+         ((eqv? info-type 'last-yr)
+           (gnc:txf-get-last-year txf-expense-categories code tax-entity-type))
+         (else #f)))
+      ((or (= acct-type ACCT-TYPE-BANK) (= acct-type ACCT-TYPE-CASH)
+           (= acct-type ACCT-TYPE-ASSET) (= acct-type ACCT-TYPE-STOCK)
+           (= acct-type ACCT-TYPE-MUTUAL) (= acct-type ACCT-TYPE-RECEIVABLE))
+       (cond
+         ((eqv? info-type 'form)
+           (gnc:txf-get-form txf-asset-categories code tax-entity-type))
+         ((eqv? info-type 'desc)
+           (gnc:txf-get-description txf-asset-categories code tax-entity-type))
+         ((eqv? info-type 'pns)
+           (gnc:txf-get-payer-name-source txf-asset-categories code
+                                                               tax-entity-type))
+         ((eqv? info-type 'format)
+           (gnc:txf-get-format txf-asset-categories code tax-entity-type))
+         ((eqv? info-type 'multiple)
+           (gnc:txf-get-multiple txf-asset-categories code tax-entity-type))
+         ((eqv? info-type 'cat-key)
+           (gnc:txf-get-category-key txf-asset-categories code tax-entity-type))
+         ((eqv? info-type 'line)
+           (gnc:txf-get-line-data txf-asset-categories code tax-entity-type))
+         ((eqv? info-type 'last-yr)
+           (gnc:txf-get-last-year txf-asset-categories code tax-entity-type))
+         (else #f)))
+      ((or (= acct-type ACCT-TYPE-CREDIT) (= acct-type ACCT-TYPE-LIABILITY)
+           (= acct-type ACCT-TYPE-EQUITY) (= acct-type ACCT-TYPE-PAYABLE))
+       (cond
+         ((eqv? info-type 'form)
+           (gnc:txf-get-form txf-liab-eq-categories code tax-entity-type))
+         ((eqv? info-type 'desc)
+           (gnc:txf-get-description txf-liab-eq-categories code tax-entity-type))
+         ((eqv? info-type 'pns)
+           (gnc:txf-get-payer-name-source txf-liab-eq-categories code
+                                                               tax-entity-type))
+         ((eqv? info-type 'format)
+           (gnc:txf-get-format txf-liab-eq-categories code tax-entity-type))
+         ((eqv? info-type 'multiple)
+           (gnc:txf-get-multiple txf-liab-eq-categories code tax-entity-type))
+         ((eqv? info-type 'cat-key)
+           (gnc:txf-get-category-key txf-liab-eq-categories code tax-entity-type))
+         ((eqv? info-type 'line)
+           (gnc:txf-get-line-data txf-liab-eq-categories code tax-entity-type))
+         ((eqv? info-type 'last-yr)
+           (gnc:txf-get-last-year txf-liab-eq-categories code tax-entity-type))
+         (else #f)))
+      (else #f))
+  )
+)
 
-(define (gnc:get-txf-multiple code income?)
-  (gnc:txf-get-multiple (if income?
-                          txf-income-categories
-                          txf-expense-categories)
-                      code))
-
-(define (gnc:get-txf-pns code income?)
-  (gnc:txf-get-payer-name-source (if income?
-                          txf-income-categories
-                          txf-expense-categories)
-                      code))
-
 (define (gnc:account-get-txf-payer-source account)
   (let ((pns (xaccAccountGetTaxUSPayerNameSource account)))
        (string->symbol (if (string-null? pns) "none" pns))))
 
-;; some codes require special handling
+;; some codes require split detail, only two for now, Federal estimated tax,
+;; qrtrly and state estimated tax, qrtrly
 (define (txf-special-split? code)
-  (member code (list 'N521)))   ;only one for now Federal estimated tax, qrtrly
+  (member code (list 'N521 'N522)))
 
+;; some codes require special date handling, only one for now, Federal estimated
+;; tax, qrtrly
+(define (txf-special-date? code)
+  (member code (list 'N521)))
+
+(define (txf-beg-bal-only? code)
+  (member code (list 'N440)))   ;only one so far: F8606, IRA basis at beg of year
+
 (define (fill-clamp-sp str len)
   (string-append (substring (string-append str (make-string len #\space))
                             0 (- len 1)) " "))
@@ -273,21 +366,52 @@
   (string-append (substring (string-append str (make-string len #\space))
                             0 len)))
 
-(define (render-header-row table heading-line-text)
+(define (render-header-row table heading-line-text beg-bal beg-bal-txt
+                                                   curr-conv-data beg-bal-only?)
   (let ((heading (gnc:make-html-text)))
        (gnc:html-text-append! heading (gnc:html-markup-b heading-line-text)) 
-       (let ((heading-cell (gnc:make-html-table-cell heading)))
-            (gnc:html-table-cell-set-colspan! heading-cell 5)
-            (gnc:html-table-append-row!
-             table
-             (append (list heading-cell)
-                     (list (gnc:make-html-table-cell "&nbsp; &nbsp;")))
+       (let ((heading-cell (gnc:make-html-table-cell/markup
+                                                    "header-just-top" heading)))
+            (if beg-bal
+                (let ((beg-bal-cell (gnc:make-html-table-cell/markup
+                                                (if beg-bal-only?
+                                                    "header-just-right"
+                                                    "just-right")
+                                                beg-bal-txt)))
+                     (if (caddr curr-conv-data)
+                         (begin
+                           (gnc:html-table-cell-append-objects!
+                                beg-bal-cell
+                                (gnc:html-price-anchor
+                                                     (caddr curr-conv-data) #f))
+                           (gnc:html-table-cell-append-objects!
+                                beg-bal-cell
+                                (string-append (car (cdddr curr-conv-data)) ":"))
+                         )
+                         #f)
+                     (gnc:html-table-cell-set-colspan! heading-cell 4)
+                     (gnc:html-table-append-row!
+                      table
+                      (append (list heading-cell)
+                              (list beg-bal-cell)
+                              (list (gnc:make-html-table-cell/markup
+                                         "num-cell-align-bot" beg-bal)))
+                     )
+                )
+                (begin
+                  (gnc:html-table-cell-set-colspan! heading-cell 5)
+                  (gnc:html-table-append-row!
+                   table
+                   (append (list heading-cell)
+                           (list (gnc:make-html-table-cell "&nbsp; &nbsp;")))
+                  )
+                )
             )
        )
   )
 )
 
-(define (render-account-detail-header-row table suppress-action-memo?)
+(define (render-account-detail-header-row table suppress-action-memo? beg-bal?)
   (gnc:html-table-append-row!
        table
        (append (list (gnc:make-html-table-header-cell
@@ -302,19 +426,24 @@
                           (_ "Notes/Action:Memo"))))
                (list (gnc:make-html-table-header-cell
                       (_ "Transfer To/From Account(s)")))
-               (list (gnc:make-html-table-header-cell/markup
-                      "number-header" (_ "Amount")))
+               (list (if beg-bal?
+                         (gnc:make-html-table-header-cell
+                              (string-append "&nbsp; &nbsp; &nbsp; &nbsp;"
+                     "&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;"))
+                         (gnc:make-html-table-header-cell/markup
+                          "number-header" (_ "Amount"))))
        )
   )
 )
 
 (define (render-total-row table total-amount total-line-text
-                          tax_code? transaction-details?)
+                          tax_code? transaction-details? end-bal-text)
   (let ((description (gnc:make-html-text))
         (total (gnc:make-html-text)))
        (if (or tax_code? transaction-details?)
            (gnc:html-text-append! description (gnc:html-markup-b 
-              (string-append "&nbsp; &nbsp; &nbsp; &nbsp;" (_ "Total For "))))
+              (string-append "&nbsp; &nbsp; &nbsp; &nbsp;"
+                             (if end-bal-text end-bal-text (_ "Total For ")))))
            (if (not tax_code?)
                (gnc:html-text-append! description (gnc:html-markup-b 
                   "&nbsp; &nbsp; &nbsp; &nbsp;"))
@@ -341,7 +470,7 @@
 )
 
 (define (render-txf-account account account-value d? date x? x-date
-                            type code)
+                            type code copy tax-entity-type)
   (let* ((print-info (gnc-account-print-info account #f))
          (value (xaccPrintAmount account-value print-info))
          (txf? (gnc:account-get-txf account)))
@@ -353,48 +482,115 @@
                (x-date-str (if x-date
                                (strftime "%m/%d/%Y" (localtime (car x-date)))
                                #f))
-               ;; Only formats 1,3 implemented now! Others are treated as 1.
-               (format (gnc:get-txf-format code (eq? type ACCT-TYPE-INCOME)))
+               ;; Only formats 1,3,6 implemented now! Others are treated as 1.
+               (format (get-acct-txf-info 'format type code))
                (action (if (eq? type ACCT-TYPE-INCOME)
                            (case code
                              ((N286 N488) "ReinvD")
                              (else "Income"))
-                           "Expense"))
-               (category-key (if (eq? type ACCT-TYPE-INCOME)
-                                 (gnc:txf-get-category-key 
-                                  txf-income-categories code)
-                                 (gnc:txf-get-category-key
-                                  txf-expense-categories code)))
-               (value-name (if (equal? "ReinvD" action)
-                               (string-append 
-                                (xaccPrintAmount (gnc-numeric-neg account-value)
-                                                 print-info)
-                                " " txf-account-name)
-                               txf-account-name))
+                           (if (eq? type ACCT-TYPE-EXPENSE)
+                               "Expense"
+                               (if (or (eq? type ACCT-TYPE-BANK)
+                                       (eq? type ACCT-TYPE-CASH)
+                                       (eq? type ACCT-TYPE-ASSET)
+                                       (eq? type ACCT-TYPE-STOCK)
+                                       (eq? type ACCT-TYPE-MUTUAL)
+                                       (eq? type ACCT-TYPE-RECEIVABLE))
+                                   "Asset"
+                                   (if (or (eq? type ACCT-TYPE-CREDIT)
+                                           (eq? type ACCT-TYPE-LIABILITY)
+                                           (eq? type ACCT-TYPE-PAYABLE))
+                                       "Liability"
+                                       (if (eq? type ACCT-TYPE-EQUITY)
+                                           "Equity"
+                                           ""))))))
+               (category-key (get-acct-txf-info 'cat-key type code))
+               (value-name (cond 
+                             ((string=? tax-entity-type "F1040")
+                               (if (equal? "ReinvD" action)
+                                   (string-append 
+                                     (xaccPrintAmount
+                                     (gnc-numeric-neg account-value) print-info)
+                                     " " txf-account-name)
+                                     txf-account-name))
+                             ((or (string=? tax-entity-type "F1065")
+                                  (string=? tax-entity-type "F1120S"))
+                               (if (string=? (xaccAccountGetName account)
+                                             txf-account-name)
+                                   ""
+                                   (xaccAccountGetName account)))
+                             (else "")))
+
                (value (string-append "$"  ; reverse signs on dr's & cr's
                                      (xaccPrintAmount
                                                  (gnc-numeric-neg account-value)
                                                  print-info)))
           )
+          ;; Based on TXF Spec of 6/16/06, V 041, and Quicken 98 output, the
+          ;; fields by format are as follows, for F1040:
+          ;; Format Type Fields                       Comments/Status
+          ;; 0      D    T, N, C, L, X                Spec unclear, unverified
+          ;; 0      S    T, N, C, L                   Spec unclear, unverified
+          ;; 1      D    T, N, C, L, $, X             Spec clear & verified Q98
+          ;; 1      S    T, N, C, L, $                Spec clear & verified Q98
+          ;; 2      D    T, N, C, L, P, X             Spec unclear, unverified
+          ;; 2      S    T, N, C, L, P                Spec unclear, unverified
+          ;; 3      D    T, N, C, L, $, X             Spec clear & verified Q98
+          ;; 3      S    T, N, C, L, $, P             Spec clear & verified Q98
+          ;; 4      D    T, N, C, L, P, D, D, $, $    Spec clear, unverified
+          ;; 4      S    T, N, C, L, $, $             Spec unclear, unverified
+          ;; 5      D    T, N, C, L, P, D, D, $, $, $ Spec unclear, unverified
+          ;; 5      S    T, N, C, L, $, $, $          Spec unclear, unverified
+          ;; 6      D    T, N, C, L, D, $, P, X       Spec unclear, verified Q98
+          ;; 6      S    T, N, C, L, $                Spec unclear, verified Q98
+          ;;
+          ;; For F1040, support only formats 1, 3 and 6 (based on Q98)
+          ;; For F1065, F1120 and F1120S, support only format 1
+          ;;
           (list (if x? "TD" "TS") crlf
                 (symbol->string code) crlf
-                "C1" crlf
-                "L" (number->string txf-l-count) crlf
-                (if d?
+                (string-append "C" copy) crlf
+                ;; not to be confused with Form/Sched line number: so for
+                ;; example, Schedule B line 5 for 2008 has separate lines for
+                ;; individual payers of ordinary dividends so these are like
+                ;; sub-lines of line 5 starting with 1 for first reported payer
+                ;; these apply if pns is either 'current or 'parent', but not
+                ;; otherwise
+                "L" (number->string txf-l-count) crlf 
+                (if (and d? (= format 6) x?)
                     (list "D" date-str crlf)
                     '())
-                value crlf 
                 (case format
-                  ((3) (list "P" txf-account-name crlf))
-                  (else (if (and x? (txf-special-split? code))
-                            (list "P" crlf)
-                            '())))
+                  ((1 3 6) (list value crlf))
+                  ((0 2 4 5) '()))
+                (case format
+                  ((3) (if (not x?) (list "P" txf-account-name crlf) '()))
+                  ((6) (if x?
+                           (if (string=? "N521" (symbol->string code))
+                               (list "P" crlf) ;; Federal, no state initials
+                               (list "P" txf-account-name crlf));; state initials
+                           '())) ;; not detail
+                  (else '()))
                 (if x?
-                    (list "X" x-date-str " " (fill-clamp-sp txf-account-name 31)
-                          (fill-clamp-sp action 7) 
-                          (fill-clamp-sp value-name 82)
-                          (fill-clamp category-key 15) crlf)
-                    '())
+                    (cond 
+                      ((string=? tax-entity-type "F1040")
+                        (list "X" x-date-str " "
+                            (fill-clamp-sp txf-account-name 31)
+                            (fill-clamp-sp action 7) 
+                            (fill-clamp-sp value-name 82)
+                            (fill-clamp category-key 15) crlf))
+                      ((or (string=? tax-entity-type "F1065")
+                           (string=? tax-entity-type "F1120")
+                           (string=? tax-entity-type "F1120S"))
+                        (list "X"
+                            (fill-clamp "" 47)
+                            (fill-clamp-sp txf-account-name 41)
+                            (if (string=? value-name "")
+                                (list crlf)
+                                (list
+                                    (fill-clamp "" 41)
+                                    (fill-clamp value-name 15) crlf))))
+                      (else '())))
                 "^" crlf))
         "")))
 
@@ -419,8 +615,10 @@
 ;;   a list
 
   (let*
-    ((splt-value (if (or (gnc-commodity-equiv trans-currency USD-currency)
-                         (gnc-commodity-equiv account-commodity USD-currency))
+    ((splt-value (if (and split
+                          (or (gnc-commodity-equiv trans-currency USD-currency)
+                              (gnc-commodity-equiv account-commodity
+                                                                 USD-currency)))
                      (xaccSplitGetValue split)
                      (gnc:make-gnc-numeric 100 100)))
      (missing-pricedb-entry? #f)
@@ -596,7 +794,8 @@
                                              ))
                         (splt-print-amnt (car splt-curr-conv-data))
                         (splt-account-name (if full-names?
-                                               (gnc-account-get-full-name split-acct)
+                                               (gnc-account-get-full-name
+                                                                     split-acct)
                                                (xaccAccountGetName split-acct)
                                            ))
                         (cell (gnc:make-html-table-cell
@@ -663,36 +862,20 @@
   ) ;; end of let*
 )
 
-;; Render transaction detail
+;; Process transaction detail; render, if appropriate; accum account totals
 (define (process-account-transaction-detail table account split-list
-                split-details? full-names? currency-conversion-date to-date
+                split-details? full-names? currency-conversion-date to-value
                 transaction-details? suppress-action-memo?
-				shade-alternate-transactions? splits-period full-year? to-value
+				shade-alternate-transactions? splits-period full-year? from-value
                 tax-mode? show-TXF-data? USD-currency account-type
-                tax-code acct-full-name)
+                tax-code acct-full-name acct-beg-bal-collector
+                acct-end-bal-collector copy tax-entity-type)
                                                                                     
   (let*
     ((account-commodity (xaccAccountGetCommodity account))
-     (format (gnc:get-txf-format tax-code (eq? account-type ACCT-TYPE-INCOME)))
+     (format (get-acct-txf-info 'format account-type tax-code))
      (payer-src (gnc:account-get-txf-payer-source account))
-     (code-pns (gnc:get-txf-pns tax-code (eq? account-type ACCT-TYPE-INCOME)))
-     (l-value (begin
-                 (set! txf-account-name (xaccAccountGetName
-                                            (if (eq? payer-src 'parent)
-                                                (gnc-account-get-parent account)
-                                                account)))
-                 (set! txf-l-count (if (= format 3)
-                                       (if (equal? txf-last-payer
-                                                               txf-account-name)
-                                           txf-l-count
-                                           (if (equal? "" txf-last-payer)
-                                               1
-                                               (+ 1 txf-l-count)))
-                                       1))
-                 (set! txf-last-payer (if (= format 3)
-                                          txf-account-name
-                                          ""))
-                 (number->string txf-l-count)))
+     (code-pns (get-acct-txf-info 'pns account-type tax-code))
      (acct-collector (gnc:make-commodity-collector))
      (acct-collector-as-dr (gnc:make-commodity-collector))
      (account-commodity-total (gnc-numeric-zero))
@@ -712,8 +895,11 @@
                                               (_ "Name Source is Parent")
                                               (_ "Name Source is Current"))
                                           ""))
-                                 (line (if (= format 3)
-                                           (string-append (_ "Line ") l-value)
+                                 (line (if (and (= format 3)
+                                                (or (eq? code-pns 'parent)
+                                                    (eq? code-pns 'current)))
+                                           (string-append (_ "Item ")
+                                                   (number->string txf-l-count))
                                            ""))
                                 )
                                 (if (eq? pns "")
@@ -732,15 +918,138 @@
      (print-info (gnc-account-print-info account #f))
      (shade-this-line? #f)
      (output '())
+     (account-name (if full-names? acct-full-name
+                                   (xaccAccountGetName account)))
+     (beg-bal-acct-curr (gnc-numeric-zero))
+     (beg-bal-rpt-amount (gnc-numeric-zero))
     )
     (acct-collector 'reset #f #f)  ;initialize to zero for this account
-    (if (and transaction-details? tax-mode?)
-        (begin
-          (render-header-row table (string-append
-                                   "&nbsp; &nbsp; &nbsp; &nbsp;" account-desc))
-          (render-account-detail-header-row table suppress-action-memo?)))
-    (set! output
-      (map (lambda (split) 
+    (acct-collector-as-dr 'reset #f #f)  ;initialize to zero for this account
+    (if (not (or (eq? account-type ACCT-TYPE-INCOME)
+                 (eq? account-type ACCT-TYPE-EXPENSE)))
+        (begin ;; set beginning amount for B/S accts
+          (set! beg-bal-acct-curr (gnc-numeric-add-fixed beg-bal-acct-curr
+                                       (cadr (acct-beg-bal-collector
+                                               'getpair account-commodity #f))))
+          (set! beg-bal-rpt-amount (if (or (eq? account-type ACCT-TYPE-CREDIT)
+                                           (eq? account-type ACCT-TYPE-PAYABLE)
+                                           (eq? account-type ACCT-TYPE-LIABILITY)
+                                           (eq? account-type ACCT-TYPE-EQUITY))
+                                   (gnc-numeric-neg beg-bal-acct-curr)
+                                   beg-bal-acct-curr))
+          (acct-collector 'add account-commodity beg-bal-rpt-amount) ;set beg bal
+          (acct-collector-as-dr 'add account-commodity beg-bal-acct-curr)
+          (if (or (not (gnc-numeric-zero-p beg-bal-acct-curr))
+                  (> (length split-list) 0)
+                  (not (gnc-numeric-zero-p (cadr (acct-end-bal-collector
+                                               'getpair account-commodity #f))))
+              );; B/S acct with either beg bal, splits or end bal
+              ;; print account header for B/S accts
+              (let* ((curr-conv-note "")
+                     (curr-conv-data (list beg-bal-acct-curr
+                                                          curr-conv-note #f ""))
+                     (curr-conv-data (if (gnc-commodity-equiv
+                                                 account-commodity USD-currency)
+                                         curr-conv-data
+                                         (process-currency-conversion
+                                           #f
+                                           USD-currency
+                                           account-commodity
+                                           (if (equal? currency-conversion-date
+                                                             'conv-to-tran-date)
+                                               (gnc:timepair-previous-day
+                                                                     from-value)
+                                               to-value)
+                                           account-commodity ;; force price lookup
+                                           beg-bal-rpt-amount
+                                           print-info
+                                           (if (or
+                                            (eq? account-type ACCT-TYPE-CREDIT)
+                                            (eq? account-type ACCT-TYPE-PAYABLE)
+                                            (eq? account-type ACCT-TYPE-LIABILITY)
+                                            (eq? account-type ACCT-TYPE-EQUITY))
+                                               #t
+                                               #f))
+                                     )
+                     )
+                     (print-amnt (car curr-conv-data))
+                     (account-beg-amnt (xaccPrintAmount print-amnt print-info))
+                     (curr-conv-note (cadr curr-conv-data))
+                     (curr-conv-data (if (and (txf-beg-bal-only? tax-code)
+                                              (not transaction-details?))
+                                         (list print-amnt curr-conv-note #f "")
+                                         curr-conv-data))
+                     (amnt-acct-curr (xaccPrintAmount beg-bal-acct-curr
+                                                                    print-info))
+                     (account-beg-bal-line-text
+                        (if (and (txf-beg-bal-only? tax-code)
+                                 (not transaction-details?))
+                            ""
+                            (string-append (_ "Balance on ")
+                                         (strftime "%Y-%b-%d"
+                                            (localtime (car
+                                               (gnc:timepair-previous-day
+                                                                  from-value))))
+                                         (if (string=? curr-conv-note "")
+                                             (_ ":" )
+                                             (string-append  " " curr-conv-note)
+                                         )
+                            )
+                        )
+                     )
+                    )
+                    (if tax-mode?
+                        (begin
+                          (if (or (txf-beg-bal-only? tax-code)
+                                  transaction-details?)
+                              (render-header-row table (string-append
+                                                   "&nbsp; &nbsp; &nbsp; &nbsp;"
+                                                   (if (and (txf-beg-bal-only?
+                                                                       tax-code)
+                                                            (not
+                                                          transaction-details?))
+                                                       (if (not
+                                                            (gnc-commodity-equiv
+                                                               account-commodity
+                                                                  USD-currency))
+                                                           (string-append
+                                                              account-desc
+                                                              " ("
+                                                              amnt-acct-curr
+                                                              (_ "  In ")
+                                                    (gnc-commodity-get-mnemonic
+                                                              account-commodity)
+                                                              ") ")
+                                                           account-desc)
+                                                       account-desc))
+                                                   account-beg-amnt
+                                                   account-beg-bal-line-text
+                                                   curr-conv-data
+                                                   (txf-beg-bal-only? tax-code)))
+                          (if (and (not (txf-beg-bal-only? tax-code))
+                                   (> (length split-list) 0)
+                                   transaction-details?)
+                              (render-account-detail-header-row table
+                                                      suppress-action-memo? #t))
+                        ))
+                    (set! account-USD-total (gnc-numeric-add-fixed
+                                                  account-USD-total print-amnt))
+              );; end of let*
+          );; end of if
+        );; end of begin
+        (begin ;; print account header with no beginning amount for P/L accts
+          (if (and transaction-details? tax-mode?)
+              (begin
+                (render-header-row table (string-append
+                        "&nbsp; &nbsp; &nbsp; &nbsp;" account-desc) #f #f #f #f)
+                (render-account-detail-header-row table suppress-action-memo? #f)
+              ))
+        ) ;; end of begin
+    ) ;; end of if
+    (if (and (> (length split-list) 0)
+             (not (txf-beg-bal-only? tax-code)))
+      (set! output
+        (map (lambda (split) 
            (let* ((parent (xaccSplitGetParent split))
                   (trans-date (gnc-transaction-get-date-posted parent))
                   ;; TurboTax 1999 and 2000 ignore dates after Dec 31
@@ -770,7 +1079,11 @@
                   (splt-amount-is-dr? (if (gnc-numeric-positive-p splt-amount)
                                           #t
                                           #f))
-                  (splt-rpt-amount (if (eq? account-type ACCT-TYPE-INCOME)
+                  (splt-rpt-amount (if (or (eq? account-type ACCT-TYPE-INCOME)
+                                           (eq? account-type ACCT-TYPE-CREDIT)
+                                           (eq? account-type ACCT-TYPE-PAYABLE)
+                                           (eq? account-type ACCT-TYPE-LIABILITY)
+                                           (eq? account-type ACCT-TYPE-EQUITY))
                                        (gnc-numeric-neg splt-amount)
                                        splt-amount))                   
                   (curr-conv-note "")
@@ -787,11 +1100,16 @@
                                          (if (equal? currency-conversion-date
                                                      'conv-to-tran-date)
                                              trans-date
-                                             to-date)
+                                             to-value)
                                          trans-currency
                                          splt-rpt-amount
                                          print-info
-                                         (if (eq? account-type ACCT-TYPE-INCOME)
+                                         (if (or
+                                           (eq? account-type ACCT-TYPE-INCOME)
+                                           (eq? account-type ACCT-TYPE-CREDIT)
+                                           (eq? account-type ACCT-TYPE-PAYABLE)
+                                           (eq? account-type ACCT-TYPE-LIABILITY)
+                                           (eq? account-type ACCT-TYPE-EQUITY))
                                              #t
                                              #f))))
                   (print-amnt (car curr-conv-data))
@@ -818,7 +1136,11 @@
                   (amount-table (gnc:make-html-table))
                  ) ;;end of let* variable definitions
                  (acct-collector 'add account-commodity
-                     (if (eq? account-type ACCT-TYPE-INCOME)
+                     (if (or (eq? account-type ACCT-TYPE-INCOME)
+                             (eq? account-type ACCT-TYPE-CREDIT)
+                             (eq? account-type ACCT-TYPE-PAYABLE)
+                             (eq? account-type ACCT-TYPE-LIABILITY)
+                             (eq? account-type ACCT-TYPE-EQUITY))
                          (gnc-numeric-neg splt-amount)
                          splt-amount))              
                  (acct-collector-as-dr 'add account-commodity splt-amount)
@@ -835,7 +1157,7 @@
                                              trans-currency 
                                              account-type
                                              currency-conversion-date
-                                             to-date
+                                             to-value
                                              transfer-table print-amnt))
                        (gnc:html-table-append-row!
                             date-table
@@ -938,7 +1260,7 @@
                  ) ;; end of if
                  ;; for quarterly estimated tax payments, we need to go
                  ;; get data from splits for TXF output
-                 (if (and splits-period (not tax-mode?))
+                 (if (and (txf-special-split? tax-code) (not tax-mode?))
                      (render-txf-account account
                                        (if (or (and print-amnt-is-dr?
                                                     splt-amount-is-dr?)
@@ -948,12 +1270,14 @@
                                            print-amnt
                                            (gnc-numeric-neg print-amnt))
                                        #t fudge-date  #t trans-date
-                                       account-type tax-code)
+                                       account-type tax-code copy
+                                       tax-entity-type)
                  )
            ) ;;end of let*
            ) ;;end of lambda
-      split-list) ;;end of map
-    ) ;; end of set!
+        split-list) ;;end of map
+      ) ;; end of set!
+    ) ;; end of if
     ;; print account totals
     (set! account-commodity-total (gnc-numeric-add-fixed account-commodity-total
                          (cadr (acct-collector 'getpair account-commodity #f))))
@@ -961,10 +1285,7 @@
                                                    account-commodity-total-as-dr
                    (cadr (acct-collector-as-dr 'getpair account-commodity #f))))
     (if tax-mode?
-        (let* ((account-name (if full-names?
-                                 acct-full-name
-                                 (xaccAccountGetName account)))
-               (amnt-acct-curr (xaccPrintAmount account-commodity-total
+        (let* ((amnt-acct-curr (xaccPrintAmount account-commodity-total
                                                 print-info))
                (account-total-amount (xaccPrintAmount account-USD-total
                                                 print-info))
@@ -983,11 +1304,23 @@
                                                     ") ")
                                      "")))
               )
-              (render-total-row table
-                                account-total-amount
-                                account-total-line-text
-                                #f
-                                transaction-details?)
+              (if (not (txf-beg-bal-only? tax-code))
+                  (render-total-row table
+                                    account-total-amount
+                                    account-total-line-text
+                                    #f
+                                    transaction-details?
+                                    (if (or (eq? account-type ACCT-TYPE-INCOME)
+                                            (eq? account-type ACCT-TYPE-EXPENSE))
+                                        #f
+                                        (string-append (_ "Balance on ")
+                                                   (strftime "%Y-%b-%d"
+                                                     (localtime (car to-value)))
+                                                   (_ " For " )
+                                        )
+                                    )
+                  )
+              )
         ) ;; end of let*
     ) ;; end of if
     (list account-USD-total
@@ -1025,51 +1358,287 @@
      (gnc:lookup-option 
       (gnc:report-options report-obj) pagename optname)))
 
+  (define tax-entity-type (gnc-get-current-book-tax-type))
 
-  ;; List of entries, each containing a form, tax-code (as string), account name
-  ;; account, and, to avoid having to fetch again later, type and code as 
-  ;; symbol. Only accounts with a tax code are put on list.
-  (define (make-form-line-acct-list accounts)
+  ;; Returns the line number string for the first pair whose year is less than
+  ;; year argument. Assumes pairs are in year descending order. If year of last
+  ;; pair is greater than year argument, no line info is returned.
+  (define get-line-info
+    (lambda (year line-list)
+      (cond
+        ((not line-list) #f)
+        ((null? line-list) #f)
+        ((> (caar line-list) (string->number year))
+            (get-line-info year (cdr line-list)))
+        ((<= (caar line-list) (string->number year)) (cadar line-list)))))
+
+  ;; List of entries, each containing a form, form copy number, form line
+  ;; number, tax-code (as string), account name, account, and, to avoid having
+  ;; to fetch again later, account type and tax-code as symbol. Only accounts
+  ;; that are tax related, with a tax code that is valid for the tax-entity-type
+  ;; and account type are put on list, along with those assigned code N000.
+  ;; Accounts that are not tax-related and have a tax code or are tax-related
+  ;; and have an invalid tax code are put on an error list. Codes N438 and N440
+  ;; have special processing: if an asset account is assigned to either of these
+  ;; two codes, an additional 'form-line-acct' entry is created for the other
+  ;; code so that either both accounts are represented or neither.
+  (define (make-form-line-acct-list accounts tax-year)
      (map (lambda (account)
-                  (let* ((account-name (gnc-account-get-full-name account))
-                         (children (gnc-account-get-children account)))
-                    (if (string-null? (xaccAccountGetTaxUSCode account))
-                        selected-accounts-sorted-by-form-line-acct
-                        (let* ((type (xaccAccountGetType account))
-                               (tax-code (gnc:account-get-txf-code account))
-                               (form (gnc:txf-get-form (if (eq? type
-                                                               ACCT-TYPE-INCOME)
-                                            txf-income-categories
-                                            txf-expense-categories) tax-code))
-                               (form-code-acct (list (list form)
-                                                     (list (symbol->string
-                                                                      tax-code))
-                                                     (list account-name)
-                                                     (list account)
-                                                     (list type)
-                                                     (list tax-code))))
-                              (set! selected-accounts-sorted-by-form-line-acct
-                                      (append (list form-code-acct)
+            (let* ((account-name (gnc-account-get-full-name account))
+                   (children (gnc-account-get-children account))
+                   (tax-related (xaccAccountGetTaxRelated account))
+                   (tax-code (xaccAccountGetTaxUSCode account))
+                   (tax-code-sym (string->symbol tax-code))
+                   (type (xaccAccountGetType account))
+                   (form (get-acct-txf-info 'form type tax-code-sym))
+                   (last-year (get-acct-txf-info 'last-yr type tax-code-sym))
+                  )
+              (if (not (string-null? tax-code))
+                (if (not (or (null? tax-entity-type)
+                             (string=? tax-entity-type "")
+                             (string=? tax-entity-type "Other")))
+                  (if tax-related
+                    (if (or (not (eqv? form #f))
+                            (string=? tax-code "N000"))
+                     (if (or (not last-year)
+                             (if (and last-year
+                                      (> (string->number tax-year) last-year))
+                                 #f
+                                 #t))
+                      (let* ((form (if form form "")) ;; needed for "N000'
+                             (copy (number->string 
+                                      (xaccAccountGetTaxUSCopyNumber account)))
+                             (line (get-acct-txf-info 'line type tax-code-sym))
+                             (line (if line
+                                       (get-line-info tax-year line)
+                                       ""))
+                             (line (if line
+                                       line ;; this might be a tax year before
+                                       "")) ;; earliest available year line pair
+                             (form-line-acct (list (list form)
+                                                   (list copy)
+                                                   (list line)
+                                                   (list tax-code)
+                                                   (list account-name)
+                                                   (list account)
+                                                   (list type)
+                                                   (list tax-code-sym))))
+                            (set! selected-accounts-sorted-by-form-line-acct
+                                    (append (list form-line-acct)
                                     selected-accounts-sorted-by-form-line-acct))
-                        )
+                            (if (or (string=? tax-code "N438")
+                                    (string=? tax-code "N440"))
+                                (let* ((tax-code2 (if (string=? tax-code
+                                                               "N438")
+                                                      "N440" "N438"))
+                                       (tax-code2-sym (string->symbol
+                                                                     tax-code2))
+                                       (line2 (get-acct-txf-info 'line
+                                                            type tax-code2-sym))
+                                       (line2 (if line2
+                                                  (get-line-info tax-year line2)
+                                                  ""))
+                                       (line2 (if line2
+                                                  line2
+                                                  ""))
+                                      )
+                                      (set!
+                                      selected-accounts-sorted-by-form-line-acct
+                                         (append (list
+                                                   (list (list form)
+                                                         (list copy)
+                                                         (list line2)
+                                                         (list tax-code2)
+                                                         (list account-name)
+                                                         (list account)
+                                                         (list type)
+                                                         (list tax-code2-sym)))
+                                    selected-accounts-sorted-by-form-line-acct))
+                                )
+                            );; end if
+                      );; end let*
+                      (begin
+                        (set! txf-invalid-alist (assoc-set!
+                                 txf-invalid-alist
+                                 tax-code
+                                 (list (_"Set as tax-related, but assigned tax code no longer valid for tax year")
+                                       account-name form account)))
+                        selected-accounts-sorted-by-form-line-acct)
+                     );; end if
+                     (begin
+                         (set! txf-invalid-alist (assoc-set!
+                                 txf-invalid-alist
+                                 tax-code
+                                 (list (_"Set as tax-related, tax code assigned for different tax entity type")
+                                       account-name form account)))
+                        selected-accounts-sorted-by-form-line-acct)
                     )
-                    (if (not (null? children))
-                        (make-form-line-acct-list children)
-                        selected-accounts-sorted-by-form-line-acct
+                    (begin ;; not tax related
+                      (if (or (not (eqv? form #f))
+                              (string=? tax-code "N000"))
+                          (set! txf-invalid-alist (assoc-set!
+                                   txf-invalid-alist
+                                   tax-code
+                                   (list (_ "Set as not tax-related, but tax code assigned")
+                                         account-name form account)))
+                          (set! txf-invalid-alist (assoc-set!
+                                   txf-invalid-alist
+                                   tax-code
+                                   (list (_"Set as not tax-related, tax code assigned for different tax entity type")
+                                         account-name form account)))
+                      )
+                    selected-accounts-sorted-by-form-line-acct)
+                  )
+                  (begin;; 'Other' tax entity type selected - message on report
+                    selected-accounts-sorted-by-form-line-acct)
+                )
+                (begin;; no tax code
+                  (if (not (or (null? tax-entity-type)
+                               (string=? tax-entity-type "")
+                               (string=? tax-entity-type "Other")))
+                    (if tax-related
+                      (set! txf-invalid-alist (assoc-set!
+                               txf-invalid-alist
+                               (_ "None")
+                               (list (_ "Set as tax-related, no tax code assigned")
+                                     account-name form account)))
+                      (begin;; not tax related - skip for report
+                      )
                     )
+                    (begin;; 'Other' tax entity type selected - message on report
+                    )
                   )
-          )
+                  selected-accounts-sorted-by-form-line-acct)
+               );; end of if
+               (if (not (null? children))
+                        (make-form-line-acct-list children tax-year)
+                        selected-accounts-sorted-by-form-line-acct
+               )
+            );; end let*
+          );; end lambda
       accounts)
   )
 
+  ;; The first elements of the lists, form and copy, are compared as strings as
+  ;; are the last parts, tax-code and account name. The line number is
+  ;; decomposed into numeric and alpha parts and the sub-parts are compared.
+  ;; This is so that, for example, line number '9a' sorts before '12b'.
   (define (form-line-acct-less a b)
-     (let ((string-a (string-append
-                         (car (car a)) " " (car (cadr a)) " " (car (caddr a))))
-           (string-b (string-append
-                         (car (car b)) " " (car (cadr b)) " " (car (caddr b)))))
-          (if (string<? string-a string-b)
+     (let ((string-a-first (string-append (caar a) " " (caadr a)))
+           (string-b-first (string-append (caar b) " " (caadr b))))
+          (if (string<? string-a-first string-b-first) ;; consider form and copy
               #t
-              #f
+              (if (string>? string-a-first string-b-first)
+                  #f
+                  ;; consider line number looking at sub-parts, if necessary
+                  (let* ((get-parts (lambda (str)
+                          (let ((prior-char-num? #f)
+                                (string-part "")
+                                (lst '()))
+                               (map (lambda (char)
+                                 (if (char-numeric? char)
+                                     (if prior-char-num?
+                                        (begin
+                                          (set! string-part (string-append
+                                                     string-part (string char)))
+                                          (append lst (list
+                                                  (string->number string-part)))
+                                        )
+                                        (begin
+                                          (if (string=? string-part "")
+                                              #f
+                                              (set! lst (append lst
+                                                      (list string-part))))
+                                          (set! string-part (string char))
+                                          (set! prior-char-num? #t)
+                                          (append lst (list (string->number
+                                                              (string char))))
+                                        ))
+                                     (if prior-char-num?
+                                        (begin
+                                          (if (string=? string-part "")
+                                              #f 
+                                              (set! lst (append lst (list
+                                                (string->number string-part)))))
+                                          (set! string-part (string char))
+                                          (set! prior-char-num? #f)
+                                          (append lst (list (string char)))
+                                        )
+                                        (begin
+                                          (set! string-part (string-append
+                                                     string-part (string char)))
+                                          (append lst (list string-part))
+                                        ))))
+                               (string->list str))
+                          )))
+                         (a-line-list (get-parts (car (caddr a))))
+                         (b-line-list (get-parts (car (caddr b))))
+                         (a-line-list (if (null? a-line-list)
+                                          a-line-list
+                                          (list-ref a-line-list
+                                                   (- (length a-line-list) 1))))
+                         (b-line-list (if (null? b-line-list)
+                                          b-line-list
+                                          (list-ref b-line-list
+                                                   (- (length b-line-list) 1))))
+                        )
+                        (letrec
+                         ((line-list<? (lambda (ls1 ls2)
+                          (if (null? ls2)
+                              #f
+                              (if (null? ls1)
+                                  #t
+                                  (if (integer? (car ls1))
+                                      (if (integer? (car ls2))
+                                          (if (< (car ls1) (car ls2))
+                                              #t
+                                              (if (> (car ls1) (car ls2))
+                                                  #f
+                                                  (line-list<? (cdr ls1)
+                                                                    (cdr ls2))))
+                                          (if (string<?
+                                                    (number->string (car ls1))
+                                                                      (car ls2))
+                                              #t
+                                              (if (string>?
+                                                    (number->string (car ls1))
+                                                                      (car ls2))
+                                                  #f
+                                                  (line-list<? (cdr ls1)
+                                                                   (cdr ls2)))))
+                                      (if (integer? (car ls2))
+                                          (if (string<? (car ls1)
+                                                     (number->string (car ls2)))
+                                              #t
+                                              (if (string>? (car ls1)
+                                                     (number->string (car ls2)))
+                                                  #f
+                                                  (line-list<? (cdr ls1)
+                                                                    (cdr ls2))))
+                                          (if (string<? (car ls1) (car ls2))
+                                              #t
+                                              (if (string>? (car ls1) (car ls2))
+                                                  #f
+                                                  (line-list<? (cdr ls1)
+                                                             (cdr ls2)))))))))))
+                        (if (line-list<? a-line-list b-line-list)
+                            #t
+                            (if (line-list<? b-line-list a-line-list)
+                                #f
+                                ;; consider rest of line all together
+                                (let ((string-a-rest (string-append
+                                         (car (caddr a)) " " (caar (cdddr a))
+                                                        " " (caadr (cdddr a))))
+                                      (string-b-rest (string-append
+                                         (car (caddr b)) " " (caar (cdddr b))
+                                                        " " (caadr (cdddr b)))))
+                                     (if (string<? string-a-rest string-b-rest)
+                                         #t
+                                         #f
+                                     ))))
+                        )
+                  )
+              )
           )
      )
   )
@@ -1114,8 +1683,8 @@
                                            (gnc-account-get-children-sorted
                                             (gnc-get-current-root-account))))))
 
-	     (work-to-do 0)
-	     (work-done 0)
+         (work-to-do 0)
+         (work-done 0)
 
          ;; Alternate dates are relative to from-date
          (from-date (gnc:timepair->date from-value))
@@ -1200,13 +1769,14 @@
          (tax-code-header-printed? #f)
          (doc (gnc:make-html-document))
          (table (gnc:make-html-table))
+         (error-table (gnc:make-html-table))
         )
 
     ;; for quarterly estimated tax payments, we need a different period
     ;; return the sometimes changed (from-est to-est full-year?) dates
     (define (txf-special-splits-period account from-value to-value)
       (if (and (xaccAccountGetTaxRelated account)
-               (txf-special-split? (gnc:account-get-txf-code account)))
+               (txf-special-date? (gnc:account-get-txf-code account)))
           (let* 
               ((full-year?
                 (let ((bdto (localtime (car to-value)))
@@ -1239,7 +1809,7 @@
                            to-value)))
             (list from-est to-est full-year?))
           #f))
-    
+
     (define (handle-account account
                             table
                             need-form-line-acct-header?
@@ -1249,7 +1819,8 @@
                             tax-code-heading-text
                             account-type
                             tax-code
-                            acct-full-name)
+                            acct-full-name
+                            copy)
        (let* ((splits-period (txf-special-splits-period account
                                                         from-value
                                                         to-value))
@@ -1276,21 +1847,48 @@
                                              (_ ": Parameters")
                                              "")
                                          (_ ") / Account Name")))
+              (acct-beg-bal-collector (if (not
+                                         (or (eq? account-type ACCT-TYPE-INCOME)
+                                           (eq? account-type ACCT-TYPE-EXPENSE)))
+                             (gnc:account-get-comm-balance-at-date account 
+                                      (gnc:timepair-previous-day from-value) #f)
+                             #f))
+              (acct-end-bal-collector (if (not
+                                         (or (eq? account-type ACCT-TYPE-INCOME)
+                                           (eq? account-type ACCT-TYPE-EXPENSE)))
+                             (gnc:account-get-comm-balance-at-date account 
+                                                                    to-value #f)
+                             #f))
+              (account-commodity (xaccAccountGetCommodity account))
              )
-             (if (> (length split-list) 0)
+             (if (or (and (or (eq? account-type ACCT-TYPE-INCOME)
+                              (eq? account-type ACCT-TYPE-EXPENSE))
+                          (> (length split-list) 0)) ;; P/L acct with splits
+                     (and (not (or (eq? account-type ACCT-TYPE-INCOME)
+                                   (eq? account-type ACCT-TYPE-EXPENSE)))
+                          (or (not (gnc-numeric-zero-p
+                                        (cadr (acct-beg-bal-collector
+                                               'getpair account-commodity #f))))
+                              (> (length split-list) 0)
+                              (not (gnc-numeric-zero-p
+                                        (cadr (acct-end-bal-collector
+                                               'getpair account-commodity #f))))
+                          )));; B/S acct with beg bal or splits or end bal
                  (begin
                     (if tax-mode?
                         ;; print header for new account, detail and sub-total
                         (begin
                            (if need-form-line-acct-header?
                                (begin
-                                 (render-header-row table form-line-acct-text)
+                                 (render-header-row table
+                                                form-line-acct-text #f #f #f #f)
                                  (set! form-line-acct-header-printed? #t)
                                )
                            )
                            (if need-form-schedule-header?
                                (begin
-                                 (render-header-row table current-form-schedule)
+                                 (render-header-row table
+                                              current-form-schedule #f #f #f #f)
                                  (set! form-schedule-header-printed? #t)
                                )
                            )
@@ -1298,7 +1896,7 @@
                                (begin
                                  (render-header-row table
                                        (string-append "&nbsp; &nbsp;"
-                                                      tax-code-heading-text))
+                                             tax-code-heading-text) #f #f #f #f)
                                  (set! tax-code-header-printed? #t)
                                )
                            )
@@ -1317,33 +1915,37 @@
                                                shade-alternate-transactions?
                                                splits-period
                                                full-year?
-                                               to-value
+                                               from-value
                                                tax-mode?
                                                show-TXF-data?
                                                USD-currency
                                                account-type
                                                tax-code
-                                               acct-full-name))
+                                               acct-full-name
+                                               acct-beg-bal-collector
+                                               acct-end-bal-collector
+                                               copy
+                                               tax-entity-type))
                            (tran-txf (cadr tran-output))
                            (account-USD-total-as-dr (caddr tran-output))
                           )
                           (set! account-USD-total (car tran-output))
                           (list
                             account-USD-total
-                            (if (not to-special)
+                            (if (not (txf-special-split? tax-code))
                                 (if (not tax-mode?)
                                     (render-txf-account account
                                             account-USD-total-as-dr
                                                   #f #f #t from-value
-                                                  account-type tax-code)
+                                                  account-type tax-code copy
+                                                  tax-entity-type)
                                     '())
                                 tran-txf)
                             account-USD-total-as-dr
                           )
-                          
                     )
                  )
-                 (begin ;; no split case
+                 (begin;;P/L with no splits or B/S with no beg/end bal or splits
                     (if suppress-0?
                         (list account-USD-total
                               '()
@@ -1352,14 +1954,15 @@
                         (begin
                            (if need-form-line-acct-header?
                                (begin
-                                  (render-header-row table form-line-acct-text)
+                                  (render-header-row table form-line-acct-text
+                                                                    #f #f #f #f)
                                   (set! form-line-acct-header-printed? #t)
                                )
                            )
                            (if need-form-schedule-header?
                                (begin
                                   (render-header-row table
-                                                     current-form-schedule)
+                                              current-form-schedule #f #f #f #f)
                                   (set! form-schedule-header-printed? #t)
                                )
                            )
@@ -1379,9 +1982,16 @@
                                 (localtime 
                                  (car (timespecCanonicalDayTime
                                        (cons (current-time) 0))))))
+          (tax-year   (strftime "%Y" (localtime (car from-value))))
+          (tax-entity-type (gnc-get-current-book-tax-type))
           (prior-form-schedule "")
+          (prior-form-sched-line "")
           (prior-tax-code "")
           (prior-account #f)
+          (prior-account-copy #f)
+          (form-sched-line-USD-total (gnc-numeric-zero))
+          (tax-code-sub-item-USD-total (gnc-numeric-zero))
+          (tax-code-sub-item-USD-total-as-dr (gnc-numeric-zero))
           (tax-code-USD-total (gnc-numeric-zero))
           (tax-code-USD-total-as-dr (gnc-numeric-zero))
           (saved-tax-code-text "")
@@ -1393,28 +2003,146 @@
          )
 
          (define (handle-tax-code form-line-acct)
-            (let* ((current-form-schedule (car (car form-line-acct)))
-                   (current-tax-code (car (cadr form-line-acct))) ;; string
-                   (acct-full-name (car (caddr form-line-acct)))
-                   (account (car (car (cdddr form-line-acct))))
-                   (type (car (car (cdr (cdddr form-line-acct)))))
-                   (tax-code (car (cadr (cdr (cdddr form-line-acct))))) ;;symbol
+            (let* ((current-form-schedule (caar form-line-acct))
+                   (copy (caadr form-line-acct))
+                   (current-form-schedule (if (> (string->number copy) 1)
+                                              (string-append
+                                                      current-form-schedule
+                                                                   "(" copy ")")
+                                              current-form-schedule))
+                   (current-form-sched-line (car (caddr form-line-acct)))
+                   (current-tax-code (caar (cdddr form-line-acct))) ;; string
+                   (acct-full-name (caadr (cdddr form-line-acct)))
+                   (account (caar (cddr (cdddr form-line-acct))))
+                   (type (caar (cdddr (cdddr form-line-acct))))
+                   (tax-code (caadr (cdddr (cdddr form-line-acct)))) ;;symbol
                    (output '())
-                   (txf-pyr (if (eq? (gnc:account-get-txf-payer-source account)
-                                     'parent)
-					       (xaccAccountGetName (gnc-account-get-parent account))
-					       (xaccAccountGetName account)))
-                   (txf-new-payer? (if (string=? txf-last-payer txf-pyr)
-                                       #f
-                                       #t))
+                   (payer-src (gnc:account-get-txf-payer-source account))
+                   (txf-pyr (xaccAccountGetName
+                                            (if (eq? payer-src 'parent)
+                                                (gnc-account-get-parent account)
+                                                account)))
+                   (format (get-acct-txf-info 'format type tax-code))
+                   (code-pns (get-acct-txf-info 'pns type tax-code))
+                   (txf-new-payer? (if (= 3 format)
+                                       (if (string=? prior-tax-code
+                                                               current-tax-code)
+                                           (if (string=? txf-last-payer txf-pyr)
+                                               #f
+                                               #t)
+                                           #t)
+                                       #f))
                   )
+                  ;; if not tax-code break, but if tax-code allows
+                  ;; multiple lines and there is a new payer, process subline
+                  (if (string=? prior-tax-code "")
+                      #t ;; do nothing
+                      (if (and (or (eqv? (get-acct-txf-info
+                                                       'pns
+                                                       (xaccAccountGetType
+                                                                  prior-account)
+                                                       (string->symbol
+                                                                prior-tax-code))
+                                                    'current)
+                                   (eqv? (get-acct-txf-info
+                                                       'pns
+                                                       (xaccAccountGetType
+                                                                  prior-account)
+                                                       (string->symbol
+                                                                prior-tax-code))
+                                                    'parent))
+                               (if (string=? prior-tax-code current-tax-code)
+                                   (if (> txf-l-count 0)
+                                       txf-new-payer?
+                                       #f)
+                                   (if (= 3 (get-acct-txf-info 'format
+                                              (xaccAccountGetType prior-account)
+                                               (string->symbol prior-tax-code)))
+                                       #t
+                                       #f))
+                          )
+                          (begin
+                            (if tax-mode?
+                                ;; printed report processing
+                                ;; print a sub-line subtotal
+                                (if (and suppress-0? (gnc-numeric-zero-p
+                                                   tax-code-sub-item-USD-total))
+                                    #t ;; do nothing
+                                    (let* ((print-info (gnc-account-print-info
+                                                              prior-account #f))
+                                           (tax-code-sub-item-total-amount
+                                               (xaccPrintAmount
+                                                     tax-code-sub-item-USD-total
+                                                     print-info))
+                                          ) 
+                                          ;; print prior tax-code-sub-item
+                                          ;; total and reset accum
+                                          (render-total-row
+                                             table
+                                             tax-code-sub-item-total-amount
+                                             (string-append
+                                                (if (string=? ""
+                                                          prior-form-sched-line)
+                                                    (_ "Line (Code): ")
+                                                    "")
+                                                saved-tax-code-text
+                                                (_ ", Item ")
+                                                (number->string txf-l-count)
+                                                (_ ": ")
+                                                txf-last-payer
+                                                " "
+                                             )
+                                             #f
+                                             transaction-details?
+                                             #f
+                                          )
+                                    )
+                                )
+                                ;; txf output processing
+                                (if (gnc-numeric-zero-p
+                                              tax-code-sub-item-USD-total-as-dr)
+                                    #t ;; do nothing
+                                    (begin
+                                      (set! output
+                                            (list (render-txf-account
+                                              prior-account
+                                              tax-code-sub-item-USD-total-as-dr
+                                              #f #f #f #f
+                                              (xaccAccountGetType prior-account)
+                                              (string->symbol prior-tax-code)
+                                              prior-account-copy
+                                              tax-entity-type)))
+                                      (set! tax-code-USD-total (gnc-numeric-zero))
+                                      (set! tax-code-USD-total-as-dr
+                                                             (gnc-numeric-zero))
+                                      (if (not (string=? prior-tax-code
+                                                              current-tax-code))
+                                          (begin
+                                            (set! txf-new-payer? #t)
+                                            (set! txf-l-count 0)
+                                          ))
+                                    )
+                                )
+                            )
+                            (set! tax-code-sub-item-USD-total
+                                                             (gnc-numeric-zero))
+                            (set! tax-code-sub-item-USD-total-as-dr
+                                                             (gnc-numeric-zero))
+                          )
+                          #f ;; else do nothing
+                      )
+                  )
                   ;; process prior tax code break, if appropriate, before
                   ;; processing current account 
                   (if (string=? prior-tax-code "")
                       #t ;; do nothing
                       (if tax-mode?
                          ;; printed report processing
-                         (if (string=? prior-tax-code current-tax-code)
+                         (if (and (string=? prior-tax-code current-tax-code)
+                                  (string=? prior-form-sched-line
+                                                       current-form-sched-line)
+                                  (string=? prior-form-schedule
+                                                         current-form-schedule))
                              #t ;; do nothing
                              (if (and suppress-0? (gnc-numeric-zero-p
                                                             tax-code-USD-total))
@@ -1432,16 +2160,24 @@
                                                  table
                                                  tax-code-total-amount
                                                  (string-append
-                                                     (_ "Line (Code): ")
-                                                     saved-tax-code-text
+                                                   (if (string=? ""
+                                                          prior-form-sched-line)
+                                                       (_ "Line (Code): ")
+                                                       "")
+                                                   saved-tax-code-text
                                                  )
                                                  #t
                                                  transaction-details?
+                                                 #f
                                        )
                                        (set! tax-code-USD-total
                                                              (gnc-numeric-zero))
                                        (set! tax-code-USD-total-as-dr
                                                              (gnc-numeric-zero))
+                                       (set! tax-code-sub-item-USD-total
+                                                             (gnc-numeric-zero))
+                                       (set! tax-code-sub-item-USD-total-as-dr
+                                                             (gnc-numeric-zero))
                                        (set! txf-l-count 0)
                                  )
                              )
@@ -1450,20 +2186,31 @@
                          (if (gnc-numeric-zero-p tax-code-USD-total-as-dr)
                              #t ;; do nothing
                              (if (or ;; tax-code break
-                                     (not (string=?
+                                     (not (and (string=?
                                                 prior-tax-code current-tax-code)
-                                     )
+                                               (string=? prior-form-sched-line
+                                                        current-form-sched-line)
+                                               (string=? prior-form-schedule
+                                                        current-form-schedule)))
                                      ;; not tax-code break, but tax-code allows
                                      ;; multiple lines and there is a new payer
-                                     (and
-                                      (string=? prior-tax-code current-tax-code)
-                                      (gnc:get-txf-multiple
-                                                  (gnc:account-get-txf-code
+                                     (and (or (eqv? (get-acct-txf-info
+                                                       'pns
+                                                       (xaccAccountGetType
                                                                   prior-account)
-                                                  (eq? (xaccAccountGetType
+                                                       (string->symbol
+                                                                prior-tax-code))
+                                                       'current)
+                                              (eqv? (get-acct-txf-info
+                                                       'pns
+                                                       (xaccAccountGetType
                                                                   prior-account)
-                                                       ACCT-TYPE-INCOME))
-                                      txf-new-payer?
+                                                       (string->symbol
+                                                                prior-tax-code))
+                                                       'parent))
+                                          (if (> txf-l-count 0)
+                                              txf-new-payer?
+                                              #f)
                                      )
                                  )
                                  (begin
@@ -1473,11 +2220,16 @@
                                               tax-code-USD-total-as-dr
                                               #f #f #f #f
                                               (xaccAccountGetType prior-account)
-                                              (gnc:account-get-txf-code
-                                                               prior-account))))
+                                              (string->symbol prior-tax-code)
+                                              prior-account-copy
+                                              tax-entity-type)))
                                     (set! tax-code-USD-total (gnc-numeric-zero))
                                     (set! tax-code-USD-total-as-dr
                                                              (gnc-numeric-zero))
+                                    (set! tax-code-sub-item-USD-total
+                                                             (gnc-numeric-zero))
+                                    (set! tax-code-sub-item-USD-total-as-dr
+                                                             (gnc-numeric-zero))
                                     (if (not (string=? prior-tax-code
                                                               current-tax-code))
                                         (begin
@@ -1490,6 +2242,50 @@
                          )
                       )
                   )
+                  ;; process prior form-schedule-line break, if appropriate,
+                  ;; before processing current account 
+                  (if (string=? prior-form-sched-line "")
+                      (set! form-sched-line-USD-total (gnc-numeric-zero))
+                      (if tax-mode?
+                         ;; printed report processing
+                         (if (and (string=? prior-form-sched-line
+                                                       current-form-sched-line)
+                                  (string=? prior-form-schedule
+                                                         current-form-schedule))
+                             #t ;; do nothing
+                             (if (and suppress-0? (gnc-numeric-zero-p
+                                                     form-sched-line-USD-total))
+                                 #t ;; do nothing
+                                 (let* ((print-info (gnc-account-print-info
+                                                              prior-account #f))
+                                        (form-sched-line-total-amount
+                                               (xaccPrintAmount
+                                                     form-sched-line-USD-total
+                                                     print-info))
+                                       ) 
+                                       ;; print prior form-schedule-line total
+                                       ;; and reset accum
+                                       (render-total-row
+                                                 table
+                                                 form-sched-line-total-amount
+                                                 (string-append
+                                                     prior-form-schedule
+                                                     (_ " Line ")
+                                                     prior-form-sched-line
+                                                 )
+                                                 #t
+                                                 transaction-details?
+                                                 #f
+                                       )
+                                       (set! form-sched-line-USD-total
+                                                             (gnc-numeric-zero))
+                                       (set! txf-l-count 0)
+                                 )
+                             )
+                         )
+                         #f
+                      )
+                  )
                   (if (string=? prior-form-schedule current-form-schedule)
                       (begin
                          (if form-line-acct-header-printed?
@@ -1500,59 +2296,81 @@
                              (set! need-form-schedule-header? #f)
                              (set! need-form-schedule-header? #t)
                          )
-                     )
-                     (begin ;; new form
-                        (set! need-form-line-acct-header? #t)
-                        (set! need-form-schedule-header? #t)
-                        (set! form-line-acct-header-printed? #f)
-                        (set! form-schedule-header-printed? #f)
-                        (set! prior-form-schedule current-form-schedule)
-                     )
+                      )
+                      (begin ;; new form
+                         (set! need-form-line-acct-header? #t)
+                         (set! need-form-schedule-header? #t)
+                         (set! need-tax-code-header? #t)
+                         (set! form-line-acct-header-printed? #f)
+                         (set! form-schedule-header-printed? #f)
+                         (set! tax-code-header-printed? #f)
+                         (set! prior-form-schedule current-form-schedule)
+                      )
                   )
-                  (if (string=? prior-tax-code current-tax-code)
+                  (if (and (string=? prior-tax-code current-tax-code)
+                           (string=? prior-form-sched-line
+                                                       current-form-sched-line)
+                           (string=? prior-form-schedule current-form-schedule))
                       (if tax-code-header-printed?
                           (set! need-tax-code-header? #f)
                           (set! need-tax-code-header? #t)
                       )
                       (begin ;; if new tax-code
-                         (let ((description (gnc:txf-get-description
-                                                (if (eq? type ACCT-TYPE-INCOME)
-                                                    txf-income-categories
-                                                    txf-expense-categories)
-                                                tax-code))
-                              )
+                         (let* ((description (get-acct-txf-info
+                                                   'desc
+                                                   type
+                                                   tax-code))
+                                (description (if description description ""))
+                               )
                               (set! need-tax-code-header? #t)
                               (set! tax-code-header-printed? #f)
                               (set! tax-code-text
-                                    (string-append description " ("
-                                                   current-tax-code ")"))
+                                    (string-append
+                                      (if (string=? current-form-sched-line "")
+                                          ""
+                                          (string-append "Line "
+                                                  current-form-sched-line ": "))
+                                      description " (" current-tax-code ")"))
                               (set! tax-code-heading-text
-                                    (string-append description " ("
-                                      current-tax-code
+                                    (string-append
+                                      (if (string=? current-form-sched-line "")
+                                          ""
+                                          (string-append "Line "
+                                                  current-form-sched-line ": "))
+                                      description " (" current-tax-code
                                       (if show-TXF-data?
                                           (string-append
                                             (_ ": Payer Name Option ")
                                             (if (or (eq? 'parent
-                                                     (gnc:get-txf-pns tax-code
-                                                          (eq? ACCT-TYPE-INCOME
-                                                               type)))
+                                                         (get-acct-txf-info
+                                                              'pns
+                                                              type
+                                                              tax-code))
                                                     (eq? 'current
-                                                     (gnc:get-txf-pns tax-code
-                                                          (eq? ACCT-TYPE-INCOME
-                                                               type))))
+                                                         (get-acct-txf-info
+                                                              'pns
+                                                              type
+                                                              tax-code)))
                                                 "Y"
                                                 "N")
                                             (_ ", TXF Format ")
                                             (number->string 
-                                                    (gnc:get-txf-format tax-code
-                                                         (eq? ACCT-TYPE-INCOME
-                                                              type)))
+                                                    (get-acct-txf-info
+                                                         'format
+                                                         type
+                                                         tax-code))
                                             (_ ", Multiple Copies ")
-                                            (if (gnc:get-txf-multiple tax-code
-                                                    (eq? ACCT-TYPE-INCOME type))
+                                            (if (get-acct-txf-info
+                                                     'multiple
+                                                     type
+                                                     tax-code)
                                                 "Y"
                                                 "N")
                                             (_ ", Special Dates ")
+                                            (if (txf-special-date? tax-code)
+                                                "Y"
+                                                "N")
+                                            (_ ", Special Splits ")
                                             (if (txf-special-split? tax-code)
                                                 "Y"
                                                 "N")
@@ -1563,6 +2381,22 @@
                          (set! saved-tax-code-text tax-code-text)
                       )
                   )
+                  (set! txf-account-name txf-pyr)
+                  (set! txf-l-count (if (and (= format 3)
+                                             (or (eq? code-pns 'parent)
+                                                 (eq? code-pns 'current)))
+                                        (if (equal? txf-last-payer
+                                                               txf-account-name)
+                                            txf-l-count
+                                            (if (equal? "" txf-last-payer)
+                                                1
+                                                (+ 1 txf-l-count)))
+                                        1))
+                  (set! txf-last-payer (if (and (= format 3)
+                                                (or (eq? code-pns 'parent)
+                                                    (eq? code-pns 'current)))
+                                           txf-account-name
+                                           ""))
                   (let* ((account-output (handle-account
                                                  account
                                                  table
@@ -1573,7 +2407,8 @@
                                                  tax-code-heading-text
                                                  type
                                                  tax-code
-                                                 acct-full-name))
+                                                 acct-full-name
+                                                 copy))
                          (account-USD-total-as-dr (caddr account-output))
                          (code-tfx-output (if (null? output)
                                               (if (null? (cadr account-output))
@@ -1590,6 +2425,16 @@
                         (set! tax-code-USD-total-as-dr (gnc-numeric-add-fixed
                                                        tax-code-USD-total-as-dr
                                                        account-USD-total-as-dr))
+                        (set! tax-code-sub-item-USD-total (gnc-numeric-add-fixed
+                                                     tax-code-sub-item-USD-total
+                                                          (car account-output)))
+                        (set! tax-code-sub-item-USD-total-as-dr
+                                         (gnc-numeric-add-fixed
+                                             tax-code-sub-item-USD-total-as-dr
+                                                       account-USD-total-as-dr))
+                        (set! form-sched-line-USD-total (gnc-numeric-add-fixed
+                                                       form-sched-line-USD-total
+                                                          (car account-output)))
                         (set! need-form-line-acct-header? #f)
                         (set! need-form-schedule-header? #f)
                         (set! need-tax-code-header? #f)
@@ -1598,8 +2443,10 @@
                                     (* 100 (if (> work-to-do 0)
                                                (/ work-done work-to-do)
                                                1)))
+                        (set! prior-form-sched-line current-form-sched-line)
                         (set! prior-tax-code current-tax-code)
                         (set! prior-account account)
+                        (set! prior-account-copy copy)
                         (if tax-mode?
                             '()
                             code-tfx-output)
@@ -1609,13 +2456,15 @@
 
       ;; Now, the main body
       (set! selected-accounts-sorted-by-form-line-acct '())
-      (make-form-line-acct-list selected-accounts)
+      (set! txf-invalid-alist '())
+      (make-form-line-acct-list selected-accounts tax-year)
       (set! selected-accounts-sorted-by-form-line-acct
          (sort-list
              selected-accounts-sorted-by-form-line-acct
              form-line-acct-less
          ))
       (set! work-to-do (length selected-accounts-sorted-by-form-line-acct))
+      (set! txf-l-count 0)
 
       (if (not tax-mode?) ; Do Txf mode
           (if file-name		; cancel TXF if no file selected
@@ -1641,7 +2490,7 @@
                                     selected-accounts-sorted-by-form-line-acct))
                               (output-txf
                                 (list
-                                  "V037" crlf
+                                  "V041" crlf
                                   "AGnuCash " gnc:version crlf
                                   today-date crlf
                                   "^" crlf
@@ -1655,7 +2504,9 @@
                                               #f #f #f #f
                                               (xaccAccountGetType prior-account)
                                               (gnc:account-get-txf-code
-                                                                prior-account)))
+                                                                prior-account)
+                                              prior-account-copy
+                                              tax-entity-type))
                                 ))
                              )
                              ;; prior-account can be #f if selected accounts are
@@ -1672,7 +2523,8 @@
                              #t
                        ) ; end of let
                        ;; Could not open port successfully
-                       #t ;; to prevent 2nd error dialog in gnc_plugin_page_report_export_cb
+                       #t ;; to prevent 2nd error dialog in
+                          ;; gnc_plugin_page_report_export_cb
                    ) ;; end of if
               ) ;; end of let*
           #f) ;;end of if
@@ -1683,6 +2535,23 @@
               'attribute (list "align" "right"))
 
              (gnc:html-document-set-style!
+              doc "header-just-top"
+              'tag "th"
+              'attribute (list "align" "left")
+              'attribute (list "valign" "top"))
+
+             (gnc:html-document-set-style!
+              doc "header-just-bot"
+              'tag "th"
+              'attribute (list "align" "left")
+              'attribute (list "valign" "bottom"))
+
+             (gnc:html-document-set-style!
+              doc "header-just-right"
+              'tag "th"
+              'attribute (list "align" "right"))
+
+             (gnc:html-document-set-style!
               doc "num-cell-align-bot"
               'tag "td"
               'attribute (list "align" "right")
@@ -1717,16 +2586,153 @@
                     "center"
                     (gnc:html-markup-p
                      (gnc:html-markup/format
-                      (_ "Period from %s to %s<BR>All amounts in USD unless otherwise noted")
+                      (string-append (if (and (gnc-get-current-book-tax-name)
+                                              (not (string=? ""
+                                              (gnc-get-current-book-tax-name))))
+                                         (_ "Tax Name: %s<BR>")
+                                         "%s")
+                      (_ "Period from %s to %s<BR>Tax Year %s<BR>Tax Entity Type: %s<BR>All amounts in USD unless otherwise noted"))
+                           (gnc-get-current-book-tax-name)
                            from-date
                            to-date
+                           tax-year
+                           (if (gnc:txf-get-tax-entity-type-description
+                                       (string->symbol tax-entity-type))
+                               (gnc:txf-get-tax-entity-type-description
+                                       (string->symbol tax-entity-type))
+                               (_ "None specified")
+                           )
                      )))))
 
+             (if (not (null? txf-invalid-alist))
+                 (begin
+                   (gnc:html-document-add-object! 
+                    doc (gnc:make-html-text         
+                          (gnc:html-markup-p
+                           (gnc:html-markup/format
+                      (_ "The following Account(s) have errors with their Income Tax code assignments (use 'Edit->Income Tax Options' to correct):")))))
+                   (gnc:html-document-add-object! doc error-table)
+                    (gnc:html-table-append-row!
+                      error-table
+                      (append (list (gnc:make-html-table-header-cell/markup
+                                     "header-just-bot" (_ "Account")))
+                              (list (gnc:make-html-table-header-cell/markup
+                                     "header-just-bot" (_ "Error Description")))
+                              (list (gnc:make-html-table-header-cell/markup
+                                     "header-just-bot" (_ "Code")))
+                              (list (gnc:make-html-table-header-cell/markup
+                                     "header-just-bot" (_ "Form")))
+                              (list (gnc:make-html-table-header-cell/markup
+                                     "header-just-bot" (_ "Description")))
+                      )
+                    )
+                    (map (lambda (error)
+                          (let* ((form (car (cdddr error)))
+                                 (acct (cadr (cdddr error)))
+                                 (form-desc (if form
+                                                (let* ((tax-code
+                                                 (xaccAccountGetTaxUSCode acct))
+                                                       (tax-code-sym
+                                                      (string->symbol tax-code))
+                                                       (type
+                                                      (xaccAccountGetType acct))
+                                                      )
+                                                  (get-acct-txf-info 'desc type
+                                                                   tax-code-sym)
+                                                )
+                                                ""))
+                                 (form (if form form "")))
+                            (gnc:html-table-append-row/markup!
+                               error-table
+                               "tran-detail"
+                               (append (list (gnc:make-html-table-cell
+                                              (caddr error)))
+                                       (list (gnc:make-html-table-cell
+                                              (cadr error)))
+                                       (list (gnc:make-html-table-cell
+                                              (car error)))
+                                       (list (gnc:make-html-table-cell
+                                              form))
+                                       (list (gnc:make-html-table-cell
+                                              form-desc))
+                               )
+                            )
+                          )
+                         )
+                     txf-invalid-alist)
+                   (gnc:html-document-add-object! 
+                    doc (gnc:make-html-text         
+                          (gnc:html-markup-p
+                           (gnc:html-markup/format
+                      " <BR> "))))
+                 )
+             )
+
              (gnc:html-document-add-object! doc table)
 
              (map (lambda (form-line-acct) (handle-tax-code form-line-acct))
                   selected-accounts-sorted-by-form-line-acct)
 
+             ;; if tax-code allows multiple lines, print subline
+             (if (or (and suppress-0? (gnc-numeric-zero-p
+                                                   tax-code-sub-item-USD-total))
+                     (null? selected-accounts)
+                     (not prior-account))
+                 #t ;; do nothing
+                 (if (and (or (eqv? (get-acct-txf-info 'pns
+                                            (xaccAccountGetType prior-account)
+                                              (string->symbol prior-tax-code))
+                                                                      'current)
+                              (eqv? (get-acct-txf-info 'pns
+                                            (xaccAccountGetType prior-account)
+                                              (string->symbol prior-tax-code))
+                                                                       'parent))
+                          (if (> txf-l-count 0)
+                              (if (= 3 (get-acct-txf-info 'format
+                                             (xaccAccountGetType prior-account)
+                                              (string->symbol prior-tax-code)))
+                                  #t
+                                  #f)
+                          #f)
+                     )
+                     ;; print a sub-line subtotal
+                     (if (and suppress-0? (gnc-numeric-zero-p
+                                                   tax-code-sub-item-USD-total))
+                         #t ;; do nothing
+                         (let* ((print-info (gnc-account-print-info
+                                                              prior-account #f))
+                                (tax-code-sub-item-total-amount
+                                   (xaccPrintAmount tax-code-sub-item-USD-total
+                                                                    print-info))
+                               ) 
+                               (render-total-row
+                                           table
+                                           tax-code-sub-item-total-amount
+                                           (string-append
+                                              (if (string=? ""
+                                                          prior-form-sched-line)
+                                                  (_ "Line (Code): ")
+                                                  "")
+                                              saved-tax-code-text
+                                              (_ ", Item ")
+                                              (number->string txf-l-count)
+                                              (_ ": ")
+                                              txf-last-payer
+                                              " "
+                                           )
+                                           #f
+                                           transaction-details?
+                                           #f
+                               )
+                               (set! tax-code-sub-item-USD-total
+                                                             (gnc-numeric-zero))
+                               (set! tax-code-sub-item-USD-total-as-dr
+                                                             (gnc-numeric-zero))
+                         )
+                     )
+                     #f ;; else do nothing
+                 )
+             )
              ;; print final tax-code totals
              (if (or (and suppress-0? (gnc-numeric-zero-p tax-code-USD-total))
                      (null? selected-accounts)
@@ -1742,9 +2748,38 @@
                                                             saved-tax-code-text)
                                               #t
                                               transaction-details?
+                                              #f
                        )
                  )
              )
+             ;; print final Form line number totals
+             (if (not (string=? prior-form-sched-line ""))
+                 (if (or (and suppress-0?
+                                 (gnc-numeric-zero-p form-sched-line-USD-total))
+                         (null? selected-accounts)
+                         (not prior-account)
+                     )
+                     #t ;; do nothing
+                     (let* ((print-info (gnc-account-print-info prior-account
+                                                                            #f))
+                            (form-sched-line-total-amount
+                                      (xaccPrintAmount
+                                          form-sched-line-USD-total print-info))
+                           ) 
+                           ;; print prior form-schedule-line total; reset accum
+                           (render-total-row
+                                table
+                                form-sched-line-total-amount
+                                (string-append prior-form-schedule (_ " Line ")
+                                               prior-form-sched-line)
+                                #t
+                                transaction-details?
+                                #f
+                           )
+                           (set! form-sched-line-USD-total (gnc-numeric-zero))
+                     )
+                 )
+             )
 
              (if (or (null? selected-accounts)
                      (null? selected-accounts-sorted-by-form-line-acct))
@@ -1757,7 +2792,11 @@
                   doc
                   (gnc:make-html-text
                    (gnc:html-markup-p
-                     (_ "No Tax Related accounts were found with your account selection. Change your selection or go to the Edit->Tax Options dialog to set up tax-related accounts."))))
+                     (if (or (null? (gnc-get-current-book-tax-type))
+                             (string=? (gnc-get-current-book-tax-type) "")
+                             (string=? (gnc-get-current-book-tax-type) "Other"))
+                       (_ "The Income Tax Report is only available for valid Income Tax Entity Types. Go to the Edit->Income Tax Options dialog to change your Income Tax Entity Type selection and set up tax-related accounts.")
+                       (_ "No Tax Related accounts were found with your account selection. Change your selection or go to the Edit->Income Tax Options dialog to set up tax-related accounts.")))))
                  ;; or print selected report options
                  (gnc:html-document-add-object! 
                   doc (gnc:make-html-text         
@@ -1823,7 +2862,9 @@
              doc
           ) ;end begin
       ) ;end if
-	)))
+    ) ;end let
+  )  ;end let*
+) ;end define
 
 (gnc:define-report
  'version 1
@@ -1836,8 +2877,8 @@
  'renderer (lambda (report-obj)
              (generate-tax-schedule
               (_ "Taxable Income/Deductible Expenses")
-              (_ "This report shows transaction detail for your Taxable Income \
-and Deductible Expenses.")
+              (_ "This report shows transaction detail for your accounts \
+related to Income Taxes.")
               report-obj
               #t
               #f))
@@ -1845,8 +2886,8 @@
  'export-thunk (lambda (report-obj choice file-name)
                  (generate-tax-schedule
                   (_ "Taxable Income/Deductible Expenses")
-                  (_ "This page shows your Taxable Income and \
-Deductible Expenses.")
+                  (_ "This page shows transaction detail for relevant \
+Income Tax accounts.")
                   report-obj
                   #f
                   file-name)))

Modified: gnucash/trunk/src/tax/us/de_DE.scm
===================================================================
--- gnucash/trunk/src/tax/us/de_DE.scm	2009-11-11 21:17:32 UTC (rev 18412)
+++ gnucash/trunk/src/tax/us/de_DE.scm	2009-11-15 20:35:50 UTC (rev 18413)
@@ -9,12 +9,20 @@
 (export gnc:txf-get-format)
 (export gnc:txf-get-multiple)
 (export gnc:txf-get-category-key)
+(export gnc:txf-get-line-data)
+(export gnc:txf-get-last-year)
 (export gnc:txf-get-help)
 (export gnc:txf-get-codes)
+(export gnc:txf-get-tax-entity-type)
+(export gnc:txf-get-tax-entity-type-description)
+(export gnc:txf-get-tax-entity-type-codes)
 (export gnc:txf-get-code-info)
 (export txf-help-categories)
+
 (export txf-income-categories)
 (export txf-expense-categories)
+(export txf-asset-categories)
+(export txf-liab-eq-categories)
 
 (define gnc:*tax-label* (N_ "Tax"))
 (define gnc:*tax-nr-label* (N_ "Tax Number"))

Modified: gnucash/trunk/src/tax/us/txf-de_DE.scm
===================================================================
--- gnucash/trunk/src/tax/us/txf-de_DE.scm	2009-11-11 21:17:32 UTC (rev 18412)
+++ gnucash/trunk/src/tax/us/txf-de_DE.scm	2009-11-15 20:35:50 UTC (rev 18413)
@@ -15,31 +15,80 @@
 ;; e.g. the Winston software
 ;; http://www.felfri.de/winston/schnittstellen.htm
 ;;
-(define (gnc:txf-get-payer-name-source categories code)
-  (gnc:txf-get-code-info categories code 0))
-(define (gnc:txf-get-form categories code)
-  (gnc:txf-get-code-info categories code 1))
-(define (gnc:txf-get-description categories code)
-  (gnc:txf-get-code-info categories code 2))
-(define (gnc:txf-get-format categories code)
-  (gnc:txf-get-code-info categories code 3))
-(define (gnc:txf-get-multiple categories code)
-  (gnc:txf-get-code-info categories code 4))
-(define (gnc:txf-get-category-key categories code)
-  (gnc:txf-get-code-info categories code 5))
+
+(define txf-tax-entity-types
+  (list
+   (cons 'Ind #("Individual, Joint, etc." "Files Individual German Tax Return"))
+   (cons 'Other #("None" "No Income Tax Options Provided"))))
+
+(define (gnc:tax-type-txf-get-code-info tax-entity-types type-code index)
+  (let ((tax-entity-type (assv type-code tax-entity-types)))
+    (and tax-entity-type
+         (vector-ref (cdr tax-entity-type) index))))
+
+(define (gnc:txf-get-tax-entity-type type-code)
+  (gnc:tax-type-txf-get-code-info txf-tax-entity-types type-code 0))
+
+(define (gnc:txf-get-tax-entity-type-description type-code)
+  (gnc:tax-type-txf-get-code-info txf-tax-entity-types type-code 1))
+
+(define (gnc:txf-get-tax-entity-type-codes)
+  (map car txf-tax-entity-types))
+
+(define (gnc:txf-get-payer-name-source categories code tax-entity-type)
+  (gnc:txf-get-code-info categories code 0 tax-entity-type))
+(define (gnc:txf-get-form categories code tax-entity-type)
+  (gnc:txf-get-code-info categories code 1 tax-entity-type))
+(define (gnc:txf-get-description categories code tax-entity-type)
+  (gnc:txf-get-code-info categories code 2 tax-entity-type))
+(define (gnc:txf-get-format categories code tax-entity-type)
+  (gnc:txf-get-code-info categories code 3 tax-entity-type))
+(define (gnc:txf-get-multiple categories code tax-entity-type)
+  (gnc:txf-get-code-info categories code 4 tax-entity-type))
+(define (gnc:txf-get-category-key categories code tax-entity-type)
+  (gnc:txf-get-code-info categories code 5 tax-entity-type))
+(define (gnc:txf-get-line-data categories code tax-entity-type)
+  (let* ((tax-entity-codes (cdr (assv (string->symbol tax-entity-type)
+                                                                  categories)))
+         (category (assv code tax-entity-codes)))
+    (if (or (not category) (< (vector-length (cdr category)) 7))
+        #f
+        (gnc:txf-get-code-info categories code 6 tax-entity-type))))
+(define (gnc:txf-get-last-year categories code tax-entity-type)
+  (let* ((tax-entity-codes (cdr (assv (string->symbol tax-entity-type)
+                                                                  categories)))
+         (category (assv code tax-entity-codes)))
+    (if (or (not category) (< (vector-length (cdr category)) 8))
+        #f
+        (gnc:txf-get-code-info categories code 7 tax-entity-type))))
+
 (define (gnc:txf-get-help categories code)
   (let ((pair (assv code txf-help-strings)))
     (if pair
         (cdr pair)
         "No help available.")))
 
-(define (gnc:txf-get-codes categories)
-  (map car categories))
+(define (gnc:txf-get-codes categories tax-entity-type)
+  (let* ((tax-entity-code-list-pair (assv (if (eqv? tax-entity-type "")
+                                              'Ind
+                                              (string->symbol tax-entity-type))
+                                          categories))
+         (tax-entity-codes (if tax-entity-code-list-pair
+                               (cdr tax-entity-code-list-pair)
+                               '())))
+    (map car tax-entity-codes)))
 
 ;;;; Private
 
-(define (gnc:txf-get-code-info categories code index)
-  (let ((category (assv code categories)))
+(define (gnc:txf-get-code-info categories code index tax-entity-type)
+  (let* ((tax-entity-code-list-pair (assv (if (eqv? tax-entity-type "")
+                                              'Ind
+                                              (string->symbol tax-entity-type))
+                                          categories))
+         (tax-entity-codes (if tax-entity-code-list-pair
+                               (cdr tax-entity-code-list-pair)
+                               '()))
+         (category (assv code tax-entity-codes)))
     (and category
          (vector-ref (cdr category) index))))
 
@@ -56,7 +105,9 @@
 
 ;; Format: (name-source  form  description  format  multiple  category-key)
 (define txf-income-categories
-  (list
+ (list
+  (cons 'Ind
+   (list
    (cons 'N000 #(none "" "Nur zur Voransicht im Steuer-Bericht -- kein Export" 0 #f ""))
 
    (cons 'K35 #(none "35" "Umsätze, die anderen Steuersätzen unterliegen (Bemessungsgrundlage)" 2 #f "35"))
@@ -82,7 +133,9 @@
    (cons 'K97 #(none "97" "Steuerpflichtige innergemeinschaftliche Erwerbe zum Steuersatz von 16 v.H." 2 #f "97"))
    (cons 'K98 #(none "98" "Steuerpflichtige innergemeinschaftliche Erwerbe zu anderen Steuersätzen (Steuer)" 1 #f "98"))
 
-   ))
+   )
+  )
+))
 
 
 ;; We use several formats; nr. 1 means Euro+Cent, nr. 2 means only full Euro
@@ -92,7 +145,9 @@
 
 ;; Format: (name-source  form  description  format  multiple  category-key)
 (define txf-expense-categories
-  (list
+ (list
+  (cons 'Ind
+   (list
    (cons 'N000 #(none "" "Nur zur Voransicht im Steuer-Bericht -- kein Export" 0 #f ""))
 
    (cons 'K52 #(none "52" "Leistungen eines im Ausland ansässigen Unternehmers (Bemessungsgrundlage)" 2 #f "52"))
@@ -114,10 +169,28 @@
    (cons 'K94 #(none "94" "Innergemeinschaftliche Erwerbe neuer Fahrzeuge von Lieferern ohne USt-IdNr. (Bemessungsgrundlage)" 2 #f "94"))
    (cons 'K95 #(none "95" "Steuerpflichtige innergemeinschaftliche Erwerbe zu anderen Steuersätzen (Bemessungsgrundlage)" 2 #f "95"))
    (cons 'K96 #(none "96" "Innergemeinschaftliche Erwerbe neuer Fahrzeuge von Lieferern ohne USt-IdNr. (Steuer)" 1 #f "96"))
+   )
+  )
 
    ))
 
+(define txf-asset-categories
+ (list
+  (cons 'Ind
+   (list
+    (cons 'N000 #(none "" "Nur zur Voransicht im Steuer-Bericht -- kein Export" 0 #f ""))
+   )
+  )
+))
 
+(define txf-liab-eq-categories
+ (list
+  (cons 'Ind
+   (list
+    (cons 'N000 #(none "" "Nur zur Voransicht im Steuer-Bericht -- kein Export" 0 #f ""))
+   )
+  )
+))
 
 ;;; Register global options in this book
 (define (book-options-generator options)

Modified: gnucash/trunk/src/tax/us/txf.scm
===================================================================
--- gnucash/trunk/src/tax/us/txf.scm	2009-11-11 21:17:32 UTC (rev 18412)
+++ gnucash/trunk/src/tax/us/txf.scm	2009-11-15 20:35:50 UTC (rev 18413)
@@ -6,31 +6,83 @@
 ;;
 ;; See also http://www.turbotax.com/txf/
 ;;
-(define (gnc:txf-get-payer-name-source categories code)
-  (gnc:txf-get-code-info categories code 0))
-(define (gnc:txf-get-form categories code)
-  (gnc:txf-get-code-info categories code 1))
-(define (gnc:txf-get-description categories code)
-  (gnc:txf-get-code-info categories code 2))
-(define (gnc:txf-get-format categories code)
-  (gnc:txf-get-code-info categories code 3))
-(define (gnc:txf-get-multiple categories code)
-  (gnc:txf-get-code-info categories code 4))
-(define (gnc:txf-get-category-key categories code)
-  (gnc:txf-get-code-info categories code 5))
+;; Updated Oct 2009. J. Alex Aycinena
+;; Added 'txf-tax-entity-types' and related getter functions
+;; Added 'tax-entity-type' argument to tax code getter functions
+;; Updated txf data for individual tax returns to version 041 (from 039) and
+;;    added tax-line year-effectivity data and code last-year data
+;; Added asset and liability/equity tax code categories
+;; Added version 041 txf data for Partnership, Corporation, S Corporation,
+;;    tax entity types
+;; Added 'None' type for no income tax options
+;;
+
+(define txf-tax-entity-types
+  (list
+   (cons 'F1040 #("Individual, Joint, etc." "Files US Form 1040 Tax Return"))
+   (cons 'F1065 #("Partnership" "Files US Form 1065 Tax Return"))
+   (cons 'F1120 #("Corporation" "Files US Form 1120 Tax Return"))
+   (cons 'F1120S #("S Corporation" "Files US Form 1120S Tax Return"))
+   (cons 'Other #("None" "No Income Tax Options Provided"))))
+
+(define (gnc:tax-type-txf-get-code-info tax-entity-types type-code index)
+  (let ((tax-entity-type (assv type-code tax-entity-types)))
+    (and tax-entity-type
+         (vector-ref (cdr tax-entity-type) index))))
+
+(define (gnc:txf-get-tax-entity-type type-code)
+  (gnc:tax-type-txf-get-code-info txf-tax-entity-types type-code 0))
+
+(define (gnc:txf-get-tax-entity-type-description type-code)
+  (gnc:tax-type-txf-get-code-info txf-tax-entity-types type-code 1))
+
+(define (gnc:txf-get-tax-entity-type-codes)
+  (map car txf-tax-entity-types))
+
+(define (gnc:txf-get-payer-name-source categories code tax-entity-type)
+  (gnc:txf-get-code-info categories code 0 tax-entity-type))
+(define (gnc:txf-get-form categories code tax-entity-type)
+  (gnc:txf-get-code-info categories code 1 tax-entity-type))
+(define (gnc:txf-get-description categories code tax-entity-type)
+  (gnc:txf-get-code-info categories code 2 tax-entity-type))
+(define (gnc:txf-get-format categories code tax-entity-type)
+  (gnc:txf-get-code-info categories code 3 tax-entity-type))
+(define (gnc:txf-get-multiple categories code tax-entity-type)
+  (gnc:txf-get-code-info categories code 4 tax-entity-type))
+(define (gnc:txf-get-category-key categories code tax-entity-type)
+  (gnc:txf-get-code-info categories code 5 tax-entity-type))
+(define (gnc:txf-get-line-data categories code tax-entity-type)
+  (let* ((tax-entity-codes (cdr (assv (string->symbol tax-entity-type)
+                                                                  categories)))
+         (category (assv code tax-entity-codes)))
+    (if (or (not category) (< (vector-length (cdr category)) 7))
+        #f
+        (gnc:txf-get-code-info categories code 6 tax-entity-type))))
+(define (gnc:txf-get-last-year categories code tax-entity-type)
+  (let* ((tax-entity-codes (cdr (assv (string->symbol tax-entity-type)
+                                                                  categories)))
+         (category (assv code tax-entity-codes)))
+    (if (or (not category) (< (vector-length (cdr category)) 8))
+        #f
+        (gnc:txf-get-code-info categories code 7 tax-entity-type))))
+
 (define (gnc:txf-get-help categories code)
   (let ((pair (assv code txf-help-strings)))
     (if pair
         (cdr pair)
         "No help available.")))
 
-(define (gnc:txf-get-codes categories)
-  (map car categories))
+(define (gnc:txf-get-codes categories tax-entity-type)
+  (let ((tax-entity-codes (cdr (assv (string->symbol tax-entity-type)
+                                                                 categories))))
+    (map car tax-entity-codes)))
 
-;;;; Private
-
-(define (gnc:txf-get-code-info categories code index)
-  (let ((category (assv code categories)))
+(define (gnc:txf-get-code-info categories code index tax-entity-type)
+  (let* ((tax-entity-codes (cdr (assv (if (eqv? tax-entity-type "")
+                                     'F1040
+                                     (string->symbol tax-entity-type))
+                                                                  categories)))
+         (category (assv code tax-entity-codes)))
     (and category
          (vector-ref (cdr category) index))))
 
@@ -41,355 +93,1139 @@
    (cons 'H003 #(not-impl "help" "Not implemented yet, Do NOT Use!" 0 #f ""))))
 
 (define txf-income-categories
-  (list
-   (cons 'N000 #(none "" "Tax Report Only - No TXF Export" 0 #f ""))
-   (cons 'N261 #(none "F1040" "Alimony received" 1 #f "Alimony receive"))
-   (cons 'N257 #(none "F1040" "Other income, misc." 1 #f "Other income, m"))
-   (cons 'N519 #(none "F1040" "RR retirement income, self" 1 #f "RR retirement i"))
-   (cons 'N520 #(none "F1040" "RR retirement income, spouse" 1 #f "RR retirement i"))
-   (cons 'N258 #(none "F1040" "Sick pay or disability pay" 1 #f "Sick Pay"))
-   (cons 'N266 #(none "F1040" "Social Security income, self" 1 #f "Social Security"))
-   (cons 'N483 #(none "F1040" "Social Security income, spouse" 1 #f "Social Security"))
-   (cons 'N269 #(none "F1040" "Taxable fringe benefits" 1 #f "Taxable fringe"))
+ (list
+  (cons 'F1040
+   (list
+    (cons 'N000 #(none "" "Tax Report Only - No TXF Export" 0 #f ""))
 
-   (cons 'N672 #(none "F1099-G" "Qualified state tuition earnings" 1 #t ""))
-   (cons 'N260 #(none "F1099-G" "State and local tax refunds" 1 #t ""))
-   (cons 'N479 #(none "F1099-G" "Unemployment compensation" 1 #t "Unemployment In"))
+    (cons 'N256 #(not-impl "F1040" "Form 1040" 1 #f ""))
+    (cons 'N258 #(none "F1040" "Sick pay or disab. pay" 1 #f "Sick Pay" ((1981 "7") (1980 "8"))))
+    (cons 'N269 #(none "F1040" "Taxable fringe benefits" 1 #f "Taxable fringe" ((1981 "7") (1980 "8"))))
+    (cons 'N487 #(current "F1040" "Dividend, non-taxable" 3 #f "_DivInc TaxFree" ((1988 "8b") (1987 "9"))))
+    (cons 'N683 #(none "F1040" "Qualified dividend" 3 #f "" ((2003 "9b"))))
+    (cons 'N261 #(none "F1040" "Alimony received" 1 #f "Alimony receive" ((1988 "11") (1987 "12") (1986 "11") (1981 "10") (1980 "12"))))
+    (cons 'N519 #(none "F1040" "RR retirement income" 1 #f "RR retirement i" ((1994 "20a") (1988 "21a") (1987 "20a") (1984 "21a"))))
+    (cons 'N520 #(none "F1040" "RR retirement inc, spouse" 1 #f "RR retirement i" ((1994 "20a") (1988 "21a") (1987 "20a") (1984 "21a"))))
+    (cons 'N266 #(none "F1040" "Soc. Sec. income" 1 #f "Social Security" ((1994 "20a") (1988 "21a") (1987 "20a") (1984 "21a"))))
+    (cons 'N483 #(none "F1040" "Soc. Sec. income, spouse" 1 #f "Social Security" ((1994 "20a") (1988 "21a") (1987 "20a") (1984 "21a"))))
+    (cons 'N257 #(none "F1040" "Other income-misc." 1 #f "Other income, m" ((1994 "21") (1988 "22") (1987 "21") (1984 "22") (1982 "21") (1981 "20") (1980 "21"))))
+    (cons 'N259 #(none "F1040" "Prizes, awards" 1 #f "Prizes, awards" ((1994 "21") (1988 "22") (1987 "21") (1984 "22") (1982 "21") (1981 "20") (1980 "21"))))
 
-   (cons 'N562 #(parent "F1099-MISC" "Crop insurance proceeds" 1 #t ""))
-   (cons 'N559 #(parent "F1099-MISC" "Fishing boat proceeds" 1 #t ""))
-   (cons 'N560 #(parent "F1099-MISC" "Medical/health payments" 1 #t ""))
-   (cons 'N561 #(parent "F1099-MISC" "Nonemployee compensation" 1 #t ""))
-   (cons 'N557 #(parent "F1099-MISC" "Other income" 1 #t ""))
-   (cons 'N259 #(parent "F1099-MISC" "Prizes and awards" 1 #t "Prizes, awards"))
-   (cons 'N555 #(parent "F1099-MISC" "Rents" 1 #t ""))
-   (cons 'N556 #(parent "F1099-MISC" "Royalties" 1 #t ""))
+    (cons 'N285 #(not-impl "Sched B" "Schedule B" 1 #f ""))
+    (cons 'N287 #(current "Sched B" "Interest income" 3 #f "_IntInc" ((1990 "1") (1982 "2") (1981 "1a") (1980 "1"))))
+    (cons 'N288 #(current "Sched B" "Interest, US government" 3 #f "" ((1990 "1") (1982 "2") (1981 "1a") (1980 "1"))))
+    (cons 'N289 #(current "Sched B" "Interest, State and muni bond" 3 #f "" ((1990 "1") (1982 "2") (1981 "1a") (1980 "1"))))
+    (cons 'N489 #(current "Sched B" "Interest, non-taxable" 3 #f "_IntInc TaxFree" ((1990 "1") (1982 "2") (1981 "1a") (1980 "1"))))
+    (cons 'N490 #(current "Sched B" "Interest, taxed only by fed" 3 #f "" ((1990 "1") (1982 "2") (1981 "1a") (1980 "1"))))
+    (cons 'N491 #(current "Sched B" "Interest, taxed only by state" 3 #f "" ((1990 "1") (1982 "2") (1981 "1a") (1980 "1"))))
+    (cons 'N492 #(current "Sched B" "Interest, OID bonds" 3 #f "" ((1990 "1") (1982 "2") (1981 "1a") (1980 "1"))))
+    (cons 'N524 #(current "Sched B" "Interest, Seller-financed mortgage" 3 #f "Seller-financed" ((1982 "1") (1981 "1a") (1980 "1"))))
+    (cons 'N286 #(parent "Sched B" "Total dividend income" 3 #f "_DivInc" ((1990 "5") (1984 "4") (1982 "9") (1980 "3"))))
 
-   (cons 'N632 #(none "F1099-MSA" "MSA earnings on excess contrib" 1 #t ""))
-   (cons 'N631 #(none "F1099-MSA" "MSA gross distribution" 1 #t ""))
+    (cons 'N291 #(not-impl "Sched C" "Schedule C" 1 #t ""))
+    (cons 'N292 #(not-impl "Sched C" "Spouse" 0 #t "" ((1980 ""))))
+    (cons 'N319 #(not-impl "Sched C" "Principal business/prof" 2 #t "" ((1980 "A"))))
+    (cons 'N293 #(none "Sched C" "Gross receipts or sales" 1 #t "" ((1989 "1") (1980 "1a"))))
+    (cons 'N303 #(none "Sched C" "Other business income" 1 #t "" ((1989 "6") (1987 "4") (1981 "4b") (1980 "4"))))
 
-   (cons 'N623 #(parent "F1099-R" "SIMPLE total gross distrib." 1 #t ""))
-   (cons 'N624 #(parent "F1099-R" "SIMPLE total taxable distrib." 1 #t ""))
-   (cons 'N477 #(parent "F1099-R" "Total IRA gross distrib." 1 #t ""))
-   (cons 'N478 #(parent "F1099-R" "Total IRA taxable distrib." 1 #t ""))
-   (cons 'N475 #(parent "F1099-R" "Total pension gross distrib." 1 #t ""))
-   (cons 'N476 #(parent "F1099-R" "Total pension taxable distrib." 1 #t ""))
+    (cons 'N497 #(not-impl "Sched C-EZ" "Schedule C-EZ" 1 #t ""))
+    (cons 'N498 #(not-impl "Sched C-EZ" "Spouse" 0 #t "" ((1992 ""))))
+    (cons 'N501 #(not-impl "Sched C-EZ" "Principal business/prof" 2 #t "" ((1992 "A"))))
+    (cons 'N499 #(none "Sched C-EZ" "Gross receipts" 1 #t "" ((1992 "1"))))
 
-   (cons 'N387 #(none "F2106" "Reimb. business exp. (non-meal/ent.)" 1 #t ""))
-   (cons 'N388 #(none "F2106" "Reimb. meal/entertainment exp." 1 #t ""))
+    (cons 'N320 #(not-impl "Sched D" "Schedule D" 1 #f ""))
+    (cons 'N321 #(not-impl "Sched D" "Short Term gain/loss - security" 4 #f "" ((1993 "1") (1991 "1a") (1986 "2a") (1985 "1b") (1980 "1"))))
+    (cons 'N322 #(not-impl "Sched D" "ST gain/loss - other" 4 #f "" ((1991 "1d") (1989 "2d") (1986 "2c")) 1992))
+    (cons 'N323 #(not-impl "Sched D" "Long Term gain/loss - security" 4 #f "" ((1997 "8") (1993 "9") (1992 "9a") (1991 "8a") (1986 "9a") (1983 "9") (1980 "8"))))
+    (cons 'N324 #(not-impl "Sched D" "LT gain/loss - other" 4 #f "" ((1992 "9d") (1991 "8d") (1989 "9d") (1986 "9c")) 1992))
+    (cons 'N673 #(not-impl "Sched D" "Short/Long gain or loss" 4 #f "" ((1999 "1 or 8"))))
+    (cons 'N682 #(not-impl "Sched D" "Wash Sale - security" 4 #f "" ((2003 "1 or 8"))))
+    (cons 'N488 #(parent "Sched D" "Dividend, cap gain distrib." 3 #f "_LT CapGnDst" ((1997 "13") (1992 "14") (1991 "12") (1986 "13") (1983 "15") (1980 "13"))))
+    (cons 'N684 #(none "Sched D" "Div inc., PostMay5 cap gain" 3 #f "" ((2004 "NA - Expired") (2003 "13g")) 2003))
+    (cons 'N644 #(current "Sched D" "28% cap gain" 3 #f "" ((2004 "18") (2003 "20") (1997 "8g"))))
+    (cons 'N646 #(current "Sched D" "Sec 1202 gain" 3 #f "" ((2004 "18") (2003 "20") (1998 "8"))))
+    (cons 'N645 #(current "Sched D" "Unrec sec 1250" 3 #f "" ((2001 "19") (1997 "25"))))
+    (cons 'N677 #(current "Sched D" "Qualified 5-year gain" 3 #f "" ((2004 "NA - Expired") (2003 "35") (2001 "8")) 2003))
 
-   (cons 'N505 #(none "F4137" "Total cash/tips not reported to employer" 1 #t ""))
+    (cons 'N325 #(not-impl "Sched E" "Schedule E" 1 #t ""))
+    (cons 'N342 #(not-impl "Sched E" "Kind/location of property" 2 #t "" ((1985 "1") (1984 "2") (1982 "") (1981 "V(a)") (1980 "V"))))
+    (cons 'N326 #(none "Sched E" "Rents received" 1 #t "" ((1990 "3") (1987 "4") (1981 "3a") (1980 "8(b)"))))
+    (cons 'N327 #(none "Sched E" "Royalties received" 1 #t "" ((1990 "4") (1987 "5") (1981 "3b") (1980 "8(c)"))))
 
-   (cons 'N416 #(none "F4684" "FMV after casualty" 1 #t ""))
-   (cons 'N415 #(none "F4684" "FMV before casualty" 1 #t ""))
-   (cons 'N414 #(none "F4684" "Insurance/reimbursement" 1 #t ""))
+    (cons 'N343 #(not-impl "Sched F" "Schedule F" 1 #t ""))
+    (cons 'N514 #(not-impl "Sched F" "Spouse" 0 #t "" ((1990 ""))))
+    (cons 'N379 #(not-impl "Sched F" "Principal product" 2 #t "" ((1990 "A"))))
+    (cons 'N369 #(none "Sched F" "Resales of livestock" 1 #t "" ((1990 "1"))))
+    (cons 'N368 #(none "Sched F" "Sales livestock/crops raised" 1 #t "" ((1990 "4"))))
+    (cons 'N371 #(none "Sched F" "Coop. distributions" 1 #t "" ((1990 "5a"))))
+    (cons 'N372 #(none "Sched F" "Agricultural program payments" 1 #t "" ((1990 "6a"))))
+    (cons 'N373 #(none "Sched F" "CCC loans reported/election" 1 #t "" ((1990 "7a"))))
+    (cons 'N374 #(none "Sched F" "CCC loans forfeited or repaid" 1 #t "" ((1990 "7b"))))
+    (cons 'N375 #(none "Sched F" "Crop insurance proceeds received" 1 #t "" ((1990 "8a"))))
+    (cons 'N376 #(none "Sched F" "Crop insurance proceeds deferred" 1 #t "" ((1990 "8d"))))
+    (cons 'N370 #(none "Sched F" "Custom hire (machine work)" 1 #t "" ((1990 "9"))))
+    (cons 'N377 #(none "Sched F" "Other farm income" 1 #t "" ((1990 "10"))))
 
-   (cons 'N573 #(none "F4835" "Agricultural program paymnts" 1 #t ""))
-   (cons 'N575 #(none "F4835" "CCC loans forfeited/repaid" 1 #t ""))
-   (cons 'N574 #(none "F4835" "CCC loans reported/election" 1 #t ""))
-   (cons 'N577 #(none "F4835" "Crop insurance proceeds deferred" 1 #t ""))
-   (cons 'N576 #(none "F4835" "Crop insurance proceeds received" 1 #t ""))
-   (cons 'N578 #(none "F4835" "Other income" 1 #t ""))
-   (cons 'N571 #(none "F4835" "Sale of livestock/produce" 1 #t ""))
-   (cons 'N572 #(none "F4835" "Total co-op distributions" 1 #t ""))
+    (cons 'N380 #(not-impl "F2106" "Form 2106" 1 #t ""))
+    (cons 'N387 #(none "F2106" "Emp. expense reimb." 1 #t "" ((1990 "7,A"))))
+    (cons 'N388 #(none "F2106" "Emp. meal exp reimb" 1 #t "" ((1990 "7,B"))))
 
-   (cons 'N429 #(none "F6252" "Debt assumed by buyer" 1 #t ""))
-   (cons 'N431 #(none "F6252" "Depreciation allowed" 1 #t ""))
-   (cons 'N435 #(none "F6252" "Payments received prior years" 1 #t ""))
-   (cons 'N434 #(none "F6252" "Payments received this year" 1 #t ""))
-   (cons 'N428 #(none "F6252" "Selling price" 1 #t ""))
+    (cons 'N392 #(not-impl "HomeWks" "Home Sale Worksheets" 1 #t ""))
+    (cons 'N525 #(not-impl "HomeWks" "Spouse" 0 #t "" ((2000 "")) 2000))
+    (cons 'N398 #(not-impl "HomeWks" "Date old home sold" 2 #t "" ((2002 ""))))
+    (cons 'N399 #(not-impl "HomeWks" "Date moved into new home" 2 #t "" ((2000 "11a")) 2000))
+    (cons 'N393 #(none "HomeWks" "Selling price of old home" 1 #t "" ((2002 "1"))))
 
-   (cons 'N444 #(none "F8815" "EE US svgs. bonds proceeds" 1 #f ""))
-   (cons 'N443 #(none "F8815" "Nontaxable education benefits" 1 #f ""))
-   (cons 'N445 #(none "F8815" "Post-89 EE bond face value" 1 #f ""))
+    (cons 'N503 #(not-impl "F4137" "Form 4137" 1 #t ""))
+    (cons 'N504 #(not-impl "F4137" "Spouse" 0 #t "" ((1990 ""))))
+    (cons 'N505 #(none "F4137" "Cash/charge tips received" 1 #t "" ((2007 "2") (1990 "1"))))
 
-   (cons 'N420 #(not-impl "F4797" "Long Term dep. gain - business" 5 #f ""))
-   (cons 'N423 #(not-impl "F4797" "Long Term dep. gain - res. rent." 5 #f ""))
-   (cons 'N421 #(not-impl "F4797" "Short Term dep. prop. - business" 5 #f ""))
-   (cons 'N424 #(not-impl "F4797" "Short Term dep. prop. - res. rent." 5 #f ""))
-   (cons 'N637 #(none "F8863" "Hope credit" 1 #t ""))
-   (cons 'N638 #(none "F8863" "Lifetime learning credit" 1 #t ""))
+    (cons 'N412 #(not-impl "F4684" "Form 4684" 1 #t ""))
+    (cons 'N417 #(not-impl "F4684" "Description of property" 2 #t "" ((1990 "1"))))
+    (cons 'N414 #(none "F4684" "Insurance/reimb" 1 #t "" ((1990 "3"))))
+    (cons 'N415 #(none "F4684" "FMV before casualty" 1 #t "" ((1990 "5"))))
+    (cons 'N416 #(none "F4684" "FMV after casualty" 1 #t "" ((1990 "6"))))
 
-   (cons 'N393 #(none "Home Sale" "Selling price of old home" 1 #t ""))
+    (cons 'N418 #(not-impl "F4797" "Form 4797" 1 #f ""))
+    (cons 'N420 #(not-impl "F4797" "LT dep. gain - business" 5 #f "" ((1990 "2"))))
+    (cons 'N423 #(not-impl "F4797" "LT dep. gain - res. rent." 5 #f "" ((1990 "2"))))
+    (cons 'N421 #(not-impl "F4797" "ST dep. prop. - business" 5 #f "" ((1997 "10") (1992 "11") (1990 "10"))))
+    (cons 'N424 #(not-impl "F4797" "ST dep. prop. - res. rent." 5 #f "" ((1997 "10") (1992 "11") (1990 "10"))))
 
-   (cons 'N488 #(parent "Sched B" "Dividend, cap gain distrib." 3 #t "_LT CapGnDst"))
-   (cons 'N487 #(current "Sched B" "Dividend, non-taxable" 3 #t "_DivInc TaxFree"))
-   (cons 'N286 #(parent "Sched B" "Dividend, Ordinary" 3 #t "_DivInc"))
-   (cons 'N287 #(current "Sched B" "Interest" 3 #t "_IntInc"))
-   (cons 'N489 #(current "Sched B" "Interest, non-taxable" 3 #t "_IntInc TaxFree"))
-   (cons 'N492 #(current "Sched B" "Interest, OID bonds" 3 #t ""))
-   (cons 'N524 #(current "Sched B" "Interest, Seller-financed mortgage" 3 #t "Seller-financed"))
-   (cons 'N289 #(current "Sched B" "Interest, State and muni bond" 3 #t ""))
-   (cons 'N490 #(current "Sched B" "Interest, taxed only by fed" 3 #t ""))
-   (cons 'N491 #(current "Sched B" "Interest, taxed only by state" 3 #t ""))
-   (cons 'N290 #(current "Sched B" "Interest, Tax Exempt private activity bond" 3 #t ""))
-   (cons 'N288 #(current "Sched B" "Interest, US government" 3 #t ""))
+    (cons 'N569 #(not-impl "F4835" "Form 4835" 1 #t ""))
+    (cons 'N570 #(not-impl "F4835" "Spouse" 0 #t "" ((1990 ""))))
+    (cons 'N571 #(none "F4835" "Sale of livestock/produce" 1 #t "" ((1990 "1"))))
+    (cons 'N572 #(none "F4835" "Total co-op distributions" 1 #t "" ((1990 "2a"))))
+    (cons 'N573 #(none "F4835" "Agricultural program paymnts" 1 #t "" ((1990 "3a"))))
+    (cons 'N574 #(none "F4835" "CCC loans reported/election" 1 #t "" ((1990 "4a"))))
+    (cons 'N575 #(none "F4835" "CCC loans forfeited/repaid" 1 #t "" ((1990 "4b"))))
+    (cons 'N576 #(none "F4835" "Crop insurance proceeds received" 1 #t "" ((1990 "5a"))))
+    (cons 'N577 #(none "F4835" "Crop insurance proceeds deferred" 1 #t "" ((1990 "5d"))))
+    (cons 'N578 #(none "F4835" "Other income" 1 #t "" ((1990 "6"))))
 
-   (cons 'N293 #(none "Sched C" "Gross receipts or sales" 1 #t ""))
-   (cons 'N303 #(none "Sched C" "Other business income" 1 #t ""))
+    (cons 'N290 #(current "F6251" "Interest, Tax Exempt private activity bond" 3 #f "" ((2008 "12") (2002 "11") (1993 "13") (1991 "6b") (1990 "5b"))))
 
-   (cons 'N323 #(not-impl "Sched D" "Long Term gain/loss - security" 4 #f ""))
-   (cons 'N321 #(not-impl "Sched D" "Short Term gain/loss - security" 4 #f ""))
-   (cons 'N810 #(not-impl "Sched D" "Short/Long Term gain or loss" 4 #f ""))
+    (cons 'N427 #(not-impl "F6252" "Form 6252" 1 #t ""))
+    (cons 'N436 #(not-impl "F6252" "Description of property" 2 #t "" ((1992 "1") (1990 "A"))))
+    (cons 'N428 #(none "F6252" "Selling price" 1 #t "" ((1992 "5") (1990 "1"))))
+    (cons 'N429 #(none "F6252" "Debt assumed by buyer" 1 #t "" ((1992 "6") (1990 "1"))))
+    (cons 'N431 #(none "F6252" "Depreciation allowed" 1 #t "" ((1992 "9") (1990 "5"))))
+    (cons 'N433 #(not-impl "F6252" "Gross profit percentage" 1 #t "" ((1992 "19") (1990 "15"))))
+    (cons 'N434 #(none "F6252" "Payments received this year" 1 #t "" ((1992 "21") (1990 "17"))))
+    (cons 'N435 #(none "F6252" "Payments received prior years" 1 #t "" ((1992 "23") (1990 "19"))))
 
-   (cons 'N326 #(none "Sched E" "Rents received" 1 #t ""))
-   (cons 'N327 #(none "Sched E" "Royalties received" 1 #t ""))
+    (cons 'N441 #(not-impl "F8815" "Form 8815" 1 #f ""))
+    (cons 'N443 #(none "F8815" "Nontaxable education benefits" 1 #f "" ((1990 "3"))))
+    (cons 'N444 #(none "F8815" "EE US svgs. bonds proceeds" 1 #f "" ((1990 "5"))))
+    (cons 'N445 #(none "F8815" "Post-89 EE bond face value" 1 #f "" ((1999 "6wksht2") (1990 "6wksht1"))))
 
-   (cons 'N372 #(none "Sched F" "Agricultural program payments" 1 #t ""))
-   (cons 'N374 #(none "Sched F" "CCC loans forfeited or repaid" 1 #t ""))
-   (cons 'N373 #(none "Sched F" "CCC loans reported/election" 1 #t ""))
-   (cons 'N376 #(none "Sched F" "Crop insurance proceeds deferred" 1 #t ""))
-   (cons 'N375 #(none "Sched F" "Crop insurance proceeds received" 1 #t ""))
-   (cons 'N370 #(none "Sched F" "Custom hire income" 1 #t ""))
-   (cons 'N377 #(none "Sched F" "Other farm income" 1 #t ""))
-   (cons 'N369 #(none "Sched F" "Resales of livestock/items" 1 #t ""))
-   (cons 'N368 #(none "Sched F" "Sales livestock/product raised" 1 #t ""))
-   (cons 'N371 #(none "Sched F" "Total co-op. distributions" 1 #t ""))
+    (cons 'N446 #(not-impl "Sched K-1" "Schedule K-1 Worksheet" 1 #t ""))
+    (cons 'N447 #(not-impl "Sched K-1" "Spouse" 0 #t "" ((1990 ""))))
+    (cons 'N457 #(not-impl "Sched K-1" "Partnership or S corp name" 2 #t "" ((2004 "B") (1990 ""))))
+    (cons 'N448 #(parent "Sched K-1" "Ordinary income or loss" 1 #t "" ((1990 "1"))))
+    (cons 'N449 #(parent "Sched K-1" "Rental RE income or loss" 1 #t "" ((1990 "2"))))
+    (cons 'N450 #(parent "Sched K-1" "Other rental income or loss" 1 #t "" ((1990 "3"))))
+    (cons 'N455 #(parent "Sched K-1" "Guaranteed partner payments" 1 #t "" ((2004 "4") (1990 "5"))))
+    (cons 'N451 #(parent "Sched K-1" "Interest income" 1 #t "" ((2004 "5") (1990 "4a"))))
+    (cons 'N452 #(parent "Sched K-1" "Dividends" 1 #t "" ((2004 "6a") (2003 "4b(2)") (1990 "4b"))))
+    (cons 'N527 #(parent "Sched K-1" "Royalties" 1 #t "" ((2004 "7") (1990 "4c"))))
+    (cons 'N453 #(parent "Sched K-1" "Net ST capital gain or loss" 1 #t "" ((2004 "8") (2003 "4d2") (1990 "4d"))))
+    (cons 'N454 #(parent "Sched K-1" "Net LT capital gain or loss" 1 #t "" ((2004 "9a") (2003 "4e2") (2001 "4e1") (1997 "4e2") (1990 "4e"))))
+    (cons 'N674 #(none "Sched K-1" "28% rate gain(loss)" 1 #t "" ((2004 "9b") (2003 "25") (2001 "4e2") (1997 "4e1"))))
+    (cons 'N675 #(none "Sched K-1" "Qualified 5-year gain" 1 #t "" ((2003 "NA - Expired") (2001 "4e3")) 2002))
+    (cons 'N456 #(parent "Sched K-1" "Net Section 1231 gain or loss" 1 #t "" ((2004 "10") (2003 "6b") (1998 "6") (1997 "6b") (1990 "6"))))
+    (cons 'N676 #(none "Sched K-1" "Other Income (loss)" 1 #t "" ((2004 "11") (1990 "7"))))
+    (cons 'N528 #(parent "Sched K-1" "Tax-exempt interest income" 1 #t "" ((2004 "18") (1992 "19"))))
 
-   (cons 'N452 #(none "Sched K-1" "Dividends" 1 #t ""))
-   (cons 'N455 #(none "Sched K-1" "Guaranteed partner payments" 1 #t ""))
-   (cons 'N451 #(none "Sched K-1" "Interest income" 1 #t ""))
-   (cons 'N454 #(not-impl "Sched K-1" "Net LT capital gain or loss" 1 #t ""))
-   (cons 'N453 #(not-impl "Sched K-1" "Net ST capital gain or loss" 1 #t ""))
-   (cons 'N456 #(not-impl "Sched K-1" "Net Section 1231 gain or loss" 1 #t ""))
-   (cons 'N448 #(not-impl "Sched K-1" "Ordinary income or loss" 1 #t ""))
-   (cons 'N450 #(not-impl "Sched K-1" "Other rental income or loss" 1 #t ""))
-   (cons 'N449 #(not-impl "Sched K-1" "Rental RE income or loss" 1 #t ""))
-   (cons 'N527 #(none "Sched K-1" "Royalties" 1 #t ""))
-   (cons 'N528 #(none "Sched K-1" "Tax-exempt interest income" 1 #t ""))
+    (cons 'N458 #(not-impl "W-2" "W-2" 1 #t ""))
+    (cons 'N459 #(not-impl "W-2" "Spouse" 0 #t "" ((1990 "")) 1995))
+    (cons 'N466 #(not-impl "W-2" "Payer" 2 #t "" ((1993 "c") (1990 "2"))))
+    (cons 'N513 #(not-impl "W-2" "Payer, spouse" 2 #t "" ((1993 "c") (1990 "2"))))
+    (cons 'N460 #(parent "W-2" "Salary or wages, self" 1 #t "Salary" ((1993 "1") (1990 "10"))))
+    (cons 'N506 #(parent "W-2" "Salary or wages, spouse" 1 #t "Salary" ((1993 "1") (1990 "10"))))
+    (cons 'N465 #(parent "W-2" "Dependent care benefits, self" 1 #t "" ((1993 "10") (1991 "22") (1990 "15"))))
+    (cons 'N512 #(parent "W-2" "Dependent care benefits, spouse" 1 #t "" ((1993 "10") (1991 "22") (1990 "15"))))
+    (cons 'N267 #(parent "W-2" "Reimbursed moving expenses, self" 1 #t "" ((1993 "12") (1991 "23"))))
+    (cons 'N546 #(parent "W-2" "Reimbursed moving expenses,spouse" 1 #t "" ((1993 "12") (1991 "23"))))
 
-   (cons 'N465 #(parent "W-2" "Dependent care benefits, self" 1 #t ""))
-   (cons 'N512 #(parent "W-2" "Dependent care benefits, spouse" 1 #t ""))
-   (cons 'N267 #(parent "W-2" "Reimbursed moving expenses, self" 1 #t ""))
-   (cons 'N546 #(parent "W-2" "Reimbursed moving expenses,spouse" 1 #t ""))
-   (cons 'N460 #(parent "W-2" "Salary or wages, self" 1 #t "Salary"))
-   (cons 'N506 #(parent "W-2" "Salary or wages, spouse" 1 #t "Salary"))
+    (cons 'N547 #(not-impl "W-2G" "W-2G" 1 #t ""))
+    (cons 'N548 #(not-impl "W-2G" "Spouse" 0 #t "" ((1996 "")) 1996))
+    (cons 'N552 #(not-impl "W-2G" "Payer" 2 #t "" ((1996 "")) 1996))
+    (cons 'N549 #(parent "W-2G" "Gross winnings" 1 #t "" ((1990 "1"))))
 
-   (cons 'N549 #(parent "W-2G" "Gross winnings" 1 #t ""))))
+    (cons 'N467 #(not-impl "W2-P" "W-2P" 1 #t ""))
+    (cons 'N468 #(not-impl "W2-P" "Spouse" 0 #t "" ((1990 "")) 1990))
+    (cons 'N469 #(none "W2-P" "Pensions and annuities-gross" 3 #t "" ((1990 "9")) 1990))
+    (cons 'N470 #(none "W2-P" "Pensions and annuities-txble" 3 #t "" ((1990 "10")) 1990))
+    (cons 'N471 #(none "W2-P" "IRA distributions - gross" 3 #t "" ((1990 "9")) 1990))
+    (cons 'N472 #(none "W2-P" "IRA distributions - taxable" 3 #t "" ((1990 "10")) 1990))
 
+    (cons 'N643 #(not-impl "F1099-DIV" "1099 Div" 1 #f ""))
+    (cons 'N647 #(current "F1099-DIV" "NonTaxable distributions" 3 #t "" ((1998 "3") (1990 "1d"))))
+    (cons 'N651 #(current "F1099-DIV" "Cash liquidation" 3 #t "" ((1998 "8") (1990 "5"))))
+    (cons 'N652 #(current "F1099-DIV" "Non-cash liquidation" 3 #t "" ((1998 "9") (1990 "6"))))
+
+    (cons 'N634 #(not-impl "F1099-G" "1099-G" 1 #t ""))
+    (cons 'N635 #(not-impl "F1099-G" "Spouse" 0 #t "" ((1990 ""))))
+    (cons 'N479 #(none "F1099-G" "Unemployment compensation" 1 #t "Unemployment In" ((1990 "1"))))
+    (cons 'N260 #(none "F1099-G" "State and local refunds" 1 #t "" ((1990 "2"))))
+
+    (cons 'N553 #(not-impl "F1099-MISC" "1099-MISC" 1 #t ""))
+    (cons 'N554 #(not-impl "F1099-MISC" "Spouse" 0 #t "" ((1990 "")) 1996))
+    (cons 'N564 #(not-impl "F1099-MISC" "Payer" 2 #t "" ((1990 "")) 1996))
+    (cons 'N555 #(parent "F1099-MISC" "Rents" 1 #t "" ((1990 "1"))))
+    (cons 'N556 #(parent "F1099-MISC" "Royalties" 1 #t "" ((1990 "2"))))
+    (cons 'N557 #(parent "F1099-MISC" "Other income" 1 #t "" ((1990 "3"))))
+    (cons 'N559 #(parent "F1099-MISC" "Fishing boat proceeds" 1 #t "" ((1990 "5"))))
+    (cons 'N560 #(parent "F1099-MISC" "Medical/health payments" 1 #t "" ((1990 "6"))))
+    (cons 'N561 #(parent "F1099-MISC" "Nonemployee compensation" 1 #t "" ((1990 "7"))))
+    (cons 'N562 #(parent "F1099-MISC" "Crop insurance proceeds" 1 #t "" ((1990 "10"))))
+
+    (cons 'N657 #(not-impl "F1099-OID" "1099 OID" 1 #f ""))
+    (cons 'N658 #(current "F1099-OID" "Other periodic int,OID" 3 #t "" ((1990 "2"))))
+    (cons 'N661 #(not-impl "F1099-OID" "Description" 2 #t "" ((1990 "5"))))
+    (cons 'N662 #(current "F1099-OID" "OID, US treas obligl" 3 #t "" ((1999 "6"))))
+
+    (cons 'N473 #(not-impl "F1099-R" "1099R" 1 #t ""))
+    (cons 'N474 #(not-impl "F1099-R" "Spouse" 0 #t "" ((1990 ""))))
+    (cons 'N603 #(not-impl "F1099-R" "Pension Payer" 2 #t "" ((1996 ""))))
+    (cons 'N475 #(parent "F1099-R" "Pension total dist - gross" 1 #t "" ((1990 "1"))))
+    (cons 'N476 #(parent "F1099-R" "Pension total dist - taxable" 1 #t "" ((1991 "2a") (1990 "2"))))
+    (cons 'N670 #(not-impl "F1099-R" "Pension Tax. not determined" 2 #t "" ((1991 "2b"))))
+    (cons 'N671 #(not-impl "F1099-R" "Pension Total distribution" 2 #t "" ((1991 "2b"))))
+    (cons 'N667 #(not-impl "F1099-R" "Pension Distrib code 7a" 2 #t "" ((1990 "7a"))))
+    (cons 'N668 #(not-impl "F1099-R" "Pension Distrib code 7b" 2 #t "" ((1990 "7b"))))
+    (cons 'N669 #(not-impl "F1099-R" "Pension State ID" 2 #t "" ((1990 "11"))))
+    (cons 'N655 #(not-impl "F1099-R" "Distribution code 7a" 2 #t "" ((1990 "7a"))))
+    (cons 'N656 #(not-impl "F1099-R" "Distribution code 7b" 2 #t "" ((1990 "7b"))))
+    (cons 'N664 #(not-impl "F1099-R" "State ID" 2 #t "" ((1990 "11"))))
+    (cons 'N604 #(not-impl "F1099-R" "IRA Payer" 2 #t "" ((1996 ""))))
+    (cons 'N477 #(parent "F1099-R" "IRA total dist - gross" 1 #t "" ((1990 "1"))))
+    (cons 'N478 #(parent "F1099-R" "IRA total dist - taxable" 1 #t "" ((1991 "2a") (1990 "2"))))
+    (cons 'N628 #(not-impl "F1099-R" "SIMPLE Payer" 2 #t "" ((1997 ""))))
+    (cons 'N623 #(parent "F1099-R" "SIMPLE total distrib-gross" 1 #t "" ((1990 "1"))))
+    (cons 'N624 #(parent "F1099-R" "SIMPLE total distrib-taxable" 1 #t "" ((1991 "2a") (1990 "2"))))
+    (cons 'N665 #(not-impl "F1099-R" "Taxable not determined" 2 #t "" ((1991 "2b"))))
+    (cons 'N666 #(not-impl "F1099-R" "Total distribution" 2 #t "" ((1991 "2b"))))
+
+    (cons 'N629 #(not-impl "F1099-SA" "1099-SA" 1 #t ""))
+    (cons 'N630 #(not-impl "F1099-SA" "Spouse" 0 #t "" ((1997 ""))))
+    (cons 'N633 #(not-impl "F1099-SA" "Payer" 2 #t "" ((1997 ""))))
+    (cons 'N631 #(none "F1099-SA" "MSA gross distribution" 1 #t "" ((1997 "1"))))
+    (cons 'N632 #(none "F1099-SA" "MSA earnings on excess contrib" 1 #t "" ((1997 "2"))))
+
+    (cons 'N678 #(not-impl "F1099-Q" "1099 Q" 1 #f ""))
+    (cons 'N672 #(none "F1099-Q" "Gross distribution" 1 #t "" ((2002 "1"))))
+   )
+  )
+  (cons 'F1065
+   (list
+    (cons 'N000 #(none "" "Tax Report Only - No TXF Export" 0 #f ""))
+
+    (cons 'N1617 #(none "F1065" "Gross receipts or sales" 1 #f "" ((1990 "1a"))))
+    (cons 'N1619 #(none "F1065" "Returns and allowances" 1 #f "" ((1990 "1b"))))
+    (cons 'N1629 #(none "F1065" "Other income" 1 #f "" ((1990 "7"))))
+
+    (cons 'N1804 #(none "F1065" "Income-rental" 1 #f "" ((1990 "K3a"))))
+    (cons 'N1809 #(none "F1065" "Interest income-Bank, CDs, etc." 1 #f "" ((2004 "K5") (1990 "K4a"))))
+    (cons 'N1810 #(none "F1065" "Interest income-US Treasury obligations" 1 #f "" ((2004 "K5") (1990 "K4a"))))
+    (cons 'N1811 #(none "F1065" "Dividend income" 1 #f "" ((2004 "K6a") (1990 "K4b"))))
+    (cons 'N1813 #(none "F1065" "Royalty income" 1 #f "" ((2004 "K7") (1990 "K4c"))))
+    (cons 'N1825 #(none "F1065" "Other income" 1 #f "" ((2004 "K11") (1990 "K7"))))
+
+    (cons 'N1900 #(none "F1065" "Net income(loss) per books" 1 #f "" ((1991 "M-1,1"))))
+    (cons 'N1908 #(none "F1065" "Income on books not on return" 1 #f "" ((1992 "M-1,6") (1991 "M-1,5"))))
+
+    (cons 'N1914 #(none "F1065" "Other increases to partners' cap accts" 1 #f "" ((1991 "M-2,4") (1990 "M(d)"))))
+
+    (cons 'N343 #(not-impl "Sched F" "Schedule F" 1 #t ""))
+    (cons 'N514 #(not-impl "Sched F" "Spouse" 0 #t "" ((1990 ""))))
+    (cons 'N379 #(not-impl "Sched F" "Principal product" 2 #t "" ((1990 "A"))))
+    (cons 'N369 #(none "Sched F" "Resales of livestock" 1 #t "" ((1990 "1"))))
+    (cons 'N368 #(none "Sched F" "Sales livestock/crops raised" 1 #t "" ((1990 "4"))))
+    (cons 'N371 #(none "Sched F" "Coop. distributions" 1 #t "" ((1990 "5a"))))
+    (cons 'N372 #(none "Sched F" "Agricultural program payments" 1 #t "" ((1990 "6a"))))
+    (cons 'N373 #(none "Sched F" "CCC loans reported/election" 1 #t "" ((1990 "7a"))))
+    (cons 'N374 #(none "Sched F" "CCC loans forfeited or repaid" 1 #t "" ((1990 "7b"))))
+    (cons 'N375 #(none "Sched F" "Crop insurance proceeds received" 1 #t "" ((1990 "8a"))))
+    (cons 'N376 #(none "Sched F" "Crop insurance proceeds deferred" 1 #t "" ((1990 "8d"))))
+    (cons 'N370 #(none "Sched F" "Custom hire (machine work)" 1 #t "" ((1990 "9"))))
+    (cons 'N377 #(none "Sched F" "Other farm income" 1 #t "" ((1990 "10"))))
+
+    (cons 'N418 #(not-impl "F4797" "Form 4797" 1 #f ""))
+    (cons 'N420 #(not-impl "F4797" "LT dep. gain - business" 5 #f "" ((1990 "2"))))
+    (cons 'N423 #(not-impl "F4797" "LT dep. gain - res. rent." 5 #f "" ((1990 "2"))))
+    (cons 'N421 #(not-impl "F4797" "ST dep. prop. - business" 5 #f "" ((1997 "10") (1992 "11") (1990 "10"))))
+    (cons 'N424 #(not-impl "F4797" "ST dep. prop. - res. rent." 5 #f "" ((1997 "10") (1992 "11") (1990 "10"))))
+
+    (cons 'N1744 #(parent "F8825" "Gross rents – A" 1 #t "" ((1990 "2A"))))
+    (cons 'N1759 #(parent "F8825" "Gross rents – B" 1 #t "" ((1990 "2B"))))
+    (cons 'N1774 #(parent "F8825" "Gross rents – C" 1 #t "" ((1990 "2C"))))
+    (cons 'N1789 #(parent "F8825" "Gross rents – D" 1 #t "" ((1990 "2D"))))
+    (cons 'N1742 #(none "F8825" "Income-other rental real estate" 1 #t "" ((1990 "20a"))))
+
+    (cons 'N446 #(not-impl "Sched K-1" "Schedule K-1 Worksheet" 1 #t ""))
+    (cons 'N447 #(not-impl "Sched K-1" "Spouse" 0 #t "" ((1990 ""))))
+    (cons 'N457 #(not-impl "Sched K-1" "Partnership or S corp name" 2 #t "" ((2004 "B") (1990 ""))))
+    (cons 'N448 #(parent "Sched K-1" "Ordinary income or loss" 1 #t "" ((1990 "1"))))
+    (cons 'N449 #(parent "Sched K-1" "Rental RE income or loss" 1 #t "" ((1990 "2"))))
+    (cons 'N450 #(parent "Sched K-1" "Other rental income or loss" 1 #t "" ((1990 "3"))))
+    (cons 'N455 #(parent "Sched K-1" "Guaranteed partner payments" 1 #t "" ((2004 "4") (1990 "5"))))
+    (cons 'N451 #(parent "Sched K-1" "Interest income" 1 #t "" ((2004 "5") (1990 "4a"))))
+    (cons 'N452 #(parent "Sched K-1" "Dividends" 1 #t "" ((2004 "6a") (2003 "4b(2)") (1990 "4b"))))
+    (cons 'N527 #(parent "Sched K-1" "Royalties" 1 #t "" ((2004 "7") (1990 "4c"))))
+    (cons 'N453 #(parent "Sched K-1" "Net ST capital gain or loss" 1 #t "" ((2004 "8") (2003 "4d2") (1990 "4d"))))
+    (cons 'N454 #(parent "Sched K-1" "Net LT capital gain or loss" 1 #t "" ((2004 "9a") (2003 "4e2") (2001 "4e1") (1997 "4e2") (1990 "4e"))))
+    (cons 'N674 #(none "Sched K-1" "28% rate gain(loss)" 1 #t "" ((2004 "9b") (2003 "25") (2001 "4e2") (1997 "4e1"))))
+    (cons 'N675 #(none "Sched K-1" "Qualified 5-year gain" 1 #t "" ((2003 "NA - Expired") (2001 "4e3")) 2002))
+    (cons 'N456 #(parent "Sched K-1" "Net Section 1231 gain or loss" 1 #t "" ((2004 "10") (2003 "6b") (1998 "6") (1997 "6b") (1990 "6"))))
+    (cons 'N676 #(none "Sched K-1" "Other Income (loss)" 1 #t "" ((2004 "11") (1990 "7"))))
+    (cons 'N528 #(parent "Sched K-1" "Tax-exempt interest income" 1 #t "" ((2004 "18") (1992 "19"))))
+   )
+  )
+  (cons 'F1120
+   (list
+    (cons 'N000 #(none "" "Tax Report Only - No TXF Export" 0 #f ""))
+
+    (cons 'N1003 #(none "F1120" "Gross receipts or sales" 1 #f "" ((1990 "1a"))))
+    (cons 'N1005 #(none "F1120" "Returns and allowances" 1 #f "" ((1990 "1b"))))
+    (cons 'N1007 #(none "F1120" "Interest income" 1 #f "" ((1990 "5"))))
+    (cons 'N1009 #(none "F1120" "Gross rents" 1 #f "" ((1990 "6"))))
+    (cons 'N1011 #(none "F1120" "Gross royalties" 1 #f "" ((1990 "7"))))
+
+    (cons 'N1021 #(none "F1120" "Div.--< 20% owned corps." 1 #f "" ((1990 "C1"))))
+    (cons 'N1023 #(none "F1120" "Div.--20% or > corps." 1 #f "" ((1990 "C2"))))
+    (cons 'N1025 #(none "F1120" "Div.--debt-financed stk." 1 #f "" ((1990 "C3"))))
+    (cons 'N1027 #(none "F1120" "Div.--< 20% pref. stk." 1 #f "" ((1990 "C4"))))
+    (cons 'N1029 #(none "F1120" "Div.--20% or > pref. stk." 1 #f "" ((1990 "C5"))))
+    (cons 'N1031 #(none "F1120" "Div.--< 20% foreign. corps." 1 #f "" ((1990 "C6"))))
+    (cons 'N1033 #(none "F1120" "Div.--20% or > foreign corps." 1 #f "" ((1990 "C7"))))
+    (cons 'N1035 #(none "F1120" "Div.-wholly owned foreign" 1 #f "" ((1990 "C8"))))
+    (cons 'N1037 #(none "F1120" "Div.-domestic corps." 1 #f "" ((1990 "C10"))))
+    (cons 'N1039 #(none "F1120" "Div.-from certain FSC's" 1 #f "" ((1990 "C12"))))
+    (cons 'N1041 #(none "F1120" "Div.-affiliated group members" 1 #f "" ((1990 "C11"))))
+    (cons 'N1043 #(none "F1120" "Oth. div.-foreign. corps." 1 #f "" ((1990 "C13"))))
+    (cons 'N1045 #(none "F1120" "Inc.-controlled foreign corps." 1 #f "" ((1990 "C14"))))
+    (cons 'N1047 #(none "F1120" "Foreign dividend gross up" 1 #f "" ((1990 "C15"))))
+    (cons 'N1049 #(none "F1120" "IC-DISC and former DISC div." 1 #f "" ((1990 "C16"))))
+    (cons 'N1051 #(none "F1120" "Other dividends" 1 #f "" ((1990 "C17"))))
+
+    (cons 'N1233 #(none "F1120" "Net income(loss) per books" 1 #f "" ((1990 "M-1,1"))))
+    (cons 'N1236 #(none "F1120" "Tax-exempt interest income" 1 #f "" ((1992 "M-1,7") (1990 "M-1,7a"))))
+    (cons 'N1237 #(none "F1120" "Income on books not on return" 1 #f "" ((1990 "M-1,7"))))
+
+    (cons 'N1239 #(none "F1120" "Other increases" 1 #f "" ((1990 "M-2,3"))))
+
+    (cons 'N418 #(not-impl "F4797" "Form 4797" 1 #f ""))
+    (cons 'N420 #(not-impl "F4797" "LT dep. gain - business" 5 #f "" ((1990 "2"))))
+    (cons 'N423 #(not-impl "F4797" "LT dep. gain - res. rent." 5 #f "" ((1990 "2"))))
+    (cons 'N421 #(not-impl "F4797" "ST dep. prop. - business" 5 #f "" ((1997 "10") (1992 "11") (1990 "10"))))
+    (cons 'N424 #(not-impl "F4797" "ST dep. prop. - res. rent." 5 #f "" ((1997 "10") (1992 "11") (1990 "10"))))
+   )
+  )
+  (cons 'F1120S
+   (list
+    (cons 'N000 #(none "" "Tax Report Only - No TXF Export" 0 #f ""))
+
+    (cons 'N1259 #(none "F1120S" "Gross receipts or sales" 1 #f "" ((1990 "1a"))))
+    (cons 'N1261 #(none "F1120S" "Returns and allowances" 1 #f "" ((1990 "1b"))))
+    (cons 'N1269 #(none "F1120S" "Other income" 1 #f "" ((1990 "5"))))
+
+    (cons 'N1492 #(none "F1120S" "Income-rental" 1 #f "" ((1990 "K3a"))))
+    (cons 'N1497 #(none "F1120S" "Interest income-CD's/etc." 1 #f "" ((2004 "K4") (1990 "K4a"))))
+    (cons 'N1498 #(none "F1120S" "Interest income-U.S. Treas" 1 #f "" ((2004 "K4") (1990 "K4a"))))
+    (cons 'N1499 #(none "F1120S" "Dividend income" 1 #f "" ((2004 "K5a") (1990 "K4b"))))
+    (cons 'N1501 #(none "F1120S" "Royalty income" 1 #f "" ((2004"K6") (1990 "K4c"))))
+    (cons 'N1507 #(none "F1120S" "Other income" 1 #f "" ((2004 "K10") (1990 "K'6"))))
+    (cons 'N1527 #(none "F1120S" "Tax-exempt interest income" 1 #f "" ((2004 "K16a") (1992 "K17") (1990 "K18"))))
+    (cons 'N1528 #(none "F1120S" "Other tax-exempt income" 1 #f "" ((2004 "K16b") (1992 "K18") (1990 "K18"))))
+
+    (cons 'N1595 #(none "F1120S" "Net income(loss) per books" 1 #f "" ((1990 "M-1,1"))))
+    (cons 'N1601 #(none "F1120S" "Income on books not on return" 1 #f "" ((1990 "M-1,5"))))
+
+    (cons 'N418 #(not-impl "F4797" "Form 4797" 1 #f ""))
+    (cons 'N420 #(not-impl "F4797" "LT dep. gain - business" 5 #f "" ((1990 "2"))))
+    (cons 'N423 #(not-impl "F4797" "LT dep. gain - res. rent." 5 #f "" ((1990 "2"))))
+    (cons 'N421 #(not-impl "F4797" "ST dep. prop. - business" 5 #f "" ((1997 "10") (1992 "11") (1990 "10"))))
+    (cons 'N424 #(not-impl "F4797" "ST dep. prop. - res. rent." 5 #f "" ((1997 "10") (1992 "11") (1990 "10"))))
+
+    (cons 'N1382 #(parent "F8825" "Gross rents - A" 1 #t "" ((1990 "2A"))))
+    (cons 'N1410 #(parent "F8825" "Gross rents - B" 1 #t "" ((1990 "2B"))))
+    (cons 'N1437 #(parent "F8825" "Gross rents - C" 1 #t "" ((1990 "2C"))))
+    (cons 'N1464 #(parent "F8825" "Gross rents - D" 1 #t "" ((1990 "2D"))))
+    (cons 'N1378 #(none "F8825" "Income-other rental real estate" 1 #t "" ((1990 "20a"))))
+
+    (cons 'N446 #(not-impl "Sched K-1" "Schedule K-1 Worksheet" 1 #t ""))
+    (cons 'N447 #(not-impl "Sched K-1" "Spouse" 0 #t "" ((1990 ""))))
+    (cons 'N457 #(not-impl "Sched K-1" "Partnership or S corp name" 2 #t "" ((2004 "B") (1990 ""))))
+    (cons 'N448 #(parent "Sched K-1" "Ordinary income or loss" 1 #t "" ((1990 "1"))))
+    (cons 'N449 #(parent "Sched K-1" "Rental RE income or loss" 1 #t "" ((1990 "2"))))
+    (cons 'N450 #(parent "Sched K-1" "Other rental income or loss" 1 #t "" ((1990 "3"))))
+    (cons 'N455 #(parent "Sched K-1" "Guaranteed partner payments" 1 #t "" ((2004 "4") (1990 "5"))))
+    (cons 'N451 #(parent "Sched K-1" "Interest income" 1 #t "" ((2004 "5") (1990 "4a"))))
+    (cons 'N452 #(parent "Sched K-1" "Dividends" 1 #t "" ((2004 "6a") (2003 "4b(2)") (1990 "4b"))))
+    (cons 'N527 #(parent "Sched K-1" "Royalties" 1 #t "" ((2004 "7") (1990 "4c"))))
+    (cons 'N453 #(parent "Sched K-1" "Net ST capital gain or loss" 1 #t "" ((2004 "8") (2003 "4d2") (1990 "4d"))))
+    (cons 'N454 #(parent "Sched K-1" "Net LT capital gain or loss" 1 #t "" ((2004 "9a") (2003 "4e2") (2001 "4e1") (1997 "4e2") (1990 "4e"))))
+    (cons 'N674 #(none "Sched K-1" "28% rate gain(loss)" 1 #t "" ((2004 "9b") (2003 "25") (2001 "4e2") (1997 "4e1"))))
+    (cons 'N675 #(none "Sched K-1" "Qualified 5-year gain" 1 #t "" ((2003 "NA - Expired") (2001 "4e3")) 2002))
+    (cons 'N456 #(parent "Sched K-1" "Net Section 1231 gain or loss" 1 #t "" ((2004 "10") (2003 "6b") (1998 "6") (1997 "6b") (1990 "6"))))
+    (cons 'N676 #(none "Sched K-1" "Other Income (loss)" 1 #t "" ((2004 "11") (1990 "7"))))
+    (cons 'N528 #(parent "Sched K-1" "Tax-exempt interest income" 1 #t "" ((2004 "18") (1992 "19"))))
+   )
+  )
+ )
+)
+
 (define txf-expense-categories
-  (list
-   (cons 'N000 #(none "" "Tax Report Only - No TXF Export" 0 #f ""))
-   (cons 'N264 #(none "F1040" "Alimony paid" 1 #f "Alimony paid"))
-   (cons 'N265 #(current "F1040" "Early withdrawal penalty" 3 #f "Early withdrawa"))
-   (cons 'N521 #(none "F1040" "Federal estimated tax, qrtrly" 1 #f"Tax:Fed Estimat"))
-   (cons 'N613 #(none "F1040" "Fed tax withheld, RR retire, self" 1 #f "Tax:Fed wh, RR"))
-   (cons 'N614 #(none "F1040" "Fed tax withheld, RR retire, spouse" 1 #f "Tax Spouse:Fed"))
-   (cons 'N611 #(none "F1040" "Fed tax withheld, Soc. Sec., self" 1 #f "Tax:Fed wh, Soc"))
-   (cons 'N612 #(none "F1040" "Fed tax withheld, Soc. Sec., spouse" 1 #f "Tax Spouse:Fed"))
-   (cons 'N482 #(none "F1040" "IRA contribution, non-work spouse" 1 #f ""))
-   (cons 'N262 #(none "F1040" "IRA contribution, self" 1 #f "IRA Contrib"))
-   (cons 'N481 #(none "F1040" "IRA contribution, spouse" 1 #f ""))
-   (cons 'N263 #(none "F1040" "Keogh deduction, self" 1 #f "Keogh deduction"))
-   (cons 'N516 #(none "F1040" "Keogh deduction, spouse" 1 #f "Keogh deduction"))
-   (cons 'N607 #(none "F1040" "Med savings contribution, self" 1 #f "Med savings con"))
-   (cons 'N608 #(none "F1040" "Med savings contribution, spouse" 1 #f "Med savings con"))
-   (cons 'N517 #(none "F1040" "SEP deduction, self" 1 #f "SEP deduction,"))
-   (cons 'N518 #(none "F1040" "SEP deduction, spouse" 1 #f "SEP deduction,"))
-   (cons 'N609 #(none "F1040" "SIMPLE contribution, self" 1 #f "SIMPLE contribu"))
-   (cons 'N610 #(none "F1040" "SIMPLE contribution, spouse" 1 #f "SIMPLE contribu"))
-   (cons 'N636 #(none "F1040" "Student loan interest" 1 #f "Student loan in"))
+ (list
+  (cons 'F1040
+   (list
+    (cons 'N000 #(none "" "Tax Report Only - No TXF Export" 0 #f ""))
 
-   (cons 'N606 #(none "F1099-G" "Fed tax withheld, unemployment comp" 1 #t ""))
-   (cons 'N605 #(none "F1099-G" "Unemployment comp repaid" 1 #t ""))
+    (cons 'N256 #(not-impl "F1040" "Form 1040" 1 #f ""))
+    (cons 'N680 #(none "F1040" "Educator expenses,self" 1 #f "" ((2007 "23") (2006 "NA - Expired") (2002 "23"))))
+    (cons 'N681 #(none "F1040" "Educator expenses,spouse" 1 #f "" ((2007 "23") (2006 "NA - Expired") (2002 "23"))))
+    (cons 'N482 #(none "F1040" "IRA contribution, non-work spouse" 1 #f "" ((1997 "23") (1994 "23b") (1990 "24b") (1989 "25") (1987 "25b") (1985 "26") (1983 "26a") (1982 "25") (1981 "24") (1980 "25")) 2000))
+    (cons 'N607 #(none "F1040" "Med savings contribution, self" 1 #f "Med savings con" ((2005 "25") (2004 "35") (2003 "33") (2002 "27") (1998 "25") (1997 "24"))))
+    (cons 'N608 #(none "F1040" "Med savings contribution, spouse" 1 #f "Med savings con" ((2005 "25") (2004 "35") (2003 "33") (2002 "27") (1998 "25") (1997 "24"))))
+    (cons 'N263 #(none "F1040" "Keogh deduction, self" 1 #f "Keogh deduction" ((2005 "28") (2004 "32") (2003 "30") (2002 "31") (1998 "29") (1997 "28") (1988 "27") (1987 "26") (1984 "27") (1982 "26") (1981 "25") (1980 "26"))))
+    (cons 'N516 #(none "F1040" "Keogh deduction, spouse" 1 #f "Keogh deduction" ((2005 "28") (2004 "32") (2003 "30") (2002 "31") (1998 "29") (1997 "28") (1988 "27") (1987 "26") (1984 "27") (1982 "26") (1981 "25") (1980 "26"))))
+    (cons 'N517 #(none "F1040" "SEP deduction, self" 1 #f "SEP deduction," ((2005 "28") (2004 "32") (2003 "30") (2002 "31") (1998 "29") (1997 "28") (1988 "27") (1987 "26") (1984 "27") (1982 "26") (1981 "25") (1980 "26"))))
+    (cons 'N518 #(none "F1040" "SEP deduction, spouse" 1 #f "SEP deduction," ((2005 "28") (2004 "32") (2003 "30") (2002 "31") (1998 "29") (1997 "28") (1988 "27") (1987 "26") (1984 "27") (1982 "26") (1981 "25") (1980 "26"))))
+    (cons 'N609 #(none "F1040" "SIMPLE contribution, self" 1 #f "SIMPLE contribu" ((2005 "28") (2004 "32") (2003 "30") (2002 "31") (1998 "29") (1997 "28") (1988 "27") (1987 "26") (1984 "27") (1982 "26") (1981 "25") (1980 "26"))))
+    (cons 'N610 #(none "F1040" "SIMPLE contribution, spouse" 1 #f "SIMPLE contribu" ((2005 "28") (2004 "32") (2003 "30") (2002 "31") (1998 "29") (1997 "28") (1988 "27") (1987 "26") (1984 "27") (1982 "26") (1981 "25") (1980 "26"))))
+    (cons 'N265 #(current "F1040" "Early withdrawal penalty" 1 #f "Early withdrawa" ((2005 "30") (2004 "33") (2003 "31") (2002 "32") (1998 "30") (1997 "29") (1988 "28") (1987 "27") (1984 "28") (1982 "27") (1981 "26")(1980 "27"))))
+    (cons 'N264 #(none "F1040" "Alimony paid" 1 #f "Alimony paid" ((2005 "31a") (2004 "34a") (2003 "32a") (2002 "33a") (1998 "31a") (1997 "30a") (1988 "29") (1987 "28") (1984 "29") (1982 "28") (1981 "27") (1980 "28"))))
+    (cons 'N262 #(none "F1040" "IRA contribution, self" 1 #f "IRA Contrib" ((2005 "32") (2004 "25") (2002 "24") (1997 "23") (1994 "23a") (1990 "24a") (1989 "24") (1987 "25a") (1985 "26") (1983 "26a") (1982 "25") (1981 "24") (1980 "25"))))
+    (cons 'N481 #(none "F1040" "IRA contribution, spouse" 1 #f "" ((2005 "32") (2004 "25") (2002 "24") (1997 "23") (1994 "23b") (1990 "24b") (1989 "25") (1987 "25b") (1983 "26a") (1982 "25") (1981 "24") (1980 "25"))))
+    (cons 'N636 #(none "F1040" "Student loan interest" 1 #f "Student loan in" ((2005 "33") (2004 "26") (2002 "25") (1998 "24"))))
+    (cons 'N613 #(none "F1040" "Fed tax withheld, RR retire, self" 1 #f "Tax:Fed wh, RR" ((2008 "62") (2005 "64") (2004 "63") (2003 "61") (2002 "62") (2001 "59") (2000 "58") (1998 "57") (1997 "54") (1996 "52") (1995 "55") (1991 "54") (1990 "55") (1989 "56") (1987 "54") (1986 "56") (1983 "57") (1982 "60") (1980 "55"))))
+    (cons 'N614 #(none "F1040" "Fed tax withheld, RR retire, spouse" 1 #f "Tax Spouse:Fed" ((2008 "62") (2005 "64") (2004 "63") (2003 "61") (2002 "62") (2001 "59") (2000 "58") (1998 "57") (1997 "54") (1996 "52") (1995 "55") (1991 "54") (1990 "55") (1989 "56") (1987 "54") (1986 "56") (1983 "57") (1982 "60") (1980 "55"))))
+    (cons 'N611 #(none "F1040" "Fed tax withheld, Soc. Sec., self" 1 #f "Tax:Fed wh, Soc" ((2008 "62") (2005 "64") (2004 "63") (2003 "61") (2002 "62") (2001 "59") (2000 "58") (1998 "57") (1997 "54") (1996 "52") (1995 "55") (1991 "54") (1990 "55") (1989 "56") (1987 "54") (1986 "56") (1983 "57") (1982 "60") (1980 "55"))))
+    (cons 'N612 #(none "F1040" "Fed tax withheld, Soc. Sec., spouse" 1 #f "Tax Spouse:Fed" ((2008 "62") (2005 "64") (2004 "63") (2003 "61") (2002 "62") (2001 "59") (2000 "58") (1998 "57") (1997 "54") (1996 "52") (1995 "55") (1991 "54") (1990 "55") (1989 "56") (1987 "54") (1986 "56") (1983 "57") (1982 "60") (1980 "55"))))
+    (cons 'N615 #(current "F1040" "Fed tax withheld, dividend income" 3 #f "" ((2008 "62") (2005 "64") (2004 "63") (2003 "61") (2002 "62") (2001 "59") (2000 "58") (1998 "57") (1997 "54") (1996 "52") (1995 "55") (1991 "54") (1990 "55") (1989 "56") (1987 "54") (1986 "56") (1983 "57") (1982 "60") (1980 "55"))))
+    (cons 'N616 #(current "F1040" "Fed tax withheld, interest income" 3 #f "" ((2008 "62") (2005 "64") (2004 "63") (2003 "61") (2002 "62") (2001 "59") (2000 "58") (1998 "57") (1997 "54") (1996 "52") (1995 "55") (1991 "54") (1990 "55") (1989 "56") (1987 "54") (1986 "56") (1983 "57") (1982 "60") (1980 "55"))))
+    (cons 'N521 #(none "F1040" "Federal estimated tax, qrtrly" 6 #f "Tax:Fed Estimat" ((2008 "63") (2005 "65") (2004 "64") (2003 "62") (2002 "63") (2001 "60") (2000 "59") (1998 "58") (1997 "55") (1996 "53") (1995 "56") (1991 "55") (1990 "56") (1989 "57") (1987 "55") (1986 "57") (1983 "58") (1982 "61") (1980 "56"))))
+    (cons 'N268 #(none "F1040" "Fed. estimated tax" 1 #f "" ((2008 "63") (2005 "65") (2004 "64") (2003 "62") (2002 "63") (2001 "60") (2000 "59") (1998 "58") (1997 "55") (1996 "53") (1995 "56") (1991 "55") (1990 "56") (1989 "57") (1987 "55") (1986 "57") (1983 "58") (1982 "61") (1980 "56"))))
 
-   (cons 'N558 #(parent "F1099-MISC" "Federal tax withheld" 1 #t ""))
-   (cons 'N563 #(parent "F1099-MISC" "State tax withheld" 1 #t ""))
+    (cons 'N270 #(not-impl "Sched A" "Schedule A" 1 #f ""))
+    (cons 'N273 #(none "Sched A" "Medicine and drugs" 1 #f "Medical:Medicin" ((1990 "1") (1987 "1a") (1982 "1") (1980 "2"))))
+    (cons 'N274 #(none "Sched A" "Medical travel and lodging" 1 #f "" ((1990 "1") (1987 "1b") (1984 "2b") (1983 "4b") (1982 "5b") (1980 "6c"))))
+    (cons 'N484 #(none "Sched A" "Doctors, dentists, hospitals" 1 #f "Medical:Doctor" ((1990 "1") (1987 "1a") (1984 "2a") (1983 "4a") (1982 "5a") (1980 "6a&b"))))
+    (cons 'N275 #(none "Sched A" "State income taxes" 1 #f "" ((1987 "5") (1984 "6") (1983 "8") (1980 "11"))))
+    (cons 'N522 #(parent "Sched A" "State estimated tax, qrtrly" 6 #f "" ((1987 "5") (1984 "6") (1983 "8") (1980 "11"))))
+    (cons 'N544 #(none "Sched A" "Local income taxes" 1 #f "" ((1987 "5") (1984 "6") (1983 "8") (1980 "11"))))
+    (cons 'N276 #(none "Sched A" "Real estate taxes" 1 #f "Tax:Property" ((1987 "6") (1984 "7") (1983 "9") (1980 "12"))))
+    (cons 'N535 #(none "Sched A" "Personal property taxes" 1 #f "" ((1987 "7") (1984 "9") (1983 "11") (1980 "14"))))
+    (cons 'N277 #(none "Sched A" "Other taxes" 3 #f "" ((1994 "8") (1987 "7") (1984 "9") (1983 "11") (1982 "14") (1980 "15"))))
+    (cons 'N283 #(none "Sched A" "Home mortgage interest (1098)" 1 #f "Mortgage Int:Ba" ((1994 "10") (1987 "9a") (1984 "11a") (1983 "13a") (1982 "16a") (1980 "17"))))
+    (cons 'N545 #(none "Sched A" "Home mortgage interest (no 1098)" 1 #f "" ((1994 "11") (1987 "9b") (1984 "11b") (1983 "13b") (1982 "16b") (1980 "17"))))
+    (cons 'N284 #(none "Sched A" "Points paid (no 1098)" 1 #f "Mortgage Points" ((1994 "12") (1987 "10") (1984 "13") (1983 "15") (1982 "18") (1980 "19"))))
+    (cons 'N278 #(none "Sched A" "Credit card interest" 1 #f "" ((1984 "12") (1983 "14") (1982 "17") (1980 "18")) 1986))
+    (cons 'N279 #(none "Sched A" "Other personal interest" 1 #f "" ((1987 "12a") (1984 "13") (1983 "15") (1982 "18") (1980 "19")) 1990))
+    (cons 'N280 #(none "Sched A" "Cash charity contributions" 1 #f "" ((2007 "16") (1994 "15") (1991 "13") (1987 "14") (1984 "15") (1983 "17") (1982 "20") (1980 "21"))))
+    (cons 'N485 #(none "Sched A" "Non-cash charity contributions" 1 #f "" ((2007 "17") (1994 "16") (1991 "14") (1987 "15") (1984 "16") (1983 "18") (1982 "21") (1980 "22"))))
+    (cons 'N271 #(none "Sched A" "Subscriptions" 1 #f "" ((2007 "21") (1994 "20") (1991 "19") (1987 "20") (1984 "22") (1983 "24") (1982 "26") (1980 "31"))))
+    (cons 'N281 #(none "Sched A" "Tax preparation fees" 1 #f "" ((2007 "22") (1994 "21") (1991 "20") (1987 "21") (1984 "21") (1983 "23") (1982 "25b") (1981 "30b") (1980 "31"))))
+    (cons 'N282 #(none "Sched A" "Investment management fees" 1 #f "Investment Inte" ((2007 "23") (1994 "22") (1991 "20") (1987 "21") (1984 "22") (1983 "24") (1982 "26") (1980 "31"))))
+    (cons 'N486 #(none "Sched A" "Misc., subject to 2% AGI limit" 1 #f "" ((2007 "23") (1994 "22") (1991 "20") (1987 "21"))))
+    (cons 'N272 #(none "Sched A" "Gambling losses" 1 #f "" ((2007 "28") (1995 "27") (1994 "28") (1991 "25") (1990 "26") (1987 "25") (1984 "22") (1983 "24") (1982 "26") (1980 "31"))))
+    (cons 'N523 #(none "Sched A" "Misc., no 2% AGI limit" 1 #f "" ((2007 "28") (1995 "27") (1994 "28") (1991 "25") (1990 "26") (1987 "25") (1984 "22") (1983 "24") (1982 "26") (1980 "31"))))
 
-   (cons 'N532 #(parent "F1099-R" "IRA federal tax withheld" 1 #t ""))
-   (cons 'N534 #(parent "F1099-R" "IRA local tax withheld" 1 #t ""))
-   (cons 'N533 #(parent "F1099-R" "IRA state tax withheld" 1 #t ""))
-   (cons 'N529 #(parent "F1099-R" "Pension federal tax withheld" 1 #t ""))
-   (cons 'N531 #(parent "F1099-R" "Pension local tax withheld" 1 #t ""))
-   (cons 'N530 #(parent "F1099-R" "Pension state tax withheld" 1 #t ""))
-   (cons 'N625 #(parent "F1099-R" "SIMPLE federal tax withheld" 1 #t ""))
-   (cons 'N627 #(parent "F1099-R" "SIMPLE local tax withheld" 1 #t ""))
-   (cons 'N626 #(parent "F1099-R" "SIMPLE state tax withheld" 1 #t ""))
+    (cons 'N291 #(not-impl "Sched C" "Schedule C" 1 #t ""))
+    (cons 'N296 #(none "Sched C" "Returns and allowances" 1 #t "" ((1989 "2") (1980 "1b"))))
+    (cons 'N304 #(none "Sched C" "Advertising" 1 #t "" ((1989 "8") (1980 "6"))))
+    (cons 'N306 #(none "Sched C" "Car and truck expenses" 1 #t "" ((2003 "9") (1989 "10") (1982 "9") (1980 "10"))))
+    (cons 'N307 #(none "Sched C" "Commissions and fees" 1 #t "" ((2003 "10") (1989 "11") (1982 "10") (1980 "11"))))
+    (cons 'N685 #(none "Sched C" "Contract labor" 1 #t "" ((2003 "11"))))
+    (cons 'N309 #(none "Sched C" "Depletion" 1 #t "" ((1989 "12") (1982 "11") (1980 "12"))))
+    (cons 'N308 #(none "Sched C" "Employee benefit programs" 1 #t "" ((1982 "14") (1982 "15"))))
+    (cons 'N310 #(none "Sched C" "Insurance, other than health" 1 #t "" ((1990 "15") (1982 "16") (1980 "17"))))
+    (cons 'N311 #(none "Sched C" "Interest expense, mortgage" 1 #t "" ((1990 "16a") (1986 "17a") (1985 "19") (1982 "17") (1980 "18"))))
+    (cons 'N312 #(none "Sched C" "Interest expense, other" 1 #t "" ((1990 "16b") (1986 "17b") (1985 "21") (1982 "17") (1980 "18"))))
+    (cons 'N298 #(none "Sched C" "Legal and professional fees" 1 #t "" ((1990 "17") (1989 "18") (1986 "19") (1985 "18") (1982 "19") (1980 "20"))))
+    (cons 'N313 #(none "Sched C" "Office expenses" 1 #t "" ((1990 "18") (1989 "19") (1982 "20") (1980 "21"))))
+    (cons 'N314 #(none "Sched C" "Pension/profit sharing plans" 1 #t "" ((1990 "19") (1989 "20") (1986 "21") (1985 "22") (1982 "21") (1980 "22"))))
+    (cons 'N299 #(none "Sched C" "Rent/lease vehicles, equip." 1 #t "" ((1990 "20a") (1989 "21a") (1986 "22") (1985 "23") (1984 "22") (1981 "23") (1980 "24"))))
+    (cons 'N300 #(none "Sched C" "Rent/lease other bus. prop." 1 #t "" ((1990 "20b") (1989 "21b") (1986 "22") (1985 "23") (1982 "22") (1981 "23") (1980 "24"))))
+    (cons 'N315 #(none "Sched C" "Repairs and maintenance" 1 #t "" ((1990 "21") (1989 "22") (1986 "23") (1985 "24") (1982 "23") (1981 "24") (1980 "25"))))
+    (cons 'N301 #(none "Sched C" "Supplies (not from Cost of Goods Sold)" 1 #t "" ((1990 "22") (1989 "23") (1986 "24") (1985 "25") (1982 "24") (1981 "25") (1980 "26"))))
+    (cons 'N316 #(none "Sched C" "Taxes and licenses" 1 #t "" ((1990 "23") (1989 "24") (1986 "25") (1985 "26") (1982 "25") (1981 "26") (1980 "27"))))
+    (cons 'N317 #(none "Sched C" "Travel" 1 #t "" ((1990 "24a") (1989 "25a") (1987 "26a") (1986 "26") (1985 "27") (1982 "26") (1981 "27") (1980 "29"))))
+    (cons 'N294 #(none "Sched C" "Meals and entertainment" 1 #t "" ((1990 "24b") (1989 "25b") (1987 "26b") (1986 "26") (1985 "27") (1982 "26") (1981 "27") (1980 "29"))))
+    (cons 'N318 #(none "Sched C" "Utilities" 1 #t "" ((1990 "25") (1989 "26") (1986 "27") (1985 "28") (1982 "27") (1981 "28") (1980 "30"))))
+    (cons 'N297 #(none "Sched C" "Wages paid" 1 #t "" ((1990 "26") (1989 "27") (1986 "28a") (1985 "29a") (1982 "28a") (1981 "29a") (1980 "31a"))))
+    (cons 'N302 #(current "Sched C" "Other business expenses" 3 #t "" ((1993 "27") (1990 "27b") (1989 "28") (1987 "29") (1986 "30") (1985 "31") (1982 "30") (1981 "31") (1980 "32"))))
+    (cons 'N305 #(none "Sched C" "Bad debts" 1 #t "" ((2003 "27") (1989 "9") (1982 "7") (1980 "8"))))
+    (cons 'N493 #(none "Sched C" "Purchases, cost of goods" 1 #t "" ((1996 "36") (1991 "34") (1990 "32") (1989 "33") (1983 "III,2") (1982 "C-1,2") (1980 "C-1,2a"))))
+    (cons 'N295 #(none "Sched C" "Cost of goods sold" 1 #t "" ((1990 "37") (1989 "36") (1988 "III,5") (1980 "C-1,5")) 1992))
+    (cons 'N494 #(none "Sched C" "Labor, cost of goods sold" 1 #t "" ((1996 "37") (1991 "35") (1990 "33") (1989 "34") (1983 "III,3") (1980 "C-1,3"))))
+    (cons 'N495 #(none "Sched C" "Materials, cost of goods" 1 #t "" ((1996 "38") (1991 "36") (1990 "34") (1989 "35") (1983 "III,4") (1980 "C-1,4"))))
+    (cons 'N496 #(none "Sched C" "Other costs, cost of goods" 1 #t "" ((1996 "39") (1991 "37") (1990 "35") (1989 "36") (1988 "III,5") (1980 "C-1,5"))))
 
-   (cons 'N382 #(none "F2106" "Automobile expenses" 1 #t ""))
-   (cons 'N381 #(none "F2106" "Education expenses" 1 #t ""))
-   (cons 'N391 #(none "F2106" "Employee home office expenses" 1 #t ""))
-   (cons 'N389 #(none "F2106" "Job seeking expenses" 1 #t ""))
-   (cons 'N384 #(none "F2106" "Local transportation exp." 1 #t ""))
-   (cons 'N386 #(none "F2106" "Meal/entertainment expenses" 1 #t ""))
-   (cons 'N385 #(none "F2106" "Other business expenses" 1 #t ""))
-   (cons 'N390 #(none "F2106" "Special clothing expenses" 1 #t ""))
-   (cons 'N383 #(none "F2106" "Travel (away from home)" 1 #t ""))
+    (cons 'N497 #(not-impl "Sched C-EZ" "Schedule C-EZ" 1 #t ""))
+    (cons 'N500 #(none "Sched C-EZ" "Total expenses" 1 #t "" ((1992 "2"))))
 
-   (cons 'N401 #(current "F2441" "Qualifying child/dependent care expenses" 3 #f "Childcare"))
-   (cons 'N402 #(current "F2441" "Qualifying household expenses" 3 #f "Household, Decu"))
+    (cons 'N325 #(not-impl "Sched E" "Schedule E" 1 #t ""))
+    (cons 'N328 #(none "Sched E" "Advertising" 1 #t "" ((1990 "5") (1987 "6") (1981 "4") (1980 "VII"))))
+    (cons 'N329 #(none "Sched E" "Auto and travel" 1 #t "" ((1990 "6") (1987 "7") (1981 "5") (1980 "VII"))))
+    (cons 'N330 #(none "Sched E" "Cleaning and maintenance" 1 #t "" ((1990 "7") (1987 "8") (1981 "6") (1980 "VII"))))
+    (cons 'N331 #(none "Sched E" "Commissions" 1 #t "" ((1990 "8") (1987 "9") (1981 "7") (1980 "VII"))))
+    (cons 'N332 #(none "Sched E" "Insurance" 1 #t "" ((1990 "9") (1987 "10") (1981 "8") (1980 "VII"))))
+    (cons 'N333 #(none "Sched E" "Legal and professional fees" 1 #t "" ((1990 "10") (1987 "11") (1985 "9") (1981 "10") (1980 "VII"))))
+    (cons 'N502 #(none "Sched E" "Management fees" 1 #t "" ((1992 "11") (1990 "18")  (1987 "19") (1985 "17") (1981 "16") (1980 "VII"))))
+    (cons 'N334 #(none "Sched E" "Mortgage interest expense" 1 #t "" ((1992 "12") (1990 "11") (1987 "12") (1985 "10") (1981 "9") (1980 "VII"))))
+    (cons 'N335 #(none "Sched E" "Other interest expense" 1 #t "" ((1992 "13") (1990 "12") (1987 "13") (1985 "11") (1981 "9") (1980 "VII"))))
+    (cons 'N336 #(none "Sched E" "Repairs" 1 #t "" ((1992 "14") (1990 "13") (1987 "14") (1985 "12") (1981 "11") (1980 "VII"))))
+    (cons 'N337 #(none "Sched E" "Supplies" 1 #t "" ((1992 "15") (1990 "14") (1987 "15") (1985 "13") (1981 "12") (1980 "VII"))))
+    (cons 'N338 #(none "Sched E" "Taxes" 1 #t "" ((1992 "16") (1990 "15") (1987 "16") (1985 "14") (1981 "13") (1980 "VII"))))
+    (cons 'N339 #(none "Sched E" "Utilities" 1 #t "" ((1992 "17") (1990 "16") (1987 "17") (1985 "15") (1981 "14") (1980 "VII"))))
+    (cons 'N340 #(none "Sched E" "Wages paid" 1 #t "" ((1990 "17") (1987 "18") (1985 "16") (1981 "15") (1980 "VII")) 1991))
+    (cons 'N341 #(current "Sched E" "Other expenses" 3 #t "" ((1990 "18") (1987 "19") (1985 "17") (1981 "16") (1980 "VII"))))
 
-   (cons 'N406 #(none "F3903" "Transport/storage of goods" 1 #t ""))
-   (cons 'N407 #(none "F3903" "Travel/lodging, except meals" 1 #t ""))
+    (cons 'N343 #(not-impl "Sched F" "Schedule F" 1 #t ""))
+    (cons 'N378 #(none "Sched F" "Cost of resale livestock/items" 1 #t "" ((1990 "2"))))
+    (cons 'N354 #(none "Sched F" "Breeding fees" 1 #t "" ((1990 "12")) 1991))
+    (cons 'N543 #(none "Sched F" "Car and truck expenses" 1 #t "" ((1992 "12") (1991 "13") (1990 "34"))))
+    (cons 'N366 #(none "Sched F" "Chemicals" 1 #t "" ((1992 "13") (1991 "14") (1990 "13"))))
+    (cons 'N362 #(none "Sched F" "Conservation expenses" 1 #t "" ((1992 "14") (1991 "15") (1990 "14"))))
+    (cons 'N367 #(none "Sched F" "Custom hire expenses" 1 #t "" ((1992 "15") (1991 "16") (1990 "15"))))
+    (cons 'N364 #(none "Sched F" "Employee benefit programs" 1 #t "" ((1992 "17") (1991 "18") (1990 "17"))))
+    (cons 'N350 #(none "Sched F" "Feed purchased" 1 #t "" ((1992 "18") (1991 "19") (1990 "18"))))
+    (cons 'N352 #(none "Sched F" "Fertilizers and lime" 1 #t "" ((1992 "19") (1991 "20") (1990 "19"))))
+    (cons 'N361 #(none "Sched F" "Freight and trucking" 1 #t "" ((1992 "20") (1991 "21") (1990 "20"))))
+    (cons 'N356 #(none "Sched F" "Gasoline, fuel, and oil" 1 #t "" ((1992 "21") (1991 "22") (1990 "21"))))
+    (cons 'N359 #(none "Sched F" "Insurance, other than health" 1 #t "" ((1992 "22") (1991 "23") (1990 "22"))))
+    (cons 'N346 #(none "Sched F" "Interest expense, mortgage" 1 #t "" ((1992 "23a") (1991 "24a") (1990 "23a"))))
+    (cons 'N347 #(none "Sched F" "Interest expense, other" 1 #t "" ((1992 "23b") (1991 "24b") (1990 "23b"))))
+    (cons 'N344 #(none "Sched F" "Labor hired" 1 #t "" ((1992 "24") (1991 "25") (1990 "24"))))
+    (cons 'N363 #(none "Sched F" "Pension/profit sharing plans" 1 #t "" ((1992 "25") (1991 "26") (1990 "25"))))
+    (cons 'N349 #(none "Sched F" "Rent/lease vehicles, equip." 1 #t "" ((1992 "26a") (1991 "27a") (1990 "26a"))))
+    (cons 'N348 #(none "Sched F" "Rent/lease land, animals" 1 #t "" ((1992 "26b") (1991 "27b") (1990 "26b"))))
+    (cons 'N345 #(none "Sched F" "Repairs and maintenance" 1 #t "" ((1992 "27") (1991 "28") (1990 "27"))))
+    (cons 'N351 #(none "Sched F" "Seeds and plants purchased" 1 #t "" ((1992 "28") (1991 "29") (1990 "28"))))
+    (cons 'N357 #(none "Sched F" "Storage and warehousing" 1 #t "" ((1992 "29") (1991 "30") (1990 "29"))))
+    (cons 'N353 #(none "Sched F" "Supplies purchased" 1 #t "" ((1992 "30") (1991 "31") (1990 "30"))))
+    (cons 'N358 #(none "Sched F" "Taxes" 1 #t "" ((1992 "31") (1991 "32") (1990 "31"))))
+    (cons 'N360 #(none "Sched F" "Utilities" 1 #t "" ((1992 "32") (1991 "33") (1990 "32"))))
+    (cons 'N355 #(none "Sched F" "Vet, breeding, and medicine" 1 #t "" ((1992 "33") (1991 "34") (1990 "33"))))
+    (cons 'N365 #(current "Sched F" "Other farm expenses" 3 #t "" ((1992 "34") (1991 "35") (1990 "34"))))
 
-   (cons 'N413 #(none "F4684" "Basis of casualty property" 1 #t ""))
+    (cons 'N565 #(not-impl "Sched H" "Schedule H" 1 #t ""))
+    (cons 'N566 #(not-impl "Sched H" "Spouse" 0 #t "" ((1995 "")) 1995))
+    (cons 'N567 #(parent "Sched H" "Cash wages paid" 1 #t "" ((1995 "1"))))
+    (cons 'N568 #(parent "Sched H" "Federal tax withheld" 1 #t "" ((1995 "5"))))
 
-   (cons 'N419 #(not-impl "F4797" "Long Term dep. loss - business" 5 #f ""))
-   (cons 'N422 #(not-impl "F4797" "Long Term dep. loss - res. rent." 5 #f ""))
-   (cons 'N421 #(not-impl "F4797" "Short Term dep. prop. - business" 5 #f ""))
-   (cons 'N424 #(not-impl "F4797" "Short Term dep. prop. - res. rent." 5 #f ""))
+    (cons 'N380 #(not-impl "F2106" "Form 2106" 1 #t ""))
+    (cons 'N382 #(none "F2106" "Automobile expenses" 1 #t "" ((1990 "1"))))
+    (cons 'N384 #(none "F2106" "Local transportation exp." 1 #t "" ((1990 "2"))))
+    (cons 'N383 #(none "F2106" "Travel (away from home)" 1 #t "" ((1990 "3"))))
+    (cons 'N381 #(none "F2106" "Education expenses" 1 #t "" ((1990 "4"))))
+    (cons 'N385 #(none "F2106" "Other business expenses" 1 #t "" ((1990 "4"))))
+    (cons 'N389 #(none "F2106" "Job seeking expenses" 1 #t "" ((1990 "4"))))
+    (cons 'N390 #(none "F2106" "Special clothing expenses" 1 #t "" ((1990 "4"))))
+    (cons 'N391 #(none "F2106" "Employee home office expenses" 1 #t "" ((1990 "4"))))
+    (cons 'N386 #(none "F2106" "Meal/entertainment expenses" 1 #t "" ((1990 "5"))))
 
-   (cons 'N579 #(none "F4835" "Car and truck expenses" 1 #t ""))
-   (cons 'N580 #(none "F4835" "Chemicals" 1 #t ""))
-   (cons 'N581 #(none "F4835" "Conservation expenses" 1 #t ""))
-   (cons 'N582 #(none "F4835" "Custom hire expenses" 1 #t ""))
-   (cons 'N583 #(none "F4835" "Employee benefit programs" 1 #t ""))
-   (cons 'N584 #(none "F4835" "Feed purchased" 1 #t ""))
-   (cons 'N585 #(none "F4835" "Fertilizers and lime" 1 #t ""))
-   (cons 'N586 #(none "F4835" "Freight and trucking" 1 #t ""))
-   (cons 'N587 #(none "F4835" "Gasoline, fuel, and oil" 1 #t ""))
-   (cons 'N588 #(none "F4835" "Insurance (other than health)" 1 #t ""))
-   (cons 'N589 #(none "F4835" "Interest expense, mortgage" 1 #t ""))
-   (cons 'N590 #(none "F4835" "Interest expense, other" 1 #t ""))
-   (cons 'N591 #(none "F4835" "Labor hired" 1 #t ""))
-   (cons 'N602 #(none "F4835" "Other expenses" 1 #t ""))
-   (cons 'N592 #(none "F4835" "Pension/profit-sharing plans" 1 #t ""))
-   (cons 'N594 #(none "F4835" "Rent/lease land, animals" 1 #t ""))
-   (cons 'N593 #(none "F4835" "Rent/lease vehicles, equip." 1 #t ""))
-   (cons 'N595 #(none "F4835" "Repairs and maintenance" 1 #t ""))
-   (cons 'N596 #(none "F4835" "Seeds and plants purchased" 1 #t ""))
-   (cons 'N597 #(none "F4835" "Storage and warehousing" 1 #t ""))
-   (cons 'N598 #(none "F4835" "Supplies purchased" 1 #t ""))
-   (cons 'N599 #(none "F4835" "Taxes" 1 #t ""))
-   (cons 'N600 #(none "F4835" "Utilities" 1 #t ""))
-   (cons 'N601 #(none "F4835" "Vet, breeding, medicine" 1 #t ""))
+    (cons 'N392 #(not-impl "HomeWks" "Home Sale Worksheets" 1 #t ""))
+    (cons 'N394 #(none "HomeWks" "Expense of sale" 1 #t "" ((2002 "2"))))
+    (cons 'N395 #(none "HomeWks" "Basis of home sold" 1 #t "" ((2002 "4"))))
+    (cons 'N396 #(none "HomeWks" "Fixing-up expenses" 1 #t "" ((2000 "8")) 2000))
 
-   (cons 'N426 #(none "F4952" "Investment interest expense" 1 #f "_IntExp"))
+    (cons 'N400 #(not-impl "F2441" "Form 2441" 1 #f ""))
+    (cons 'N401 #(current "F2441" "Child care - day care" 1 #f "Childcare" ((1990 "1"))))
+    (cons 'N402 #(current "F2441" "Child care - household" 1 #f "Household, Decu" ((1990 "1"))))
 
-   (cons 'N432 #(none "F6252" "Expenses of sale" 1 #t ""))
+    (cons 'N403 #(not-impl "F3903" "Form 3903" 1 #t ""))
+    (cons 'N526 #(not-impl "F3903" "Spouse" 0 #t "" ((2001 ""))))
+    (cons 'N406 #(none "F3903" "Trans./store hshld goods" 1 #t "" ((2001 "1"))))
+    (cons 'N407 #(none "F3903" "Travel and lodging" 1 #t "" ((2001 "2"))))
+    (cons 'N404 #(none "F3903" "Meals during moving" 1 #t "" ((1993 "6")) 1993))
+    (cons 'N405 #(none "F3903" "Meals househunting & temp" 1 #t "" ((1993 "11")) 1993))
+    (cons 'N408 #(none "F3903" "Pre-moving expense" 1 #t "" ((1993 "9")) 1993))
+    (cons 'N409 #(none "F3903" "Temp. living exp." 1 #t "" ((1993 "10")) 1993))
+    (cons 'N410 #(none "F3903" "Moving sale cost" 1 #t "" ((1993 "14")) 1993))
+    (cons 'N411 #(none "F3903" "Moving purch. cost" 1 #t "" ((1993 "15")) 1993))
 
-   (cons 'N442 #(none "F8815" "Qualified higher education expenses" 1 #f ""))
+    (cons 'N412 #(not-impl "F4684" "Form 4684" 1 #t ""))
+    (cons 'N413 #(none "F4684" "Basis of casualty property" 1 #t "" ((1990 "2"))))
 
-   (cons 'N537 #(none "F8829" "Deductible mortgage expense" 1 #t ""))
-   (cons 'N539 #(none "F8829" "Insurance" 1 #t ""))
-   (cons 'N542 #(none "F8829" "Other expenses" 1 #t ""))
-   (cons 'N538 #(none "F8829" "Real estate taxes" 1 #t ""))
-   (cons 'N540 #(none "F8829" "Repairs and maintenance" 1 #t ""))
-   (cons 'N541 #(none "F8829" "Utilities" 1 #t ""))
+    (cons 'N418 #(not-impl "F4797" "Form 4797" 1 #f ""))
+    (cons 'N419 #(not-impl "F4797" "Long Term dep. loss - business" 5 #f "" ((1990 "2"))))
+    (cons 'N422 #(not-impl "F4797" "Long Term dep. loss - res. rent." 5 #f "" ((1990 "2"))))
+    (cons 'N421 #(not-impl "F4797" "Short Term dep. prop. - business" 5 #f "" ((1997 "10") (1992 "11") (1990 "10"))))
+    (cons 'N424 #(not-impl "F4797" "Short Term dep. prop. - res. rent." 5 #f "" ((1997 "10") (1992 "11") (1990 "10"))))
 
-   (cons 'N618 #(none "F8839" "Adoption fees" 1 #t ""))
-   (cons 'N620 #(none "F8839" "Attorney fees" 1 #t ""))
-   (cons 'N619 #(none "F8839" "Court costs" 1 #t ""))
-   (cons 'N622 #(none "F8839" "Other expenses" 1 #t ""))
-   (cons 'N621 #(none "F8839" "Traveling expenses" 1 #t ""))
+    (cons 'N569 #(not-impl "F4835" "Form 4835" 1 #t ""))
+    (cons 'N579 #(none "F4835" "Car and truck expenses" 1 #t "" ((1992 "8") (1991 "9"))))
+    (cons 'N580 #(none "F4835" "Chemicals" 1 #t "" ((1992 "9") (1991 "10") (1990 "9"))))
+    (cons 'N581 #(none "F4835" "Conservation expenses" 1 #t "" ((1992 "10") (1991 "11") (1990 "10"))))
+    (cons 'N582 #(none "F4835" "Custom hire (machine work)" 1 #t "" ((1992 "11") (1991 "12") (1990 "11"))))
+    (cons 'N583 #(none "F4835" "Employee benefit programs" 1 #t "" ((1992 "13") (1991 "14") (1990 "13"))))
+    (cons 'N584 #(none "F4835" "Feed purchased" 1 #t "" ((1992 "14") (1991 "15") (1990 "14"))))
+    (cons 'N585 #(none "F4835" "Fertilizers and lime" 1 #t "" ((1992 "15") (1991 "16") (1990 "15"))))
+    (cons 'N586 #(none "F4835" "Freight and trucking" 1 #t "" ((1992 "16") (1991 "17") (1990 "16"))))
+    (cons 'N587 #(none "F4835" "Gasoline, fuel, and oil" 1 #t "" ((1992 "17") (1991 "18") (1990 "17"))))
+    (cons 'N588 #(none "F4835" "Insurance (other than health)" 1 #t "" ((1992 "18") (1991 "19") (1990 "18"))))
+    (cons 'N589 #(none "F4835" "Interest expense, mortgage" 1 #t "" ((1992 "19a") (1991 "20a") (1990 "19a"))))
+    (cons 'N590 #(none "F4835" "Interest expense, other" 1 #t "" ((1992 "19b") (1991 "20b") (1990 "19b"))))
+    (cons 'N591 #(none "F4835" "Labor hired" 1 #t "" ((1992 "20") (1991 "21") (1990 "20"))))
+    (cons 'N592 #(none "F4835" "Pension/profit-sharing plans" 1 #t "" ((1992 "21") (1991 "22") (1990 "21"))))
+    (cons 'N593 #(none "F4835" "Rent/lease vehicles, equip." 1 #t "" ((1992 "22a") (1991 "23a") (1990 "22a"))))
+    (cons 'N594 #(none "F4835" "Rent/lease land, animals" 1 #t "" ((1992 "22b") (1991 "23b") (1990 "22b"))))
+    (cons 'N595 #(none "F4835" "Repairs and maintenance" 1 #t "" ((1992 "23") (1991 "24") (1990 "23"))))
+    (cons 'N596 #(none "F4835" "Seeds and plants purchased" 1 #t "" ((1992 "24") (1991 "25") (1990 "24"))))
+    (cons 'N597 #(none "F4835" "Storage and warehousing" 1 #t "" ((1992 "25") (1991 "26") (1990 "25"))))
+    (cons 'N598 #(none "F4835" "Supplies purchased" 1 #t "" ((1992 "26") (1991 "27") (1990 "26"))))
+    (cons 'N599 #(none "F4835" "Taxes" 1 #t "" ((1992 "27") (1991 "28") (1990 "27"))))
+    (cons 'N600 #(none "F4835" "Utilities" 1 #t "" ((1992 "28") (1991 "29") (1990 "28"))))
+    (cons 'N601 #(none "F4835" "Vet, breeding, medicine" 1 #t "" ((1992 "29") (1991 "30") (1990 "29"))))
+    (cons 'N602 #(current "F4835" "Other expenses" 3 #t "" ((1992 "30") (1991 "31") (1990 "30"))))
 
-   (cons 'N397 #(none "Home Sale" "Cost of new home" 1 #t ""))
-   (cons 'N394 #(none "Home Sale" "Expense of sale" 1 #t ""))
-   (cons 'N396 #(none "Home Sale" "Fixing-up expenses" 1 #t ""))
+    (cons 'N425 #(not-impl "F4952" "Form 4952" 1 #f ""))
+    (cons 'N426 #(none "F4952" "Investment interest expense" 1 #f "_IntExp" ((1990 "1"))))
 
-   (cons 'N280 #(none "Sched A" "Cash charity contributions" 1 #f ""))
-   (cons 'N484 #(none "Sched A" "Doctors, dentists, hospitals" 1 #f "Medical:Doctor"))
-   (cons 'N272 #(none "Sched A" "Gambling losses" 1 #f ""))
-   (cons 'N283 #(none "Sched A" "Home mortgage interest (1098)" 1 #f "Mortgage Int:Ba"))
-   (cons 'N545 #(none "Sched A" "Home mortgage interest (no 1098)" 1 #f ""))
-   (cons 'N282 #(none "Sched A" "Investment management fees" 1 #f "Investment Inte"))
-   (cons 'N544 #(none "Sched A" "Local income taxes" 1 #f ""))
-   (cons 'N274 #(none "Sched A" "Medical travel and lodging" 1 #f ""))
-   (cons 'N273 #(none "Sched A" "Medicine and drugs" 1 #f "Medical:Medicin"))
-   (cons 'N523 #(none "Sched A" "Misc., no 2% AGI limit" 1 #f ""))
-   (cons 'N486 #(none "Sched A" "Misc., subject to 2% AGI limit" 1 #f ""))
-   (cons 'N485 #(none "Sched A" "Non-cash charity contributions" 1 #f ""))
-   (cons 'N277 #(none "Sched A" "Other taxes" 1 #f ""))
-   (cons 'N535 #(none "Sched A" "Personal property taxes" 1 #f ""))
-   (cons 'N284 #(none "Sched A" "Points paid (no 1098)" 1 #f "Mortgage Points"))
-   (cons 'N276 #(none "Sched A" "Real estate taxes" 1 #f "Tax:Property"))
-   (cons 'N522 #(none "Sched A" "State estimated tax, qrtrly" 1 #f ""))
-   (cons 'N275 #(none "Sched A" "State income taxes" 1 #f ""))
-   (cons 'N271 #(none "Sched A" "Subscriptions" 1 #f ""))
-   (cons 'N281 #(none "Sched A" "Tax preparation fees" 1 #f ""))
+    (cons 'N427 #(not-impl "F6252" "Form 6252" 1 #t ""))
+    (cons 'N430 #(none "F6252" "Basis of property sold" 1 #t "" ((1992 "8") (1990 "4"))))
+    (cons 'N432 #(none "F6252" "Expenses of sale" 1 #t "" ((1992 "11") (1990 "7"))))
 
-   (cons 'N615 #(current "Sched B" "Fed tax withheld, dividend income" 3 #t ""))
-   (cons 'N616 #(current "Sched B" "Fed tax withheld, interest income" 3 #t ""))
+    (cons 'N437 #(not-impl "F8606" "Form 8606" 1 #t ""))
+    (cons 'N439 #(none "F8606" "IRA contribs-nondeductible" 1 #t "" ((1993 "1") (1989 "2") (1988 "4") (1987 "3"))))
 
-   (cons 'N304 #(none "Sched C" "Advertising" 1 #t ""))
-   (cons 'N305 #(none "Sched C" "Bad debts from sales/services" 1 #t ""))
-   (cons 'N306 #(none "Sched C" "Car and truck expenses" 1 #t ""))
-   (cons 'N307 #(none "Sched C" "Commissions and fees" 1 #t ""))
-   (cons 'N494 #(none "Sched C" "Cost of Goods Sold - Labor" 1 #t ""))
-   (cons 'N496 #(none "Sched C" "Cost of Goods Sold - Other costs" 1 #t ""))
-   (cons 'N495 #(none "Sched C" "Cost of Goods Sold - Materials/supplies" 1 #t ""))
-   (cons 'N493 #(none "Sched C" "Cost of Goods Sold - Purchases" 1 #t ""))
-   (cons 'N309 #(none "Sched C" "Depletion" 1 #t ""))
-   (cons 'N308 #(none "Sched C" "Employee benefit programs" 1 #t ""))
-   (cons 'N310 #(none "Sched C" "Insurance, other than health" 1 #t ""))
-   (cons 'N311 #(none "Sched C" "Interest expense, mortgage" 1 #t ""))
-   (cons 'N312 #(none "Sched C" "Interest expense, other" 1 #t ""))
-   (cons 'N298 #(none "Sched C" "Legal and professional fees" 1 #t ""))
-   (cons 'N294 #(none "Sched C" "Meals and entertainment" 1 #t ""))
-   (cons 'N313 #(none "Sched C" "Office expenses" 1 #t ""))
-   (cons 'N302 #(none "Sched C" "Other business expenses" 1 #t ""))
-   (cons 'N314 #(none "Sched C" "Pension/profit sharing plans" 1 #t ""))
-   (cons 'N300 #(none "Sched C" "Rent/lease other bus. prop." 1 #t ""))
-   (cons 'N299 #(none "Sched C" "Rent/lease vehicles, equip." 1 #t ""))
-   (cons 'N315 #(none "Sched C" "Repairs and maintenance" 1 #t ""))
-   (cons 'N296 #(none "Sched C" "Returns and allowances" 1 #t ""))
-   (cons 'N301 #(none "Sched C" "Supplies (not from Cost of Goods Sold)" 1 #t ""))
-   (cons 'N316 #(none "Sched C" "Taxes and licenses" 1 #t ""))
-   (cons 'N317 #(none "Sched C" "Travel" 1 #t ""))
-   (cons 'N318 #(none "Sched C" "Utilities" 1 #t ""))
-   (cons 'N297 #(none "Sched C" "Wages paid" 1 #t ""))
+    (cons 'N441 #(not-impl "F8815" "Form 8815" 1 #f ""))
+    (cons 'N442 #(none "F8815" "Qualified higher education expenses" 1 #f "" ((1990 "2"))))
 
-   (cons 'N328 #(none "Sched E" "Advertising" 1 #t ""))
-   (cons 'N329 #(none "Sched E" "Auto and travel" 1 #t ""))
-   (cons 'N330 #(none "Sched E" "Cleaning and maintenance" 1 #t ""))
-   (cons 'N331 #(none "Sched E" "Commissions" 1 #t ""))
-   (cons 'N332 #(none "Sched E" "Insurance" 1 #t ""))
-   (cons 'N333 #(none "Sched E" "Legal and professional fees" 1 #t ""))
-   (cons 'N502 #(none "Sched E" "Management fees" 1 #t ""))
-   (cons 'N334 #(none "Sched E" "Mortgage interest expense" 1 #t ""))
-   (cons 'N341 #(none "Sched E" "Other expenses" 1 #t ""))
-   (cons 'N335 #(none "Sched E" "Other interest expense" 1 #t ""))
-   (cons 'N336 #(none "Sched E" "Repairs" 1 #t ""))
-   (cons 'N337 #(none "Sched E" "Supplies" 1 #t ""))
-   (cons 'N338 #(none "Sched E" "Taxes" 1 #t ""))
-   (cons 'N339 #(none "Sched E" "Utilities" 1 #t ""))
+    (cons 'N536 #(not-impl "F8829" "Form 8829" 1 #t ""))
+    (cons 'N537 #(none "F8829" "Deductible mortgage interest" 1 #t "" ((1991 "10b"))))
+    (cons 'N538 #(none "F8829" "Real estate taxes" 1 #t "" ((1991 "11b"))))
+    (cons 'N539 #(none "F8829" "Insurance" 1 #t "" ((1991 "17b"))))
+    (cons 'N540 #(none "F8829" "Repairs and maintenance" 1 #t "" ((2006 "19b") (1991 "18b"))))
+    (cons 'N541 #(none "F8829" "Utilities" 1 #t "" ((2006 "20b") (1991 "19b"))))
+    (cons 'N542 #(none "F8829" "Other expenses" 1 #t "" ((2006 "21b") (1991 "20b"))))
 
-   (cons 'N543 #(none "Sched F" "Car and truck expenses" 1 #t ""))
-   (cons 'N366 #(none "Sched F" "Chemicals" 1 #t ""))
-   (cons 'N362 #(none "Sched F" "Conservation expenses" 1 #t ""))
-   (cons 'N378 #(none "Sched F" "Cost of resale livestock/items" 1 #t ""))
-   (cons 'N367 #(none "Sched F" "Custom hire expenses" 1 #t ""))
-   (cons 'N364 #(none "Sched F" "Employee benefit programs" 1 #t ""))
-   (cons 'N350 #(none "Sched F" "Feed purchased" 1 #t ""))
-   (cons 'N352 #(none "Sched F" "Fertilizers and lime" 1 #t ""))
-   (cons 'N361 #(none "Sched F" "Freight and trucking" 1 #t ""))
-   (cons 'N356 #(none "Sched F" "Gasoline, fuel, and oil" 1 #t ""))
-   (cons 'N359 #(none "Sched F" "Insurance, other than health" 1 #t ""))
-   (cons 'N346 #(none "Sched F" "Interest expense, mortgage" 1 #t ""))
-   (cons 'N347 #(none "Sched F" "Interest expense, other" 1 #t ""))
-   (cons 'N344 #(none "Sched F" "Labor hired" 1 #t ""))
-   (cons 'N365 #(none "Sched F" "Other farm expenses" 1 #t ""))
-   (cons 'N363 #(none "Sched F" "Pension/profit sharing plans" 1 #t ""))
-   (cons 'N348 #(none "Sched F" "Rent/lease land, animals" 1 #t ""))
-   (cons 'N349 #(none "Sched F" "Rent/lease vehicles, equip." 1 #t ""))
-   (cons 'N345 #(none "Sched F" "Repairs and maintenance" 1 #t ""))
-   (cons 'N351 #(none "Sched F" "Seeds and plants purchased" 1 #t ""))
-   (cons 'N357 #(none "Sched F" "Storage and warehousing" 1 #t ""))
-   (cons 'N353 #(none "Sched F" "Supplies purchased" 1 #t ""))
-   (cons 'N358 #(none "Sched F" "Taxes" 1 #t ""))
-   (cons 'N360 #(none "Sched F" "Utilities" 1 #t ""))
-   (cons 'N355 #(none "Sched F" "Vet, breeding, and medicine" 1 #t ""))
+    (cons 'N617 #(not-impl "F8839" "Form 8839" 1 #f ""))
+    (cons 'N618 #(none "F8839" "Adoption fees" 1 #f "" ((1998 "5") (1997 "3"))))
+    (cons 'N619 #(none "F8839" "Court costs" 1 #f "" ((1998 "5") (1997 "3"))))
+    (cons 'N620 #(none "F8839" "Attorney fees" 1 #f "" ((1998 "5") (1997 "3"))))
+    (cons 'N621 #(none "F8839" "Traveling expenses" 1 #f "" ((1998 "5") (1997 "3"))))
+    (cons 'N622 #(none "F8839" "Other expenses" 1 #f "" ((1998 "5") (1997 "3"))))
 
-   (cons 'N567 #(parent "Sched H" "Cash wages paid" 1 #f ""))
-   (cons 'N568 #(parent "Sched H" "Federal tax withheld" 1 #f ""))
+    (cons 'N639 #(not-impl "F8863" "Form 8863" 1 #f ""))
+    (cons 'N637 #(none "F8863" "Hope cr. qual. expenses" 1 #f "" ((1998 "1c"))))
+    (cons 'N638 #(none "F8863" "Lifetime cr. qual. expenses" 1 #f "" ((2005 "3c") (1998 "4c"))))
 
-   (cons 'N454 #(not-impl "Sched K-1" "Net LT capital gain or loss" 1 #t ""))
-   (cons 'N453 #(not-impl "Sched K-1" "Net ST capital gain or loss" 1 #t ""))
-   (cons 'N456 #(not-impl "Sched K-1" "Net Section 1231 gain or loss" 1 #t ""))
-   (cons 'N448 #(not-impl "Sched K-1" "Ordinary income or loss" 1 #t ""))
-   (cons 'N450 #(not-impl "Sched K-1" "Other rental income or loss" 1 #t ""))
-   (cons 'N449 #(not-impl "Sched K-1" "Rental RE income or loss" 1 #t ""))
+    (cons 'N446 #(not-impl "Sched K-1" "Schedule K-1 Worksheet" 1 #t ""))
+    (cons 'N448 #(parent "Sched K-1" "Ordinary income or loss" 1 #t "" ((1990 "1"))))
+    (cons 'N449 #(parent "Sched K-1" "Rental RE income or loss" 1 #t "" ((1990 "2"))))
+    (cons 'N450 #(parent "Sched K-1" "Other rental income or loss" 1 #t "" ((1990 "3"))))
+    (cons 'N453 #(parent "Sched K-1" "Net ST capital gain or loss" 1 #t "" ((2004 "8") (2003 "4d2") (1990 "4d"))))
+    (cons 'N454 #(parent "Sched K-1" "Net LT capital gain or loss" 1 #t "" ((2004 "9a") (2003 "4e2") (2001 "4e1") (1997 "4e2") (1990 "4e"))))
+    (cons 'N674 #(none "Sched K-1" "28% rate gain(loss)" 1 #t "" ((2004 "9b") (2003 "25") (2001 "4e2") (1997 "4e1"))))
+    (cons 'N456 #(parent "Sched K-1" "Net Section 1231 gain or loss" 1 #t "" ((2004 "10") (2003 "6b") (1998 "6") (1997 "6b") (1990 "6"))))
+    (cons 'N676 #(none "Sched K-1" "Other Income (loss)" 1 #t "" ((2004 "11") (1990 "7"))))
+    (cons 'N679 #(none "Sched K-1" "Total Foreign Taxes" 1 #t "" ((2004 "16") (2001 "17g") (2000 "17f") (1990 "17e"))))
 
-   (cons 'N461 #(parent "W-2" "Federal tax withheld, self" 1 #t "Tax:Fed"))
-   (cons 'N507 #(parent "W-2" "Federal tax withheld, spouse" 1 #t ""))
-   (cons 'N463 #(parent "W-2" "Local tax withheld, self" 1 #t ""))
-   (cons 'N509 #(parent "W-2" "Local tax withheld, spouse" 1 #t ""))
-   (cons 'N480 #(parent "W-2" "Medicare tax withheld, self" 1 #t "Tax:Medicare"))
-   (cons 'N510 #(parent "W-2" "Medicare tax withheld, spouse" 1 #t ""))
-   (cons 'N462 #(parent "W-2" "Soc. Sec. tax withheld, self" 1 #t "Tax:Soc Sec"))
-   (cons 'N508 #(parent "W-2" "Soc. Sec. tax withheld, spouse" 1 #t ""))
-   (cons 'N464 #(parent "W-2" "State tax withheld, self" 1 #t "Tax:State"))
-   (cons 'N511 #(parent "W-2" "State tax withheld, spouse" 1 #t ""))
+    (cons 'N458 #(not-impl "W-2" "W-2" 1 #t ""))
+    (cons 'N461 #(parent "W-2" "Federal tax withheld, self" 1 #t "Tax:Fed" ((1993 "2") (1990 "9"))))
+    (cons 'N507 #(parent "W-2" "Federal tax withheld, spouse" 1 #t "" ((1993 "2") (1990 "9"))))
+    (cons 'N462 #(parent "W-2" "Soc. Sec. tax withheld, self" 1 #t "Tax:Soc Sec" ((1993 "4") (1990 "11"))))
+    (cons 'N508 #(parent "W-2" "Soc. Sec. tax withheld, spouse" 1 #t "" ((1993 "4") (1990 "11"))))
+    (cons 'N480 #(parent "W-2" "Medicare tax withheld, self" 1 #t "Tax:Medicare" ((1993 "6") (1991 "15"))))
+    (cons 'N510 #(parent "W-2" "Medicare tax withheld, spouse" 1 #t "" ((1993 "6") (1991 "15"))))
+    (cons 'N464 #(parent "W-2" "State tax withheld, self" 1 #t "Tax:State" ((2001 "17") (1993 "18") (1990 "24"))))
+    (cons 'N511 #(parent "W-2" "State tax withheld, spouse" 1 #t "" ((2001 "17") (1993 "18") (1990 "24"))))
+    (cons 'N463 #(parent "W-2" "Local tax withheld, self" 1 #t "" ((2001 "19") (1993 "21") (1990 "27"))))
+    (cons 'N509 #(parent "W-2" "Local tax withheld, spouse" 1 #t "" ((2001 "19") (1993 "21") (1990 "27"))))
 
-   (cons 'N550 #(parent "W-2G" "Federal tax withheld" 1 #t ""))
-   (cons 'N551 #(parent "W-2G" "State tax withheld" 1 #t ""))))
+    (cons 'N547 #(not-impl "W-2G" "W-2G" 1 #t ""))
+    (cons 'N550 #(parent "W-2G" "Federal tax withheld" 1 #t "" ((1990 "2"))))
+    (cons 'N551 #(parent "W-2G" "State tax withheld" 1 #t "" ((1990 "14"))))
+
+    (cons 'N643 #(not-impl "F1099-DIV" "1099 Div" 1 #f ""))
+    (cons 'N648 #(current "F1099-DIV" "Investment Expense, div" 3 #t "" ((1998 "5") (1990 "1e"))))
+    (cons 'N649 #(current "F1099-DIV" "Foreign tax, div" 3 #t "" ((1998 "6") (1990 "3"))))
+    (cons 'N650 #(not-impl "F1099-DIV" "Foreign country, div" 2 #t "" ((1998 "7") (1990 "4"))))
+
+    (cons 'N634 #(not-impl "F1099-G" "1099-G" 1 #t ""))
+    (cons 'N605 #(none "F1099-G" "Unemployment comp repaid" 1 #t "" ((1990 "1a"))))
+    (cons 'N606 #(none "F1099-G" "Fed tax withheld, unemployment comp" 1 #t "" ((1990 "4"))))
+
+    (cons 'N640 #(not-impl "F1099-INT" "1099 INT" 1 #f ""))
+    (cons 'N653 #(current "F1099-INT" "Intestment expense, int" 3 #t "" ((1999 "5"))))
+    (cons 'N641 #(current "F1099-INT" "Foreign tax, int" 3 #t "" ((1999 "6") (1990 "5"))))
+    (cons 'N642 #(not-impl "F1099-INT" "Foreign country, int" 2 #t "" ((1999 "7") (1990 "6"))))
+
+    (cons 'N553 #(not-impl "F1099-MISC" "1099-MISC" 1 #t ""))
+    (cons 'N558 #(parent "F1099-MISC" "Federal tax withheld" 1 #t "" ((1990 "4"))))
+    (cons 'N563 #(parent "F1099-MISC" "State tax withheld" 1 #t "" ((2001 "16") (1990 "11"))))
+    (cons 'N654 #(not-impl "F1099-MISC" "State ID" 2 #t "" ((2001 "17") (1990 "12"))))
+
+    (cons 'N657 #(not-impl "F1099-OID" "1099 OID" 1 #f ""))
+    (cons 'N659 #(current "F1099-OID" "Early wdrawal pen, OID" 3 #t "" ((1990 "3"))))
+    (cons 'N660 #(current "F1099-OID" "Fed tax wheld, OID" 3 #t "" ((1990 "4"))))
+    (cons 'N663 #(current "F1099-OID" "Investment Expense, OID" 3 #t "" ((1999 "7"))))
+
+    (cons 'N473 #(not-impl "F1099-R" "1099R" 1 #t ""))
+    (cons 'N665 #(not-impl "F1099-R" "Taxable not determined" 2 #t "" ((1991 "2b"))))
+    (cons 'N670 #(not-impl "F1099-R" "Pension Tax. not determined" 2 #t "" ((1991 "2b"))))
+    (cons 'N529 #(parent "F1099-R" "Pension federal withholding" 1 #t "" ((1990 "4"))))
+    (cons 'N530 #(parent "F1099-R" "Pension state withholding" 1 #t "" ((1990 "10"))))
+    (cons 'N669 #(not-impl "F1099-R" "Pension State ID" 2 #t "" ((1990 "11"))))
+    (cons 'N531 #(parent "F1099-R" "Pension local withholding" 1 #t "" ((1993 "13") (1990 "12"))))
+    (cons 'N532 #(parent "F1099-R" "IRA federal withholding" 1 #t "" ((1990 "4"))))
+    (cons 'N533 #(parent "F1099-R" "IRA state withholding" 1 #t "" ((1990 "10"))))
+    (cons 'N664 #(not-impl "F1099-R" "State ID" 2 #t "" ((1990 "11"))))
+    (cons 'N534 #(parent "F1099-R" "IRA local withholding" 1 #t "" ((1993 "13") (1990 "12"))))
+    (cons 'N625 #(parent "F1099-R" "SIMPLE federal withholding" 1 #t "" ((1990 "4"))))
+    (cons 'N626 #(parent "F1099-R" "SIMPLE state withholding" 1 #t "" ((1990 "10"))))
+    (cons 'N627 #(parent "F1099-R" "SIMPLE local withholding" 1 #t "" ((1993 "13") (1990 "12"))))
+   )
+  )
+  (cons 'F1065
+   (list
+    (cons 'N000 #(none "" "Tax Report Only - No TXF Export" 0 #f ""))
+
+    (cons 'N1664 #(none "F1065" "Other salaries and wages" 1 #f "" ((1990 "9a"))))
+    (cons 'N1665 #(none "F1065" "Guaranteed payments-use of capital" 1 #f "" ((1990 "10"))))
+    (cons 'N1666 #(none "F1065" "Guaranteed payments-partners" 1 #f "" ((1990 "10"))))
+    (cons 'N1667 #(none "F1065" "Guaranteed pmts-medical insurance premiums" 1 #f "" ((1990 "10"))))
+    (cons 'N1668 #(none "F1065" "Repairs and maintenance" 1 #f "" ((1990 "15"))))
+    (cons 'N1670 #(none "F1065" "Bad debts" 1 #f "" ((1990 "14"))))
+    (cons 'N1672 #(none "F1065" "Rents" 1 #f "" ((1990 "11"))))
+    (cons 'N1674 #(none "F1065" "State franchise or inc. tax" 1 #f "" ((1990 "13"))))
+    (cons 'N1676 #(none "F1065" "Local property taxes" 1 #f "" ((1990 "13"))))
+    (cons 'N1678 #(none "F1065" "Payroll taxes" 1 #f "" ((1990 "13"))))
+    (cons 'N1680 #(none "F1065" "Other miscellaneous taxes" 1 #f "" ((1990 "13"))))
+    (cons 'N1681 #(none "F1065" "Licenses" 1 #f "" ((1990 "13"))))
+    (cons 'N1682 #(none "F1065" "Interest expense" 1 #f "" ((1990 "12"))))
+    (cons 'N1684 #(none "F1065" "Depletion" 1 #f "" ((1990 "17"))))
+    (cons 'N1686 #(none "F1065" "Retirement plans/etc." 1 #f "" ((1991 "18") (1990 "18a"))))
+    (cons 'N1688 #(none "F1065" "Employee benefit programs" 1 #f "" ((1991 "19") (1990 "18b"))))
+    (cons 'N1736 #(none "F1065" "Meals and entertainment" 1 #f "" ((1991 "20") (1990 "19"))))
+    (cons 'N1740 #(none "F1065" "Other" 1 #f "" ((1991 "20") (1990 "19"))))
+
+    (cons 'N1634 #(none "F1065" "Purchases" 1 #f "" ((1990 "A2"))))
+    (cons 'N1636 #(none "F1065" "Cost of labor" 1 #f "" ((1990 "A3"))))
+    (cons 'N1638 #(none "F1065" "Add'l section 263A costs" 1 #f "" ((1991 "A4") (1990 "A4a"))))
+    (cons 'N1656 #(none "F1065" "Meals and entertainment" 1 #f "" ((1991 "A5") (1990 "A4b"))))
+    (cons 'N1658 #(none "F1065" "Other costs" 1 #f "" ((1991 "A5") (1990 "A4b"))))
+
+    (cons 'N1805 #(none "F1065" "Expenses-rental" 1 #f "" ((1990 "K3b"))))
+    (cons 'N1829 #(none "F1065" "Charitable contributions" 1 #f "" ((2004 "K13a") (1990 "K8"))))
+    (cons 'N1848 #(none "F1065" "Int. exp. on investment debts" 1 #f "" ((2005 "K13b") (2004 "K13c") (1997 "K14a") (1990 "K12a"))))
+    (cons 'N1856 #(none "F1065" "Section 59(e) expenses" 1 #f "" ((2005 "K13c(2)") (2004 "K13d(2)") (1995 "K18b") (1990 "K18a"))))
+    (cons 'N1845 #(none "F1065" "Other deductions" 1 #f "" ((2005 "K13d") (2004 "K13e") (1990 "K11"))))
+    (cons 'N1853 #(none "F1065" "Total foreign taxes" 1 #f "" ((2004 "K16l") (2001 "K17g") (2000 "K17f") (1990 "K17e"))))
+    (cons 'N1857 #(none "F1065" "Tax-exempt interest income" 1 #f "" ((2004 "K18a") (1990 "K19"))))
+    (cons 'N1859 #(none "F1065" "Other tax-exempt income" 1 #f "" ((2004 "K18b") (1992 "K20") (1990 "K19"))))
+    (cons 'N1861 #(none "F1065" "Nondeductible expenses" 1 #f "" ((2004 "K18c") (1992 "K21") (1990 "K19"))))
+    (cons 'N1831 #(none "F1065" "Deds.-portfolio income (loss)" 1 #f "" ((2005 "K20b") (2004 "K13b") (1990 "K10"))))
+
+    (cons 'N1903 #(none "F1065" "Depreciation per books" 1 #f "" ((1992 "M-1,4a&7a") (1991 "M-1,3a&6a"))))
+    (cons 'N1904 #(none "F1065" "Expenses on books not on return" 1 #f "" ((1992 "M-1,4") (1991 "M-1,3"))))
+
+    (cons 'N1920 #(none "F1065" "Other decreases to partners' cap accts" 1 #f "" ((1991 "M-2,7") (1990 "M(e)"))))
+
+    (cons 'N343 #(not-impl "Sched F" "Schedule F" 1 #t ""))
+    (cons 'N378 #(none "Sched F" "Cost of resale livestock/items" 1 #t "" ((1990 "2"))))
+    (cons 'N354 #(none "Sched F" "Breeding fees" 1 #t "" ((1990 "12")) 1991))
+    (cons 'N543 #(none "Sched F" "Car and truck expenses" 1 #t "" ((1992 "12") (1991 "13") (1990 "34"))))
+    (cons 'N366 #(none "Sched F" "Chemicals" 1 #t "" ((1992 "13") (1991 "14") (1990 "13"))))
+    (cons 'N362 #(none "Sched F" "Conservation expenses" 1 #t "" ((1992 "14") (1991 "15") (1990 "14"))))
+    (cons 'N367 #(none "Sched F" "Custom hire expenses" 1 #t "" ((1992 "15") (1991 "16") (1990 "15"))))
+    (cons 'N364 #(none "Sched F" "Employee benefit programs" 1 #t "" ((1992 "17") (1991 "18") (1990 "17"))))
+    (cons 'N350 #(none "Sched F" "Feed purchased" 1 #t "" ((1992 "18") (1991 "19") (1990 "18"))))
+    (cons 'N352 #(none "Sched F" "Fertilizers and lime" 1 #t "" ((1992 "19") (1991 "20") (1990 "19"))))
+    (cons 'N361 #(none "Sched F" "Freight and trucking" 1 #t "" ((1992 "20") (1991 "21") (1990 "20"))))
+    (cons 'N356 #(none "Sched F" "Gasoline, fuel, and oil" 1 #t "" ((1992 "21") (1991 "22") (1990 "21"))))
+    (cons 'N359 #(none "Sched F" "Insurance, other than health" 1 #t "" ((1992 "22") (1991 "23") (1990 "22"))))
+    (cons 'N346 #(none "Sched F" "Interest expense, mortgage" 1 #t "" ((1992 "23a") (1991 "24a") (1990 "23a"))))
+    (cons 'N347 #(none "Sched F" "Interest expense, other" 1 #t "" ((1992 "23b") (1991 "24b") (1990 "23b"))))
+    (cons 'N344 #(none "Sched F" "Labor hired" 1 #t "" ((1992 "24") (1991 "25") (1990 "24"))))
+    (cons 'N363 #(none "Sched F" "Pension/profit sharing plans" 1 #t "" ((1992 "25") (1991 "26") (1990 "25"))))
+    (cons 'N349 #(none "Sched F" "Rent/lease vehicles, equip." 1 #t "" ((1992 "26a") (1991 "27a") (1990 "26a"))))
+    (cons 'N348 #(none "Sched F" "Rent/lease land, animals" 1 #t "" ((1992 "26b") (1991 "27b") (1990 "26b"))))
+    (cons 'N345 #(none "Sched F" "Repairs and maintenance" 1 #t "" ((1992 "27") (1991 "28") (1990 "27"))))
+    (cons 'N351 #(none "Sched F" "Seeds and plants purchased" 1 #t "" ((1992 "28") (1991 "29") (1990 "28"))))
+    (cons 'N357 #(none "Sched F" "Storage and warehousing" 1 #t "" ((1992 "29") (1991 "30") (1990 "29"))))
+    (cons 'N353 #(none "Sched F" "Supplies purchased" 1 #t "" ((1992 "30") (1991 "31") (1990 "30"))))
+    (cons 'N358 #(none "Sched F" "Taxes" 1 #t "" ((1992 "31") (1991 "32") (1990 "31"))))
+    (cons 'N360 #(none "Sched F" "Utilities" 1 #t "" ((1992 "32") (1991 "33") (1990 "32"))))
+    (cons 'N355 #(none "Sched F" "Vet, breeding, and medicine" 1 #t "" ((1992 "33") (1991 "34") (1990 "33"))))
+    (cons 'N365 #(current "Sched F" "Other farm expenses" 3 #t "" ((1992 "34") (1991 "35") (1990 "34"))))
+
+    (cons 'N418 #(not-impl "F4797" "Form 4797" 1 #f ""))
+    (cons 'N419 #(not-impl "F4797" "Long Term dep. loss - business" 5 #f "" ((1990 "2"))))
+    (cons 'N422 #(not-impl "F4797" "Long Term dep. loss - res. rent." 5 #f "" ((1990 "2"))))
+    (cons 'N421 #(not-impl "F4797" "Short Term dep. prop. - business" 5 #f "" ((1997 "10") (1992 "11") (1990 "10"))))
+    (cons 'N424 #(not-impl "F4797" "Short Term dep. prop. - res. rent." 5 #f "" ((1997 "10") (1992 "11") (1990 "10"))))
+
+    (cons 'N1745 #(parent "F8825" "Advertising – A" 1 #t "" ((1990 "3A"))))
+    (cons 'N1746 #(parent "F8825" "Auto and travel – A" 1 #t "" ((1990 "4A"))))
+    (cons 'N1747 #(parent "F8825" "Cleaning and maintenance – A" 1 #t "" ((1990 "5A"))))
+    (cons 'N1748 #(parent "F8825" "Commissions – A" 1 #t "" ((1990 "6A"))))
+    (cons 'N1749 #(parent "F8825" "Insurance – A" 1 #t "" ((1990 "7A"))))
+    (cons 'N1750 #(parent "F8825" "Legal and other prof. fees – A" 1 #t "" ((1990 "8A"))))
+    (cons 'N1751 #(parent "F8825" "Interest expense – A" 1 #t "" ((1990 "9A"))))
+    (cons 'N1752 #(parent "F8825" "Repairs – A" 1 #t "" ((1990 "10A"))))
+    (cons 'N1753 #(parent "F8825" "Taxes – A" 1 #t "" ((1990 "11A"))))
+    (cons 'N1754 #(parent "F8825" "Utilities – A" 1 #t "" ((1990 "12A"))))
+    (cons 'N1755 #(parent "F8825" "Wages and salaries – A" 1 #t "" ((1990 "13A"))))
+    (cons 'N1757 #(parent "F8825" "Other miscellaneous expenses – A" 1 #t "" ((1990 "15A"))))
+
+    (cons 'N1760 #(parent "F8825" "Advertising – B" 1 #t "" ((1990 "3B"))))
+    (cons 'N1761 #(parent "F8825" "Auto and travel – B" 1 #t "" ((1990 "4B"))))
+    (cons 'N1762 #(parent "F8825" "Cleaning and maintenance – B" 1 #t "" ((1990 "5B"))))
+    (cons 'N1763 #(parent "F8825" "Commissions – B" 1 #t "" ((1990 "6B"))))
+    (cons 'N1764 #(parent "F8825" "Insurance – B" 1 #t "" ((1990 "7B"))))
+    (cons 'N1765 #(parent "F8825" "Legal and other prof. fees – B" 1 #t "" ((1990 "8B"))))
+    (cons 'N1766 #(parent "F8825" "Interest expense – B" 1 #t "" ((1990 "9B"))))
+    (cons 'N1767 #(parent "F8825" "Repairs – B" 1 #t "" ((1990 "10B"))))
+    (cons 'N1768 #(parent "F8825" "Taxes – B" 1 #t "" ((1990 "11B"))))
+    (cons 'N1769 #(parent "F8825" "Utilities – B" 1 #t "" ((1990 "12B"))))
+    (cons 'N1770 #(parent "F8825" "Wages and salaries – B" 1 #t "" ((1990 "13B"))))
+    (cons 'N1771 #(parent "F8825" "Other miscellaneous expenses – B" 1 #t "" ((1990 "15B"))))
+
+    (cons 'N1775 #(parent "F8825" "Advertising – C" 1 #t "" ((1990 "3C"))))
+    (cons 'N1776 #(parent "F8825" "Auto and travel – C" 1 #t "" ((1990 "4C"))))
+    (cons 'N1777 #(parent "F8825" "Cleaning and maintenance – C" 1 #t "" ((1990 "5C"))))
+    (cons 'N1778 #(parent "F8825" "Commissions – C" 1 #t "" ((1990 "6C"))))
+    (cons 'N1779 #(parent "F8825" "Insurance – C" 1 #t "" ((1990 "7C"))))
+    (cons 'N1780 #(parent "F8825" "Legal and other prof. fees – C" 1 #t "" ((1990 "8C"))))
+    (cons 'N1781 #(parent "F8825" "Interest expense – C" 1 #t "" ((1990 "9C"))))
+    (cons 'N1782 #(parent "F8825" "Repairs – C" 1 #t "" ((1990 "10C"))))
+    (cons 'N1783 #(parent "F8825" "Taxes – C" 1 #t "" ((1990 "11C"))))
+    (cons 'N1784 #(parent "F8825" "Utilities – C" 1 #t "" ((1990 "12C"))))
+    (cons 'N1785 #(parent "F8825" "Wages and salaries – C" 1 #t "" ((1990 "13C"))))
+    (cons 'N1786 #(parent "F8825" "Other miscellaneous expenses – C" 1 #t "" ((1990 "15C"))))
+
+    (cons 'N1789 #(parent "F8825" "Gross rents – D" 1 #t "" ((1990 "2D"))))
+    (cons 'N1790 #(parent "F8825" "Advertising – D" 1 #t "" ((1990 "3D"))))
+    (cons 'N1791 #(parent "F8825" "Auto and travel – D" 1 #t "" ((1990 "4D"))))
+    (cons 'N1792 #(parent "F8825" "Cleaning and maintenance – D" 1 #t "" ((1990 "5D"))))
+    (cons 'N1793 #(parent "F8825" "Commissions – D" 1 #t "" ((1990 "6D"))))
+    (cons 'N1794 #(parent "F8825" "Insurance – D" 1 #t "" ((1990 "7D"))))
+    (cons 'N1795 #(parent "F8825" "Legal and other prof. fees – D" 1 #t "" ((1990 "8D"))))
+    (cons 'N1796 #(parent "F8825" "Interest expense – D" 1 #t "" ((1990 "9D"))))
+    (cons 'N1797 #(parent "F8825" "Repairs – D" 1 #t "" ((1990 "10D"))))
+    (cons 'N1798 #(parent "F8825" "Taxes – D" 1 #t "" ((1990 "11D"))))
+    (cons 'N1799 #(parent "F8825" "Utilities – D" 1 #t "" ((1990 "12D"))))
+    (cons 'N1800 #(parent "F8825" "Wages and salaries – D" 1 #t "" ((1990 "13D"))))
+    (cons 'N1801 #(parent "F8825" "Other miscellaneous expenses – D" 1 #t "" ((1990 "15D"))))
+
+    (cons 'N446 #(not-impl "Sched K-1" "Schedule K-1 Worksheet" 1 #t ""))
+    (cons 'N448 #(parent "Sched K-1" "Ordinary income or loss" 1 #t "" ((1990 "1"))))
+    (cons 'N449 #(parent "Sched K-1" "Rental RE income or loss" 1 #t "" ((1990 "2"))))
+    (cons 'N450 #(parent "Sched K-1" "Other rental income or loss" 1 #t "" ((1990 "3"))))
+    (cons 'N453 #(parent "Sched K-1" "Net ST capital gain or loss" 1 #t "" ((2004 "8") (2003 "4d2") (1990 "4d"))))
+    (cons 'N454 #(parent "Sched K-1" "Net LT capital gain or loss" 1 #t "" ((2004 "9a") (2003 "4e2") (2001 "4e1") (1997 "4e2") (1990 "4e"))))
+    (cons 'N674 #(none "Sched K-1" "28% rate gain(loss)" 1 #t "" ((2004 "9b") (2003 "25") (2001 "4e2") (1997 "4e1"))))
+    (cons 'N456 #(parent "Sched K-1" "Net Section 1231 gain or loss" 1 #t "" ((2004 "10") (2003 "6b") (1998 "6") (1997 "6b") (1990 "6"))))
+    (cons 'N676 #(none "Sched K-1" "Other Income (loss)" 1 #t "" ((2004 "11") (1990 "7"))))
+    (cons 'N679 #(none "Sched K-1" "Total Foreign Taxes" 1 #t "" ((2004 "16") (2001 "17g") (2000 "17f") (1990 "17e"))))
+   )
+  )
+  (cons 'F1120
+   (list
+    (cons 'N000 #(none "" "Tax Report Only - No TXF Export" 0 #f ""))
+
+    (cons 'N1053 #(none "F1120" "Ded.-div. paid on pref. stk." 1 #f "" ((1990 "C18"))))
+
+    (cons 'N1059 #(none "F1120" "Purchases" 1 #f "" ((1990 "A2"))))
+    (cons 'N1061 #(none "F1120" "Cost of labor" 1 #f "" ((1990 "A3"))))
+    (cons 'N1062 #(none "F1120" "Section 263A depreciation" 1 #f "" ((1992 "A5") (1990 "A4b"))))
+    (cons 'N1063 #(none "F1120" "Add'l section 263A costs" 1 #f "" ((1992 "A4") (1990 "A4a"))))
+    (cons 'N1075 #(none "F1120" "Other costs" 1 #f "" ((1992 "A5") (1990 "A4b"))))
+
+    (cons 'N1080 #(none "F1120" "Comp. of Officers -Sch E" 1 #f "" ((1990 "E1"))))
+    (cons 'N1085 #(none "F1120" "Salaries and wages" 1 #f "" ((1994 "13") (1990 "13a"))))
+    (cons 'N1086 #(none "F1120" "Repairs and maintenance" 1 #f "" ((1990 "14"))))
+    (cons 'N1087 #(none "F1120" "Bad debts" 1 #f "" ((1990 "15"))))
+    (cons 'N1089 #(none "F1120" "Rents" 1 #f "" ((1990 "16"))))
+    (cons 'N1091 #(none "F1120" "State taxes" 1 #f "" ((1990 "17"))))
+    (cons 'N1093 #(none "F1120" "Local property taxes" 1 #f "" ((1990 "17"))))
+    (cons 'N1095 #(none "F1120" "Payroll taxes" 1 #f "" ((1990 "17"))))
+    (cons 'N1097 #(none "F1120" "Other miscellaneous taxes" 1 #f "" ((1990 "17"))))
+    (cons 'N1098 #(none "F1120" "Licenses" 1 #f "" ((1990 "17"))))
+    (cons 'N1099 #(none "F1120" "Interest expense" 1 #f "" ((1990 "18"))))
+    (cons 'N1101 #(none "F1120" "Charitable contributions" 1 #f "" ((1990 "19"))))
+    (cons 'N1103 #(none "F1120" "Depletion" 1 #f "" ((2005 "21") (1990 "22"))))
+    (cons 'N1105 #(none "F1120" "Advertising" 1 #f "" ((2005 "22") (1990 "23"))))
+    (cons 'N1107 #(none "F1120" "Pension/profit-sharing/etc." 1 #f "" ((2005 "23") (1990 "24"))))
+    (cons 'N1109 #(none "F1120" "Employee benefit programs" 1 #f "" ((2005 "24") (1990 "25"))))
+    (cons 'N1153 #(none "F1120" "Meals and entertainment" 1 #f "" ((1990 "26"))))
+    (cons 'N1157 #(none "F1120" "Other deductions" 1 #f "" ((1990 "26"))))
+
+    (cons 'N1161 #(none "F1120" "Estimated Qtrly Payment #1" 1 #f "" ((1990 "32b"))))
+    (cons 'N1163 #(none "F1120" "Estimated Qtrly Payment #2" 1 #f "" ((1990 "32b"))))
+    (cons 'N1165 #(none "F1120" "Estimated Qtrly Payment #3" 1 #f "" ((1990 "32b"))))
+    (cons 'N1167 #(none "F1120" "Estimated Qtrly Payment #4" 1 #f "" ((1990 "32b"))))
+
+    (cons 'N1234 #(none "F1120" "Depreciation per books" 1 #f "" ((1990 "M-1,5a&8a"))))
+    (cons 'N1235 #(none "F1120" "Expenses on books not on return" 1 #f "" ((1990 "M-1,5"))))
+
+    (cons 'N1240 #(none "F1120" "Cash distributions" 1 #f "" ((1990 "M-2,5a"))))
+    (cons 'N1241 #(none "F1120" "Stock distributions" 1 #f "" ((1990 "M-2,5b"))))
+    (cons 'N1242 #(none "F1120" "Property distributions" 1 #f "" ((1990 "M-2,5c"))))
+    (cons 'N1243 #(none "F1120" "Other decreases" 1 #f "" ((1990 "M-2,6"))))
+
+    (cons 'N418 #(not-impl "F4797" "Form 4797" 1 #f ""))
+    (cons 'N419 #(not-impl "F4797" "Long Term dep. loss - business" 5 #f "" ((1990 "2"))))
+    (cons 'N422 #(not-impl "F4797" "Long Term dep. loss - res. rent." 5 #f "" ((1990 "2"))))
+    (cons 'N421 #(not-impl "F4797" "Short Term dep. prop. - business" 5 #f "" ((1997 "10") (1992 "11") (1990 "10"))))
+    (cons 'N424 #(not-impl "F4797" "Short Term dep. prop. - res. rent." 5 #f "" ((1997 "10") (1992 "11") (1990 "10"))))
+   )
+  )
+  (cons 'F1120S
+   (list
+    (cons 'N000 #(none "" "Tax Report Only - No TXF Export" 0 #f ""))
+
+    (cons 'N1301 #(none "F1120S" "Compensation of shareholder/officers" 1 #f "" ((1990 "7"))))
+    (cons 'N1302 #(none "F1120S" "Compensation of other officers" 1 #f "" ((1990 "7"))))
+    (cons 'N1303 #(none "F1120S" "Salaries and wages" 1 #f "" ((1990 "8a"))))
+    (cons 'N1305 #(none "F1120S" "Repairs and maintenance" 1 #f "" ((1990 "9"))))
+    (cons 'N1307 #(none "F1120S" "Bad debts" 1 #f "" ((1990 "10"))))
+    (cons 'N1309 #(none "F1120S" "Rents" 1 #f "" ((1990 "11"))))
+    (cons 'N1311 #(none "F1120S" "State franchise or inc. tax" 1 #f "" ((1990 "12"))))
+    (cons 'N1313 #(none "F1120S" "Local property taxes" 1 #f "" ((1990 "12"))))
+    (cons 'N1315 #(none "F1120S" "Payroll taxes" 1 #f "" ((1990 "12"))))
+    (cons 'N1317 #(none "F1120S" "Other miscellaneous taxes" 1 #f "" ((1990 "12"))))
+    (cons 'N1316 #(none "F1120S" "Licenses" 1 #f "" ((1990 "12"))))
+    (cons 'N1318 #(none "F1120S" "Interest expense" 1 #f "" ((1990 "13"))))
+    (cons 'N1319 #(none "F1120S" "Depletion" 1 #f "" ((1990 "15"))))
+    (cons 'N1321 #(none "F1120S" "Advertising" 1 #f "" ((1990 "16"))))
+    (cons 'N1323 #(none "F1120S" "Pension/profit-sharing/etc." 1 #f "" ((1990 "17"))))
+    (cons 'N1325 #(none "F1120S" "Employee benefit programs" 1 #f "" ((1990 "18"))))
+    (cons 'N1369 #(none "F1120S" "Meals and entertainment" 1 #f "" ((1990 "19"))))
+    (cons 'N1373 #(none "F1120S" "Other deductions" 1 #f "" ((1990 "19"))))
+
+    (cons 'N1275 #(none "F1120S" "Purchases" 1 #f "" ((1990 "A2"))))
+    (cons 'N1277 #(none "F1120S" "Cost of labor" 1 #f "" ((1990 "A3"))))
+    (cons 'N1279 #(none "F1120S" "Add'l section 263A costs" 1 #f "" ((1992 "A4") (1990 "A4a"))))
+    (cons 'N1295 #(none "F1120S" "Other costs" 1 #f "" ((1992 "A5") (1990 "A4b"))))
+
+    (cons 'N1494 #(none "F1120S" "Expenses-rental" 1 #f "" ((1990 "K3b"))))
+    (cons 'N1510 #(none "F1120S" "Charitable contributions" 1 #f "" ((2004 "K12a") (1990 "K7"))))
+    (cons 'N1512 #(none "F1120S" "Deds.-portfolio income (loss)" 1 #f "" ((2004 "K12b") (1990 "K9"))))
+    (cons 'N1519 #(none "F1120S" "Interest exp.-investment debts" 1 #f "" ((2005 "K12b") (2004 "K12c") (1990 "K11a"))))
+    (cons 'N1526 #(none "F1120S" "Sec. 59(e) expenses" 1 #f "" ((2005 "K12c") (2004 "K12d") (1992 "K16") (1990 "K16a"))))
+    (cons 'N1516 #(none "F1120S" "Other deductions" 1 #f "" ((2004 "K12e") (1990 "K10"))))
+    (cons 'N1523 #(none "F1120S" "Total foreign taxes" 1 #f "" ((2004 "K14m") (2003 "K14g") (2000 "K15f") (1990 "K15e"))))
+    (cons 'N1513 #(none "F1120S" "Reduction in available taxes" 1 #f "" ((2004 "K14n") (2003 "K14h") (2000 "K15g") (1990 "K15f"))))
+    (cons 'N1529 #(none "F1120S" "Nondeductible expenses" 1 #f "" ((2004 "K16c") (1992 "K19") (1990 "K18"))))
+    (cons 'N1530 #(none "F1120S" "Prop. distribs.(incl.cash)" 1 #f "" ((2004 "K16d") (1992 "K20") (1990 "K17"))))
+
+    (cons 'N1596 #(none "F1120S" "Depreciation per books" 1 #f "" ((1990 "M-1,3a&6a"))))
+    (cons 'N1597 #(none "F1120S" "Expenses on books not on return" 1 #f "" ((1990 "M-1,3"))))
+
+    (cons 'N418 #(not-impl "F4797" "Form 4797" 1 #f ""))
+    (cons 'N419 #(not-impl "F4797" "Long Term dep. loss - business" 5 #f "" ((1990 "2"))))
+    (cons 'N422 #(not-impl "F4797" "Long Term dep. loss - res. rent." 5 #f "" ((1990 "2"))))
+    (cons 'N421 #(not-impl "F4797" "Short Term dep. prop. - business" 5 #f "" ((1997 "10") (1992 "11") (1990 "10"))))
+    (cons 'N424 #(not-impl "F4797" "Short Term dep. prop. - res. rent." 5 #f "" ((1997 "10") (1992 "11") (1990 "10"))))
+
+    (cons 'N1384 #(parent "F8825" "Advertising – A" 1 #t "" ((1990 "3A"))))
+    (cons 'N1386 #(parent "F8825" "Auto and travel – A" 1 #t "" ((1990 "4A"))))
+    (cons 'N1388 #(parent "F8825" "Cleaning and maintenance – A" 1 #t "" ((1990 "5A"))))
+    (cons 'N1390 #(parent "F8825" "Commissions – A" 1 #t "" ((1990 "6A"))))
+    (cons 'N1392 #(parent "F8825" "Insurance – A" 1 #t "" ((1990 "7A"))))
+    (cons 'N1394 #(parent "F8825" "Legal and other prof. fees – A" 1 #t "" ((1990 "8A"))))
+    (cons 'N1396 #(parent "F8825" "Interest expense – A" 1 #t "" ((1990 "9A"))))
+    (cons 'N1398 #(parent "F8825" "Repairs – A" 1 #t "" ((1990 "10A"))))
+    (cons 'N1400 #(parent "F8825" "Taxes – A" 1 #t "" ((1990 "11A"))))
+    (cons 'N1402 #(parent "F8825" "Utilities – A" 1 #t "" ((1990 "12A"))))
+    (cons 'N1404 #(parent "F8825" "Wages and salaries – A" 1 #t "" ((1990 "13A"))))
+    (cons 'N1406 #(parent "F8825" "Other miscellaneous expenses – A" 1 #t "" ((1990 "15A"))))
+
+    (cons 'N1412 #(parent "F8825" "Advertising – B" 1 #t "" ((1990 "3B"))))
+    (cons 'N1414 #(parent "F8825" "Auto and travel – B" 1 #t "" ((1990 "4B"))))
+    (cons 'N1416 #(parent "F8825" "Cleaning and maintenance – B" 1 #t "" ((1990 "5B"))))
+    (cons 'N1418 #(parent "F8825" "Commissions – B" 1 #t "" ((1990 "6B"))))
+    (cons 'N1420 #(parent "F8825" "Insurance – B" 1 #t "" ((1990 "7B"))))
+    (cons 'N1422 #(parent "F8825" "Legal and other prof. fees – B" 1 #t "" ((1990 "8B"))))
+    (cons 'N1424 #(parent "F8825" "Interest expense – B" 1 #t "" ((1990 "9B"))))
+    (cons 'N1426 #(parent "F8825" "Repairs – B" 1 #t "" ((1990 "10B"))))
+    (cons 'N1428 #(parent "F8825" "Taxes – B" 1 #t "" ((1990 "11B"))))
+    (cons 'N1430 #(parent "F8825" "Utilities – B" 1 #t "" ((1990 "12B"))))
+    (cons 'N1432 #(parent "F8825" "Wages and salaries – B" 1 #t "" ((1990 "13B"))))
+    (cons 'N1434 #(parent "F8825" "Other miscellaneous expenses – B" 1 #t "" ((1990 "15B"))))
+
+    (cons 'N1439 #(parent "F8825" "Advertising – C" 1 #t "" ((1990 "3C"))))
+    (cons 'N1441 #(parent "F8825" "Auto and travel – C" 1 #t "" ((1990 "4C"))))
+    (cons 'N1443 #(parent "F8825" "Cleaning and maintenance – C" 1 #t "" ((1990 "5C"))))
+    (cons 'N1445 #(parent "F8825" "Commissions – C" 1 #t "" ((1990 "6C"))))
+    (cons 'N1447 #(parent "F8825" "Insurance – C" 1 #t "" ((1990 "7C"))))
+    (cons 'N1449 #(parent "F8825" "Legal and other prof. fees – C" 1 #t "" ((1990 "8C"))))
+    (cons 'N1451 #(parent "F8825" "Interest expense – C" 1 #t "" ((1990 "9C"))))
+    (cons 'N1453 #(parent "F8825" "Repairs – C" 1 #t "" ((1990 "10C"))))
+    (cons 'N1455 #(parent "F8825" "Taxes – C" 1 #t "" ((1990 "11C"))))
+    (cons 'N1457 #(parent "F8825" "Utilities – C" 1 #t "" ((1990 "12C"))))
+    (cons 'N1459 #(parent "F8825" "Wages and salaries – C" 1 #t "" ((1990 "13C"))))
+    (cons 'N1461 #(parent "F8825" "Other miscellaneous expenses – C" 1 #t "" ((1990 "15C"))))
+
+    (cons 'N1466 #(parent "F8825" "Advertising – D" 1 #t "" ((1990 "3D"))))
+    (cons 'N1468 #(parent "F8825" "Auto and travel – D" 1 #t "" ((1990 "4D"))))
+    (cons 'N1470 #(parent "F8825" "Cleaning and maintenance – D" 1 #t "" ((1990 "5D"))))
+    (cons 'N1472 #(parent "F8825" "Commissions – D" 1 #t "" ((1990 "6D"))))
+    (cons 'N1474 #(parent "F8825" "Insurance – D" 1 #t "" ((1990 "7D"))))
+    (cons 'N1476 #(parent "F8825" "Legal and other prof. fees – D" 1 #t "" ((1990 "8D"))))
+    (cons 'N1478 #(parent "F8825" "Interest expense – D" 1 #t "" ((1990 "9D"))))
+    (cons 'N1480 #(parent "F8825" "Repairs – D" 1 #t "" ((1990 "10D"))))
+    (cons 'N1482 #(parent "F8825" "Taxes – D" 1 #t "" ((1990 "11D"))))
+    (cons 'N1484 #(parent "F8825" "Utilities – D" 1 #t "" ((1990 "12D"))))
+    (cons 'N1486 #(parent "F8825" "Wages and salaries – D" 1 #t "" ((1990 "13D"))))
+    (cons 'N1488 #(parent "F8825" "Other miscellaneous expenses – D" 1 #t "" ((1990 "15D"))))
+
+    (cons 'N446 #(not-impl "Sched K-1" "Schedule K-1 Worksheet" 1 #t ""))
+    (cons 'N448 #(parent "Sched K-1" "Ordinary income or loss" 1 #t "" ((1990 "1"))))
+    (cons 'N449 #(parent "Sched K-1" "Rental RE income or loss" 1 #t "" ((1990 "2"))))
+    (cons 'N450 #(parent "Sched K-1" "Other rental income or loss" 1 #t "" ((1990 "3"))))
+    (cons 'N453 #(parent "Sched K-1" "Net ST capital gain or loss" 1 #t "" ((2004 "8") (2003 "4d2") (1990 "4d"))))
+    (cons 'N454 #(parent "Sched K-1" "Net LT capital gain or loss" 1 #t "" ((2004 "9a") (2003 "4e2") (2001 "4e1") (1997 "4e2") (1990 "4e"))))
+    (cons 'N674 #(none "Sched K-1" "28% rate gain(loss)" 1 #t "" ((2004 "9b") (2003 "25") (2001 "4e2") (1997 "4e1"))))
+    (cons 'N456 #(parent "Sched K-1" "Net Section 1231 gain or loss" 1 #t "" ((2004 "10") (2003 "6b") (1998 "6") (1997 "6b") (1990 "6"))))
+    (cons 'N676 #(none "Sched K-1" "Other Income (loss)" 1 #t "" ((2004 "11") (1990 "7"))))
+    (cons 'N679 #(none "Sched K-1" "Total Foreign Taxes" 1 #t "" ((2004 "16") (2001 "17g") (2000 "17f") (1990 "17e"))))
+   )
+  )
+ )
+)
+
+(define txf-asset-categories
+ (list
+  (cons 'F1040
+   (list
+    (cons 'N000 #(none "" "Tax Report Only - No TXF Export" 0 #f ""))
+
+    (cons 'N437 #(not-impl "F8606" "Form 8606" 1 #t ""))
+    (cons 'N440 #(none "F8606" "IRA basis at beg of year" 1 #t "" ((1993 "2") (1988 "3"))))
+    (cons 'N438 #(none "F8606" "IRAs value at end of year" 1 #t "" ((1993 "6") (1989 "1") (1988 "11") (1987 "8"))))
+
+    (cons 'N392 #(not-impl "HomeWks" "Home Sale Worksheets" 1 #t ""))
+    (cons 'N397 #(none "HomeWks" "Cost of new home" 1 #t "" ((2000 "11b")) 2000))
+   )
+  )
+  (cons 'F1065
+   (list
+    (cons 'N000 #(none "" "Tax Report Only - No TXF Export" 0 #f ""))
+
+    (cons 'N1864 #(none "F1065" "Cash" 1 #f "" ((1990 "L1"))))
+    (cons 'N1865 #(none "F1065" "Accts. Rec. and trade notes" 1 #f "" ((1990 "L2a"))))
+    (cons 'N1866 #(none "F1065" "Allowance for bad debts" 1 #f "" ((1990 "L2b"))))
+    (cons 'N1868 #(none "F1065" "U.S. government obligations" 1 #f "" ((1990 "L4"))))
+    (cons 'N1869 #(none "F1065" "Tax-exempt securities" 1 #f "" ((1990 "L5"))))
+    (cons 'N1870 #(none "F1065" "Other current assets" 1 #f "" ((1990 "L6"))))
+    (cons 'N1871 #(none "F1065" "Mortgage/real estate loans" 1 #f "" ((1990 "L7"))))
+    (cons 'N1872 #(none "F1065" "Other investments" 1 #f "" ((1990 "L8"))))
+    (cons 'N1873 #(none "F1065" "Buildings/oth. depr. assets" 1 #f "" ((1990 "L9a"))))
+    (cons 'N1874 #(none "F1065" "Accumulated depreciation" 1 #f "" ((1990 "L9b"))))
+    (cons 'N1875 #(none "F1065" "Depletable assets" 1 #f "" ((1990 "L10a"))))
+    (cons 'N1876 #(none "F1065" "Accumulated depletion" 1 #f "" ((1990 "L10b"))))
+    (cons 'N1877 #(none "F1065" "Land" 1 #f "" ((1990 "L11"))))
+    (cons 'N1878 #(none "F1065" "Intangible assets" 1 #f "" ((1990 "L12a"))))
+    (cons 'N1879 #(none "F1065" "Accumulated amortization" 1 #f "" ((1990 "L12b"))))
+    (cons 'N1880 #(none "F1065" "Other assets" 1 #f "" ((1990 "L13"))))
+   )
+  )
+  (cons 'F1120
+   (list
+    (cons 'N000 #(none "" "Tax Report Only - No TXF Export" 0 #f ""))
+
+    (cons 'N1172 #(none "F1120" "Cash" 1 #f "" ((1990 "L1"))))
+    (cons 'N1174 #(none "F1120" "Accts. Rec. and trade notes." 1 #f "" ((1990 "L2a"))))
+    (cons 'N1176 #(none "F1120" "Allowance for bad debts" 1 #f "" ((1990 "L2b"))))
+    (cons 'N1180 #(none "F1120" "U.S. government obligations" 1 #f "" ((1990 "L4"))))
+    (cons 'N1182 #(none "F1120" "Tax-exempt securities" 1 #f "" ((1990 "L5"))))
+    (cons 'N1184 #(none "F1120" "Other current assets" 1 #f "" ((1990 "L6"))))
+    (cons 'N1186 #(none "F1120" "Loans to stockholders" 1 #f "" ((1990 "L7"))))
+    (cons 'N1188 #(none "F1120" "Mortgage/real estate loans" 1 #f "" ((1990 "L8"))))
+    (cons 'N1190 #(none "F1120" "Other investments" 1 #f "" ((1990 "L9"))))
+    (cons 'N1192 #(none "F1120" "Buildings/oth. depr. assets" 1 #f "" ((1990 "L10a"))))
+    (cons 'N1194 #(none "F1120" "Accumulated depreciation" 1 #f "" ((1990 "L10b"))))
+    (cons 'N1196 #(none "F1120" "Depletable assets" 1 #f "" ((1990 "L11a"))))
+    (cons 'N1198 #(none "F1120" "Accumulated depletion" 1 #f "" ((1990 "L11b"))))
+    (cons 'N1200 #(none "F1120" "Land" 1 #f "" ((1990 "L12"))))
+    (cons 'N1202 #(none "F1120" "Intangible assets" 1 #f "" ((1990 "L13a"))))
+    (cons 'N1204 #(none "F1120" "Accumulated amortization" 1 #f "" ((1990 "L13b"))))
+    (cons 'N1206 #(none "F1120" "Other assets" 1 #f "" ((1990 "L14"))))
+   )
+  )
+  (cons 'F1120S
+   (list
+    (cons 'N000 #(none "" "Tax Report Only - No TXF Export" 0 #f ""))
+
+    (cons 'N1535 #(none "F1120S" "Cash" 1 #f "" ((1990 "L1"))))
+    (cons 'N1537 #(none "F1120S" "Accts. Rec. and trade notes" 1 #f "" ((1990 "L2a"))))
+    (cons 'N1539 #(none "F1120S" "Allowance for bad debts" 1 #f "" ((1990 "L2b"))))
+    (cons 'N1543 #(none "F1120S" "U.S. government obligations" 1 #f "" ((1990 "L4"))))
+    (cons 'N1545 #(none "F1120S" "Tax-exempt securities" 1 #f "" ((1990 "L5"))))
+    (cons 'N1547 #(none "F1120S" "Other current assets" 1 #f "" ((1990 "L6"))))
+    (cons 'N1549 #(none "F1120S" "Loans to shareholders" 1 #f "" ((1990 "L7"))))
+    (cons 'N1551 #(none "F1120S" "Mortgage/real estate loans" 1 #f "" ((1990 "L8"))))
+    (cons 'N1553 #(none "F1120S" "Other investments" 1 #f "" ((1990 "L9"))))
+    (cons 'N1555 #(none "F1120S" "Buildings/oth. depr. assets" 1 #f "" ((1990 "L10a"))))
+    (cons 'N1557 #(none "F1120S" "Accumulated depreciation" 1 #f "" ((1990 "L10b"))))
+    (cons 'N1559 #(none "F1120S" "Depletable assets" 1 #f "" ((1990 "L11a"))))
+    (cons 'N1561 #(none "F1120S" "Accumulated depletion" 1 #f "" ((1990 "L11b"))))
+    (cons 'N1563 #(none "F1120S" "Land" 1 #f "" ((1990 "L12"))))
+    (cons 'N1565 #(none "F1120S" "Intangible assets" 1 #f "" ((1990 "L13a"))))
+    (cons 'N1567 #(none "F1120S" "Accumulated amortization" 1 #f "" ((1990 "L13b"))))
+    (cons 'N1569 #(none "F1120S" "Other assets" 1 #f "" ((1990 "L14"))))
+   )
+  )
+ )
+)
+
+(define txf-liab-eq-categories
+ (list
+  (cons 'F1040
+   (list
+    (cons 'N000 #(none "" "Tax Report Only - No TXF Export" 0 #f ""))
+   )
+  )
+  (cons 'F1065
+   (list
+    (cons 'N000 #(none "" "Tax Report Only - No TXF Export" 0 #f ""))
+
+    (cons 'N1884 #(none "F1065" "Accounts payable" 1 #f "" ((1990 "L15"))))
+    (cons 'N1886 #(none "F1065" "S-T Mortgage/note/bonds pay." 1 #f "" ((1990 "L16"))))
+    (cons 'N1888 #(none "F1065" "Other current liabilities" 1 #f "" ((1990 "L17"))))
+    (cons 'N1890 #(none "F1065" "All nonrecourse loans" 1 #f "" ((1990 "L18"))))
+    (cons 'N1892 #(none "F1065" "L-T Mortgage/note/bonds pay." 1 #f "" ((1990 "L19"))))
+    (cons 'N1894 #(none "F1065" "Other liabilities" 1 #f "" ((1990 "L20"))))
+   )
+  )
+  (cons 'F1120
+   (list
+    (cons 'N000 #(none "" "Tax Report Only - No TXF Export" 0 #f ""))
+
+    (cons 'N1209 #(none "F1120" "Accounts payable" 1 #f "" ((1990 "L16"))))
+    (cons 'N1211 #(none "F1120" "S-T Mortgage/note/bonds pay." 1 #f "" ((1990 "L17"))))
+    (cons 'N1213 #(none "F1120" "Other current liabilities" 1 #f "" ((1990 "L18"))))
+    (cons 'N1215 #(none "F1120" "Loans from stockholders" 1 #f "" ((1990 "L19"))))
+    (cons 'N1217 #(none "F1120" "L-T Mortgage/note/bonds pay." 1 #f "" ((1990 "L20"))))
+    (cons 'N1219 #(none "F1120" "Other liabilities" 1 #f "" ((1990 "L21"))))
+    (cons 'N1221 #(none "F1120" "Capital Stock - Preferred Stk." 1 #f "" ((1990 "L22a"))))
+    (cons 'N1223 #(none "F1120" "Capital Stock - Common Stk." 1 #f "" ((1990 "L22b"))))
+    (cons 'N1225 #(none "F1120" "Paid-in or capital surplus" 1 #f "" ((1990 "L23"))))
+    (cons 'N1231 #(none "F1120" "Cost of Treasury stock" 1 #f "" ((1997 "L27") (1990 "L26"))))
+   )
+  )
+  (cons 'F1120S
+   (list
+    (cons 'N000 #(none "" "Tax Report Only - No TXF Export" 0 #f ""))
+
+    (cons 'N1573 #(none "F1120S" "Accounts payable" 1 #f "" ((1990 "L16"))))
+    (cons 'N1575 #(none "F1120S" "S-T Mortgage/note/bonds pay." 1 #f "" ((1990 "L17"))))
+    (cons 'N1577 #(none "F1120S" "Other current liabilities" 1 #f "" ((1990 "L18"))))
+    (cons 'N1579 #(none "F1120S" "Loans from shareholders" 1 #f "" ((1990 "L19"))))
+    (cons 'N1581 #(none "F1120S" "L-T Mortgage/note/bonds pay." 1 #f "" ((1990 "L20"))))
+    (cons 'N1583 #(none "F1120S" "Other liabilities" 1 #f "" ((1990 "L21"))))
+    (cons 'N1585 #(none "F1120S" "Capital stock" 1 #f "" ((1992 "L22") (1990 "L22a"))))
+    (cons 'N1587 #(none "F1120S" "Paid-in or capital surplus" 1 #f "" ((1990 "L23"))))
+    (cons 'N1591 #(none "F1120S" "Treasury stock" 1 #f "" ((1997 "L26") (1990 "L25"))))
+   )
+  )
+ )
+)

Modified: gnucash/trunk/src/tax/us/us.scm
===================================================================
--- gnucash/trunk/src/tax/us/us.scm	2009-11-11 21:17:32 UTC (rev 18412)
+++ gnucash/trunk/src/tax/us/us.scm	2009-11-15 20:35:50 UTC (rev 18413)
@@ -6,12 +6,20 @@
 (export gnc:txf-get-format)
 (export gnc:txf-get-multiple)
 (export gnc:txf-get-category-key)
+(export gnc:txf-get-line-data)
+(export gnc:txf-get-last-year)
 (export gnc:txf-get-help)
 (export gnc:txf-get-codes)
+(export gnc:txf-get-tax-entity-type)
+(export gnc:txf-get-tax-entity-type-description)
+(export gnc:txf-get-tax-entity-type-codes)
 (export gnc:txf-get-code-info)
 (export txf-help-categories)
+
 (export txf-income-categories)
 (export txf-expense-categories)
+(export txf-asset-categories)
+(export txf-liab-eq-categories)
 
 (load-from-path "txf.scm")
 (load-from-path "txf-help.scm")



More information about the gnucash-changes mailing list