Commit Graph
72 Commits
Author SHA1 Message Date
Alex Aycinena cb5e311a3f Revert visible changes to File->Properties for Book Currency from master in order to do further work in feature branch. 2017-07-22 12:53:54 -07:00
Alex Aycinena 48948c5ce6 Change test-gnc-ui-util.c and test-option-util.cpp so that test-app-utils passes during make check. 2017-07-13 12:52:02 -07:00
Alex Aycinena f3858fcd48 Revert changes to test-gnc-ui-util.c until I can get my system to test them. 2017-07-11 09:09:19 -07:00
Alex Aycinena fb609ff028 Fix error of incorrect argument passed to gnc_commodity_new. 2017-07-10 11:38:42 -07:00
Alex Aycinena 2020bee03b Book-Currency Feature step 6
Modify File->Properties dialog to maintain a default gain/loss account in a book KVP.

The changes made are:

	app-utils/app-utils.scm - define items related to book default gain/loss
        acct
	app-utils/business-prefs.scm - define items related to book default
        gain/loss acct;re-arrange sequence of options to make default (neither)
        first
    app-utils/gnc-ui-util.c - refine gnc_book_get_default_gains_policy to check
        for hidden and/or placeholder status
	app-utils/option-util.c & h - define items related to book default gain/loss
        acct
	app-utils/options.scm - add functionality related to book default gain/loss
        acct
    app-utils/test/test-gnc-ui-util.c - for gnc_book_get_default_gains_policy,
        add tests to check for hidden and/or placeholder status
	app-utils/test/test-option-util.cpp - add tests related to book default
        gain/loss acct
	engine/engine.i - define item related to book default gain/loss acct
	gnome-utils/dialog-options.c & h - add functionality related to book default
        gain/loss acct and rearrange dialog layout; make gain/loss acct widget
        refresh on account maintenance
    gnome-utils/gnc-main-window.c - only allow one book-option dialog if called
        from file->properties
	gnome-utils/gtkbuilder/dialog-options.glade - increase dialog height to
        accomodate book default gain/loss acct widget; add tooltip text for
        dialog buttons
    gnome/assistant-hierarchy.c - change sequence of pages: book options before
        currency selection; if book currency selected, currency also selected
    gnome/gtkbuilder/assistant-hierarchy.glade - increase dialog height to
        accomodate book default gain/loss acct widget
2017-07-09 12:19:36 -07:00
Alex Aycinena 3ded9f9b56 Book-Currency Feature step 5
Save a default gain/loss account in a book KVP and clean up some other book-currency items.

The changes made are:

	app-utils/gnc-ui-util.c & h - define new functions:
            gnc_book_get_book_currency_name,
            gnc_book_get_default_gain_loss_acct;
        reflect changed function names: qof_book_get_book_currency_name,
            gnc_valid_policy_name
	app-utils/options.scm - reflect changed function name: gnc-valid-policy-name
	app-utils/test/test-gnc-ui-util.c - include tests for gnc_book_get_default_gain_loss_acct;
        reflect changed function name: gnc_book_get_book_currency_name
	engine/policy-p.h - add policy name, description and hint to policy structure
	engine/policy.c & h - simplify gnc_get_valid_policy_list & define new functions:
            gnc_valid_policy, PolicyGetName, PolicyGetDescription,
            PolicyGetHint, xaccGetLIFOPolicy
	gnome-utils/dialog-options.c - conform to changes to gnc_get_valid_policy_list
        and use new function gnc_cost_policy_select_new
	gnome-utils/dialog-utils.c & h - define new function: gnc_cost_policy_select_new
	libqof/qof/qofbook.cpp & h - define new property: PROP_OPT_DEFAULT_GAINS_ACCOUNT_GUID
        and new function: qof_book_get_default_gain_loss_acct_guid
        changed function name: qof_book_get_book_currency_name
	libqof/qof/qofbookslots.h - define new option: OPTION_NAME_DEFAULT_GAINS_LOSS_ACCT_GUID
	libqof/qof/test/test-qofbook.c - reflect changed function names: qof_book_get_book_currency_name,
            gnc_valid_policy_name; add test for qof_book_get_default_gain_loss_acct_guid
2016-06-17 13:48:03 -07:00
Alex Aycinena 9f3dc0c826 Merge maint. 2016-06-06 16:28:04 -07:00
Alex Aycinena c0086e15e9 Partially revert commit B555f495 and solve problem more simply by instead resequencing prior statements. 2016-06-06 15:17:55 -07:00
Alex Aycinena d80bd0387d Remove semi-colon accidently left in prior commit. 2016-06-05 13:24:06 -07:00
Alex Aycinena 079257a074 Merge maint. The gnc_gui_refresh_all statement in gnc_book_options_dialog_apply_cb causes the 'apply' and 'OK' buttons to be set to sensitive on the open Book Options dialog in some circumstances; this commit causes them to be reset to insensitive, as they should be. 2016-06-05 13:21:30 -07:00
Alex Aycinena b555f49567 The gnc_gui_refresh_all statement in gnc_book_options_dialog_apply_cb causes the 'apply' and 'OK' buttons to be set to sensitive on the open Book Options dialog in some circumstances; this commit causes them to be reset to insensitive, as they should be. 2016-06-04 14:41:28 -07:00
Alex Aycinena 7a975e0ecd Allow panel that provides information about TXF categories to be adjusted by the user in the Income Tax Information dialog under Edit->Tax Report Options. 2016-01-07 17:23:34 -08:00
Alex Aycinena 3779eb64a9 Minor improvement to information provided about TXF categories in the Income Tax Information dialog under Edit->Tax Report Options. 2016-01-07 15:10:12 -08:00
Alex Aycinena 7e07e6ce9b Merge branch 'maint' 2015-08-19 11:18:35 -07:00
Alex Aycinena 18073f6163 Remove e-mail form AUTHORS and DOCUMENTERS 2015-08-19 11:13:22 -07:00
Alex Aycinena 558cae3d9c Book-Currency Feature step 4
Set feature flag if book-currency option selected and initiate registered
callbacks when currency accounting book option changes to book-currency so that registers/reports can update themselves.

The changes made are:

    app-utils/gnc-ui-util.c & h - define gnc_book_option_book_currency_selected_cb
    core-utils/gnc-features.c & h - define GNC_FEATURE_BOOK_CURRENCY
    engine/engine-helpers.c & h - define gnc_book_option_book_currency_selected
        to call registered callbacks and set feature
    gnome-utils/gnc-main-window.c & h - add checking of book-currency option to
        gnc_book_options_dialog_apply_cb function; refactor common code with
        assistant-hiearchy.c by creating gnc_book_options_dialog_apply_helper
    gnome/assistant-hierarchy.c - use gnc_book_options_dialog_apply_helper
2015-08-13 17:16:02 -07:00
Alex Aycinena 6c2c1ce3d3 Merge branch 'maint' 2015-08-10 12:17:02 -07:00
Alex Aycinena e47cc8ff13 Correct wording on AUTHORS and DOCUMENTERS 2015-08-10 12:01:01 -07:00
Alex Aycinena 5fdf14f8cb Book-Currency Feature Step 3
Add an option to the File->Properties dialog to select a Currency Accounting Method, and to specify the book-currency and a default gains/loss policy if the 'book-currency' method is selected.
Revert some changes made in prior commits. Other than storing and retrieving the
book-currency and policy in book KVPs, the behavior of gnucash has not been
affected by these changes. The changes made are:

     engine/policy.c & .h - define valid policies and their descriptions
         and hints; define functions gnc_get_valid_policy_list and
         gnc_valid_policy
     engine/engine.i - include policy.h; define 'CURRENCY-ACCOUNTING',
         'BOOK-CURRENCY', and 'DEFAULT-GAINS-POLICY' as option names
     engine/test/utest-Split.cpp - revert prior commit that modified test
         function for trading accounts
     engine/test/utest-Transaction.c - revert prior commit that modified test
         function for trading accounts
     libqof/qof/qofbookslots.h - revert prior commit that defined Currency
         Accounting Method; modify definitions of Currency Accounting and Book
         Currency; add definition of default gains policy; keep the previous
         Trading Accounts definition
     libqof/qof/qofbook.cpp & .h - reverted function to determine currency
         accounting method; add function to get book-currency, revert
         previously committed changes to function to determine if book uses
         trading accounts; add function to get gains policy; modify gobject
         properties accordingly
     libqof/qof/test/test-qofbook.c - revert prior modification to test
         function for trading accounts; define tests for book-currency and
         default gains policies
     app-utils/options.scm - define make-currency-accounting-option and
         required support functions
     app-utils/options-util.c & .h - make support functions of
         make-currency-accounting-option available in c code
     app-utils/test/test-options-util.c - include tests for using book-currency
     app-utils/gnc-ui-util.c & .h - define gnc_book_use_book_currency,
         gnc_book_get_book_currency and gnc_book_get_default_gains_policy
         functions
     app-utils/test/test-gnc-ui-util.c - set up tests for new gnc-ui-util
         functions
     app-utils/test/test-app-utils.c - include test-gnc-ui-util.c
     app-utils/test/Makefile.am - include test-gnc-ui-util.c
     app-utils/app-utils.scm - define and export book options for Currency
         Accounting, Book-Currency and Default Gains Policy; export required
         currency-accounting-option support functions
     app-utils/business-prefs.scm - replace the Trading Accounts boolean option
         with a currency-accounting-option and rearrange the order of the
         options
     gnome-utils/dialog-options.c - define functions for set-ui-widget,
         set-ui-value, and get-ui-value for 'currency-accounting' option and
         various other support functions
2015-06-27 16:06:56 -07:00
Alex Aycinena becec4022b Bug 740955 - Correct general journal and general ledger reports to properly handle Use-Split-Action-For-Num option in File->Properties. 2015-04-08 12:13:55 -07:00
Alex Aycinena 906ed1fe26 Book-Currency Feature step 2
Store the book-currency in the book KVP. The changes made are:

     libqof/qof/qofbookslots.h - define a Book Currency option in addition to
         the Currency Accounting Method option previously defined
     libqof/qof/qofbook.cpp & .h - define function to get book-currency and add
         gobject properties accordingly
     libqof/qof/test/test-qofbook.c - add to test function for book-currency
         accounting method to also test for a specified book-currency
2015-02-28 16:39:34 -08:00
Alex Aycinena e814221efc Merge branch 'maint' 2015-02-23 18:26:47 -08:00
Alex Aycinena 80705551ae Correct the number field displayed in the reconcile window to correspond with the source specified in File->Options. 2015-02-23 18:04:50 -08:00
Alex Aycinena b22c6b6eb9 Book-Currency Feature step 1
The changes made are:

     libqof/qof/qofbookslots.h - define Currency Accounting Method option; keep
         the current Trading Accounts option (in order to read prior files)
     libqof/qof/qofbook.cpp & .h - define function to determine if book uses
         book-currency, modify function to determine if book uses trading
         accounts and add gobject properties accordingly
     libqof/qof/test/test-qofbook.c - define test function to determine if book
         uses book-currency and modify test function for trading accounts
     engine/test/utest-Split.cpp - modify test function for trading accounts
         to use new "currency-accounting" and "trading" book properties
     engine/test/utest-Transaction.c - modify test function for trading accounts
         to use new "currency-accounting" and "trading" book properties
2015-02-09 12:52:29 -08:00
Alex Aycinena 80aa327ab2 Merge branch 'maint' 2014-09-06 16:50:58 -07:00
Alex Aycinena 9ea36d7e96 Correct txf output to use a minus sign, rather than parenthesis, for debits, without regard to locale settings, as is required by the txf pseudo-standard; was previously incorrectly using parenthesis for negatives in Windows environments, for example. 2014-09-06 16:15:34 -07:00
J. Alex Aycinena 46233ea56c Update txf.scm for 2013 US Income Tax for,/schedule changes
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23680 57a11ea4-9604-0410-9ed3-97b8803252fd
2014-01-11 07:23:41 +00:00
J. Alex Aycinena 814947c583 Vary some menu labels and tooltips based on cursor class: transaction or split.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22862 57a11ea4-9604-0410-9ed3-97b8803252fd
2013-04-02 00:49:19 +00:00
J. Alex Aycinena 3b9a438507 Replace GtkLabel with a GtkTextView within a GtkScrolledWindow for error summary for csv account import so that window doesn't get larger than screen with large error messages.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22814 57a11ea4-9604-0410-9ed3-97b8803252fd
2013-02-27 23:31:35 +00:00
J. Alex Aycinena 81cadea035 Update taxtxf.scm to fix beginning balance sign and signs for Transfer From/To amounts for
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22780 57a11ea4-9604-0410-9ed3-97b8803252fd
2013-02-16 22:50:01 +00:00
J. Alex Aycinena c295ef3d28 Update txf.scm to reflect changes to US Income Tax Forms and Schedules for 2012.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22753 57a11ea4-9604-0410-9ed3-97b8803252fd
2013-02-05 00:35:40 +00:00
J. Alex Aycinena ced147f641 Remove circular dependency introduced in r22681
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22717 57a11ea4-9604-0410-9ed3-97b8803252fd
2013-01-19 23:29:35 +00:00
J. Alex Aycinena 7cdd7372f5 Implement a Book Option to give users the choice to use the transaction number field (default and current behaviour) or, alternatively, the split action field of the anchor split for 'Num' column on registers, reports, import and export, where applicable. The difference between the two is that with the default, the same 'Num' is displayed for a given transaction regardless of what register it is viewed in and with the new option, a different 'Num' can be entered/displayed for a given transaction in each register it is viewed in. In both cases, the 'next number logic' of the 'Num' cell is based on the account of the register the transaction is entered/viewed from but in one case it fills the transaction number, in the other, it fills the split action field of the anchor split (with the transaction number field displayed in the register cell labeled 'T-Num'). In both cases, both fields are visible and can be used as free-form text in double-line mode for any value the user wants. If the new option is not selected, there should be no change in Gnucash's behaviour with the exception of displaying the book options dialog in 'new book' situations.
The changes made are:

1.  Implement the new book option to select source for 'num' cell:
     libqof/qof/qofbookslots.h - define num source option
     engine/engine.i - define 'NUM-FIELD-SOURCE' as an option name and
         'SPLIT-ACTION' as a term for sorting queries
     app-utils/business-prefs.scm - define book option for num-field-source
     app-utils/app-utils.scm - define and export book option for num-field-source

2.  Implement functions to get book option setting and to test:
     libqof/qof/qofbook.c & .h - define function to get number source book option
     libqof/qof/test/test-qofbook.c - test function to get number source book option

3.  Implement a notification mechanism for book option changes:
     engine/engine-helpers.c & .h - define functions to register callbacks,
         define function to remove callbacks and
         define function to initiate callbacks on book num-source option changes
     core-utils/gnc-features.c & .h - define feature for num-source
     app-utils/gnc-ui-util.c & .h - define gnc_book_option_num_field_source_change_cb;
         include setting of feature flag on initial use
     gnome-utils/gnc-main-window.c - change name of gnc_options_dialog_apply_cb
         function to gnc_book_options_dialog_apply_cb and adjust function to 
         call function gnc_book_option_num_field_source_change_cb when book
         option for num-field-source changes; change name of
         gnc_options_dialog_close_cb to gnc_book_options_dialog_close_cb

4.  Implement 'help' button response on Book Option Dialog:
     gnome-utils/gnc-ui.h - define "book-options" section of help manual
     gnome-utils/gnc-gnome-utils.c & .h - implement Book Options help callback
     gnome-utils/gnc-main-window.c - use gnc_options_dialog_set_book_options_help_cb
         to make help button active

5.  Implement utility functions to get/set number/action based on book option:
     engine/engine-helpers.c & .h - define 'gnc_get_num_action' function
         define 'gnc_get_action_num' function
         define 'gnc_set_num_action' function
     engine/engine.i - make get/set num/action functions available to guile &
         allow #f to be used in place of NULL from guile
     engine/Transaction.h - add reference to utility functions in comments to 
         xaccTransSetNum and xaccTransGetNum functions
     engine/Split.h -  add reference to utility functions in comments to 
         xaccSplitSetAction and xaccSplitGetAction functions

6.  Implement register use of num source book option; for General, Income and Search
    Ledgers, since there is no anchor split, always show tran-num in transaction
    cursor, but vary label to correspond to book option:
     register/ledger-core/split-register.h - define TNUM_CELL
         define CURSOR_DOUBLE_LEDGER_NUM_ACTN cursor name to use TNUM_CELL
         define CURSOR_DOUBLE_JOURNAL_NUM_ACTN cursor name to use TNUM_CELL
         add boolean to split_reg structure to hold num source book option
     register/ledger-core/split-register-layout.c -
         add logic to define and set up new ledger/journal cursors with TNUM_CELLs
         add logic to add the new cursors to a layout
         add logic to add TNUM_CELL to a layout
     register/ledger-core/split-register-model.c -
         define function to get TNUM_CELL label
         add logic to recognize ledger/journal cursors with TNUM_CELL
         modify function to get NUM_CELL value based on book option and register
             type
         define function to get TNUM_CELL value
         adjust num help text to reflect book option choice
         define function to get TNUM_CELL help
         modify function to get action help to reflect book option choice
         set up handlers for TNUM_CELL
     register/ledger-core/split-register-model-save.c -
         use 'gnc_set_num_action' function to set num/action for NUM_CELL based
             on book option
         define function to save TNUM_CELL using 'gnc_set_num_action' function
         set save handler for TNUM_CELL
     register/ledger-core/split-register-util.c - 
         modify logic to recognize ledger/journal cursors with tnum_cell
     register/ledger-core/split-register.c -
         define split_register_book_option_changed function
         register split_register_book_option_changed function in register init
         initialize register structure setting to book option
         remove split_register_book_option_changed function in register destroy
         modify gnc_split_register_save_to_scm to handle TNUM_CELL

7.  Enhance transaction copy/duplicate logic to accommodate new book option:
     gnome/gtkbuilder/gnc-plugin-page-register.glade -
         add widgets to handle trans number and/or split action based on book option
     gnome-utils/dialog-dup-trans.c & .h -
         add capability to display and handle 'Num' field according to book option
     gnome/gnc-plugin-page-register.c - define gnc_find_register_by_account
     register/ledger-core/split-register.c -
         modify gnc_split_register_duplicate_current to accomodate book option
         setting
     register/ledger-core/Makefile.am - add GNOME_CFLAGS
     register/ledger-core/test/Makefile.am - add libgnc-gnome.la

8.  Adjust register sort and sort labels related to Num/Action radio buttons to
    correspond to book option for clarity:
     gnome/gnc-plugin-page-register.c -
         define gnc_plugin_page_register_sort_book_option_changed to adjust labels
         register function in gnc_plugin_page_register_cmd_view_sort_by
             and save num and action radio widgets
         initialize radio widget labels to correspond to book option
         remove function in gnc_plugin_page_register_sort_response_cb
             and clear num and action radio widgets
     gnome/gnc-split-reg.c & h. - 
         create versions of gnc_split_reg_sort and gnc_split_reg_set_sort to force
             a re-sort to be used when num-source book option changes
     engine/Transaction.c & .h -
         modify default sort to use split action in place of tran num per book
             option if called from xaccSplitOrder
     engine/Split.c - 
         modify xaccSplitOrder to call xaccTransOrder_num_action to switch use of
             split action and tran num per book option
     engine/test/utest-Split.c -
         modify test_xaccSplitOrder to call xaccTransOrder_num_action based on
             book option

9.  Adjust transaction find labels related to Num/Action to correspond to book option
    for clarity:
     gnome/dialog-find-transactions.c - adjust labels in search criteria based
         on book option
     gnome-search/dialog-search.c -
         define gnc_search_dialog_book_option_changed to adjust labels
         register function in gnc_search_dialog_init_widgets when searching
             for splits
         remove function in gnc_search_dialog_close_cb if registered

10. Modify new file process to allow setting of num-source (actually, all) book
    option(s) during New Account Hierarchy Setup:
     gnome-utils/gtkbuilder/dialog-preferences.glade - add a user preference for
         the default setting for 'num-source' for new books
     core-utils/gnc-gconf-utils.h - define KEY_NUM_SOURCE
     gnome-utils/gnc-gnome-utils.c & h. -
         define gnc_options_dialog_set_new_book_option_values to retrieve
         preference values
     gnome-utils/dialog-options.c & .h - define gnc_options_dialog_new_modal to
         surpress apply button
     gnome-utils/gnc-main-window.c - define function gnc_book_options_dialog_cb
         with arguments so that the window can be called in modal mode and the
         title changed and return dialog widget; call gnc_options_dialog_new_modal
         instead of gnc_options_dialog_new; call this function from
         gnc_main_window_cmd_file_properties with new arguments; for modal mode,
         call gnc-options-dialog-set-new-book-option-values to initialize values
         from preferences
     app-utils/gnc-ui-util.c & h. - create function gnc_is_new_book for
         determining when a new book is being created
     gnome-utils/dialog-utils.c & h. - define gnc_new_book_option_display to
         display book options dialog in modal mode
     gnome/gtkbuilder/assistant-hierarchy.glade - add notification about book
         options to currency page
     gnome/assistant-hierarchy.c - add ability to set book option initialized
         from preferences value for new books by using functions gnc_is_new_book
         and gnc_new_book_option_display

11. Modify Import QIF process to recognize a new-book situation and allow setting
    of book options during first import into a new book; also follow book option
    setting for num source in importing number whether new book or not:
     import-export/qif-import/assistant-qif-import.glade - add notification about
         book options to currency page
     import-export/qif-import/assistant-qif-import.c - using function
         gnc_is_new_book to identify 'new book' situation and set flag; add
         logic to handle 'new-book' situation by calling
         gnc_new_book_option_display function
     import-export/qif-import/qif-to-gnc.scm - use 'gnc_set_num_action' function
         to import number to correct field based on book option

12. Modify Import OFX/QFX process to recognize a new-book situation and allow setting
    of book options during first import into a new book; also follow book option
    setting for num source in importing number whether new book or not:
     import-export/ofx/gnc-ofx-import.c - use 'gnc_set_num_action' function to import
         number based on book option; identify 'new book' situation using function
         gnc_is_new_book and set flag; add logic to handle 'new-book' situation
         by raising book options dialog by calling gnc_new_book_option_display
         function
     import-export/import-backend.c - use 'gnc_get_num_action' function to 
         retrieve number from transactions to be matched based on book option

13. Modify Import AqBanking process to recognize a new-book situation and allow
    setting of book options during first import into a new book; also follow
    book option setting for num source in importing number:
     import-export/aqbanking/gnc-file-aqb-import.c - identify 'new book'
         situation using function gnc_is_new_book and handle by raising book
         options dialog by calling gnc_new_book_option_display function
     import-export/aqbanking/gnc-ab-utils.c - use 'gnc_set_num_action' function
         to set number based on book option

14. Modify Import Transactions from CSV process to recognize a new-book situation
    and allow setting of book options during first import into a new book; also
    follow book option setting for num source in importing number whether new
    book or not:
     import-export/csv-import/assistant-csv-trans-import.glade - modify
         commments to alert user of raising book options dialog in cases of csv
         import into a new book
     import-export/csv-import/gnc-csv-model.c & h. - use 'gnc_set_num_action'
         function to import number based on book option
     import-export/csv-import/assistant-csv-trans-import.c - add logic to handle
         'new-book' situation by raising book options dialog by calling
         gnc_new_book_option_display function; identify 'new book' situation
         using function gnc_is_new_book and set flag

15. Modify Import Accounts from CSV process to recognize a new-book situation
    and allow setting of book options during first import into a new book
     import-export/csv-import/assistant-csv-account-import.c & .h - add logic to
         handle 'new-book' situation by raising book options dialog by calling
         gnc_new_book_option_display function; identify 'new book' situation
         using function gnc_is_new_book and set flag

16. Modify Export Transactions to CSV process to follow book option setting
    for num source in exporting transactions:
     import-export/csv-export/csv-transactions-export.c - modify headings to
         reflect num-source book option and use 'gnc_get_num_action' function
         to retrieve number and action

17. Modify register reporting to reflect book option setting for num source:
     gnome/gnc-plugin-page-register.c - determine and pass along ledger-type?
         argument to gnc:register-report-create function
     gnome/gnc-plugin-page-register2.c - determine and pass along ledger-type?
         argument to gnc:register-report-create function
     report/standard-reports/standard-reports.scm - add ledger-type? argument
         to gnc:register-report-create function; pass it along to
         gnc:register-report-create-internal function
     report/standard-reports/register.scm - add ledger-type? argument to
         gnc:register-report-create-internal function; use 'gnc-get-num-action'
         function in place of xaccTransGetNum and 'gnc-get-action-num' function
         in place of xaccSplitGetAction and modify report headings and option
         text accordingly

18. Modify all places that use xaccTransSetNum and/or xaccSplitSetAction to use
    'gnc_set_num_action' function to set number based on book option except
    engine/Transaction.c & .h, engine/test-core/test-engine-stuff.c,
    engine/Split.c & .h, engine/test/utest-Split.c, engine/engine-helpers.c & .h,
    engine/engine-interface.scm, backend/xml/gnc-transaction-xml-v2.c,
    backend/xml/io-gncxml-v1.c, import-export/log-replay/gnc-log-replay.c:
     engine/gncOwner.c - use 'gnc_set_num_action' function to set number based
         on book option
     engine/gncInvoice.c - use 'gnc_set_num_action' function to set number based
         on book option
     engine/SchedXaction.c - use 'gnc_set_num_action' function to set number and
         action
     engine/cap-gains.c - use 'gnc_set_num_action' function to set split-action
     gnome-utils/dialog-transfer.c - use 'gnc_set_num_action' function to set
         number based on book option
     gnome-utils/gnc-tree-view-split-reg.c - use 'gnc_set_num_action' function
         to set number/action based on book option
     gnome/assistant-stock-split.c - use 'gnc_set_num_action' function to set
         split-action

19. Modify all places that use xaccTransGetNum and/or xaccSplitGetAction to use
    'gnc_get_num_action' or 'gnc_get_action_num' functions to get number based
    on book option except engine/Transaction.c & .h,
    engine/test-core/test-engine-stuff.c, engine/Split.c & h.,
    engine/test/utest-Split.c, engine/engine-helpers.c,
    engine/engine-interface.scm, backend/xml/gnc-transaction-xml-v2.c,
    backend/xml/test/test-xml-transaction.c:
     gnome/dialog-lot-viewer.c - use 'gnc_get_num_action' function to retrieve
         number based on book option
     gnome/dialog-sx-from-trans.c - use 'gnc_get_num_action' function to
         retrieve number and action
     gnome/dialog-print-check.c - use 'gnc_get_num_action' function to
         retrieve number and 'gnc_get_action_num' function to retrieve action
     register/ledger-core/split-register-model.c - use 'gnc_get_num_action'
         function to retrieve number based on book option
     register/ledger-core/split-register-load.c - use 'gnc_get_num_action'
         function to retrieve number based on book option
     register/ledger-core/split-register-control.c - use 'gnc_get_num_action'
         function to retrieve action
     register/ledger-core/split-register.c - use 'gnc_get_num_action'
         function to retrieve transaction-num 
     engine/cap-gains.c - use 'gnc_get_num_action' function to get split-action
     gnome-utils/gnc-tree-view-split-reg.c - use 'gnc_get_num_action' function
         to retrieve number and 'gnc_get_action_num' function to retrieve action
     gnome-utils/gnc-tree-model-split-reg.c - use 'gnc_get_num_action' function
         to retrieve transaction-number but may not be getting what is expected
         if book option to use split-action for 'num' is set
     report/locale-specific/us/taxtxf.scm - use 'gnc-get-num-action' function in
         place of xaccTransGetNum and 'gnc-get-action-num' function in place of 
         xaccSplitGetAction and modify report headings and option text accordingly
     report/standard-reports/transaction.scm - use 'gnc-get-num-action' function
         in place of xaccTransGetNum, adjust sorting based on book option and
         modify report headings and option text accordingly; add 'SPLIT-ACTION'
         as a term for sorting queries
     report/business-reports/customer-summary.scm - use 'gnc-get-num-action'
         function in place of xaccTransGetNum
     report/business-reports/owner-report.scm - use 'gnc-get-num-action'
         function in place of xaccTransGetNum
     report/business-reports/job-report.scm - use 'gnc-get-num-action' function
         in place of xaccTransGetNum
     business/business-gnome/dialog-payment.c - use 'gnc_get_num_action'
         function to retrieve number based on book option


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22681 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-12-22 06:00:54 +00:00
J. Alex Aycinena 91f76f4eea Correct error in search dialog where results sub-window(s) is(are) erroneously created.
To reproduce the error, open Gnucash (for example with --nofile argument), open a Find Transactions dialog (Edit->Find), open a Find Customer dialog (Business->Customer->Find Customer), open a Gnucash Preferences dialog (Edit->Preferences) and change some preference (for example, under the Register tab, select Use system theme colors). Each time a preference is changed the Find dialogs get wider as a new results sub window is created and added to the dialog. This happens because any time gnc_gui_refresh_all is called, which is the case when a preference is changed, and on other occasions as well, the refresh_handler in dialog-search.c is called for any open search dialog which calls gnc_search_dialog_display_results which, in turn, erroneously creates and adds the sub window. If the search dialog was initially created with a result_cb, as is the case for Find Transactions, the results sub window should never be created. If it was not, as is the case with Find Customer and all other calls, only one sub window should be created per dialog and it should only be refreshed if it already exists.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22387 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-09-14 22:12:02 +00:00
J. Alex Aycinena a401751448 Add ability to import a csv column to 'notes' field; fix 'OK' and 'New Account' button widths
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22271 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-07-25 22:28:53 +00:00
J. Alex Aycinena 9fa5035107 Remove g_free of msg two lines before it is returned from function.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22204 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-06-01 22:59:48 +00:00
J. Alex Aycinena 365be68a84 Properly handle Windos end-of-line markers in determining xml file versions.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22038 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-02-15 23:14:58 +00:00
J. Alex Aycinena f6a3b152fd Add to the includes in Makefile.am, which were implicitly included by until taken out in r21880; this gets make check complete
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@21910 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-01-29 06:32:09 +00:00
J. Alex Aycinena 7c03e237b2 Update xml file backend to recognize a newer version file on load attempt, not load, and alert user of need to upgrade Gnucash.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@21908 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-01-29 01:12:30 +00:00
J. Alex Aycinena 8a2f3a7152 Update txf.scm to reflect changes to US Income Tax Forms and Schedules for 2011.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@21889 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-01-26 00:09:51 +00:00
J. Alex Aycinena 8668a07796 Correct memory leak found with Valgrind.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@20886 57a11ea4-9604-0410-9ed3-97b8803252fd
2011-07-10 02:02:38 +00:00
J. Alex Aycinena 920176bca2 Reverse changeset 20663; wrong place to correct memory leak found with Valgrind.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@20809 57a11ea4-9604-0410-9ed3-97b8803252fd
2011-07-01 03:50:58 +00:00
J. Alex Aycinena ceb3097728 Correct memory handling of scm_to_locale_string per guile manual
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@20763 57a11ea4-9604-0410-9ed3-97b8803252fd
2011-06-16 00:11:18 +00:00
J. Alex Aycinena 75c97e4705 Correct memory handling of scm_to_locale_string per guile manual
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@20758 57a11ea4-9604-0410-9ed3-97b8803252fd
2011-06-13 04:42:27 +00:00
J. Alex Aycinena 61208eb617 Correct memory handling of scm_to_locale_string per guile manual
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@20757 57a11ea4-9604-0410-9ed3-97b8803252fd
2011-06-13 03:49:50 +00:00
J. Alex Aycinena 3e258a2b39 Correct memory handling of scm_to_locale_string per guile manual
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@20756 57a11ea4-9604-0410-9ed3-97b8803252fd
2011-06-13 03:11:59 +00:00
J. Alex Aycinena f8c342413b Correct memory handling of scm_to_locale_string per guile manual
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@20755 57a11ea4-9604-0410-9ed3-97b8803252fd
2011-06-13 01:05:41 +00:00
J. Alex Aycinena 6e3ac5d193 Correct memory handling of scm_to_locale_string per guile manual
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@20744 57a11ea4-9604-0410-9ed3-97b8803252fd
2011-06-09 22:40:54 +00:00
J. Alex Aycinena 8d57666936 Correct memory leak found with valgrind
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@20743 57a11ea4-9604-0410-9ed3-97b8803252fd
2011-06-09 21:43:36 +00:00
J. Alex Aycinena f311fe5fd2 Correct memory leaks found with valgrind
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@20741 57a11ea4-9604-0410-9ed3-97b8803252fd
2011-06-09 00:29:41 +00:00
J. Alex Aycinena 60aa509039 Fix memory leaks found with valgrind
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@20739 57a11ea4-9604-0410-9ed3-97b8803252fd
2011-06-08 16:46:32 +00:00
J. Alex Aycinena b3779bb878 Correct memory leak found with Valgrind.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@20735 57a11ea4-9604-0410-9ed3-97b8803252fd
2011-06-04 03:37:38 +00:00
J. Alex Aycinena e6574c37e8 Correct memory leak found with Valgrind.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@20734 57a11ea4-9604-0410-9ed3-97b8803252fd
2011-06-03 23:54:55 +00:00
J. Alex Aycinena b83e53a9c5 Correct memory leak found with Valgrind.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@20733 57a11ea4-9604-0410-9ed3-97b8803252fd
2011-06-03 08:24:27 +00:00
J. Alex Aycinena 981bbfd6cc Correct memory leak found with Valgrind.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@20719 57a11ea4-9604-0410-9ed3-97b8803252fd
2011-05-29 03:23:05 +00:00
J. Alex Aycinena 9f6080b566 Correct memory leak found with Valgrind.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@20718 57a11ea4-9604-0410-9ed3-97b8803252fd
2011-05-28 23:32:33 +00:00
J. Alex Aycinena 186a7e621c Correct memory leak found with Valgrind.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@20687 57a11ea4-9604-0410-9ed3-97b8803252fd
2011-05-23 22:26:34 +00:00
J. Alex Aycinena 9b0f629718 Correct memory leak found with Valgrind.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@20663 57a11ea4-9604-0410-9ed3-97b8803252fd
2011-05-19 23:20:23 +00:00
J. Alex Aycinena 96d93595f6 Correct memory leaks found with Valgrind.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@20659 57a11ea4-9604-0410-9ed3-97b8803252fd
2011-05-18 23:06:09 +00:00
J. Alex Aycinena fdf8346f0b Correct memory leaks found with Valgrind.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@20645 57a11ea4-9604-0410-9ed3-97b8803252fd
2011-05-15 00:37:03 +00:00
J. Alex Aycinena 0e2a9d1f55 Correct memory leaks found with Valgrind.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@20644 57a11ea4-9604-0410-9ed3-97b8803252fd
2011-05-14 16:17:07 +00:00
J. Alex Aycinena c370528908 Correct memory leaks found with Valgrind.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@20631 57a11ea4-9604-0410-9ed3-97b8803252fd
2011-05-11 22:17:56 +00:00
J. Alex Aycinena b8e8f51330 Improve txf scheme routines to handle invalid tax-entity-types more gracefully.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@20611 57a11ea4-9604-0410-9ed3-97b8803252fd
2011-05-06 00:02:54 +00:00
J. Alex Aycinena 32dd7413dd Add validation of tax-entity-type in book relative to locale-based tsx.scm
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@20608 57a11ea4-9604-0410-9ed3-97b8803252fd
2011-05-03 00:06:11 +00:00
J. Alex Aycinena 556a70b9a8 Correct memory leaks found with valgrind
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@20405 57a11ea4-9604-0410-9ed3-97b8803252fd
2011-03-12 21:48:16 +00:00
J. Alex Aycinena 4516270399 Correct memory leaks found with valgrind
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@20378 57a11ea4-9604-0410-9ed3-97b8803252fd
2011-03-05 23:29:12 +00:00
J. Alex Aycinena c17a907f08 Correct memory leak found with valgrind
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@20364 57a11ea4-9604-0410-9ed3-97b8803252fd
2011-03-03 00:30:10 +00:00
J. Alex Aycinena 1b9023e78f Modify Tax Info on Account Page to display or not display sub-account info based on whether row is expanded.
Re-apply changes reverted in r20251. The only difference between this commit and r20207 is that, contrary to the recommendation given in gnc-tree-view.h, "Use GNC_TREE_VIEW_COLUMN_DATA_NONE if you plan on using a non-model data source for this column", it cobtinues to use "GNC_TREE_MODEL_ACCOUNT_COL_TAX_INFO". Using "GNC_TREE_VIEW_COLUMN_DATA_NONE" generates problems later in the "gnc_tree_view_add_text_column" routine when it tries to set up sorting for the column ("CRIT <Gtk> gtk_tree_sortable_set_sort_func: assertion `sort_column_id >= 0' failed").

Define a new column, GNC_TREE_MODEL_ACCOUNT_COL_TAX_INFO_SUB_ACCT, in gnc-tree-model-account.c filled with gnc_ui_account_get_tax_info_sub_acct_string.

Modify gnc-tree-view-account.c to define a tax_info_data_func that displays only the the data in the GNC_TREE_MODEL_ACCOUNT_COL_TAX_INFO model column if the row is expanded; otherwise it combines it with the data in the GNC_TREE_MODEL_ACCOUNT_COL_TAX_INFO_SUB_ACCT model column. Modily the view creation function to use the new tax_info_data_func for the text after having first set it to GNC_TREE_MODEL_ACCOUNT_COL_TAX_INFO to prevent the problem mentioned above, thereby overriding it.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@20359 57a11ea4-9604-0410-9ed3-97b8803252fd
2011-03-01 23:09:37 +00:00
J. Alex Aycinena 9968d038a2 Modify Tax Info on Account Page to display or not display sub-account info based on whether row is expanded.
Revert changes made in gnc-ui-util.c in rev 20039 and instead put those changes in new function: gnc_ui_account_get_tax_info_sub_acct_string.

Define a new column, GNC_TREE_MODEL_ACCOUNT_COL_TAX_INFO_SUB_ACCT, in gnc-tree-model-account.c filled with gnc_ui_account_get_tax_info_sub_acct_string.

Modify gnc-tree-view-account.c to define a tax_info_data_func that displays only the the data in the GNC_TREE_MODEL_ACCOUNT_COL_TAX_INFO model column if the row is expanded; otherwise it combines it with the data in the GNC_TREE_MODEL_ACCOUNT_COL_TAX_INFO_SUB_ACCT model column. Modily the view creation function to use the new tax_info_data_func.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@20207 57a11ea4-9604-0410-9ed3-97b8803252fd
2011-01-30 20:34:55 +00:00
J. Alex Aycinena f70cb1fe2f Fix typo
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@20058 57a11ea4-9604-0410-9ed3-97b8803252fd
2011-01-11 00:15:02 +00:00
J. Alex Aycinena 04078234c0 Add info about sub-accounts to Tax Info column on Accounts page.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@20039 57a11ea4-9604-0410-9ed3-97b8803252fd
2011-01-08 23:52:13 +00:00
J. Alex Aycinena c44254c424 Remove leading character N from tax code, but only if it is there, and remove leading blank character when no tax code.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@19616 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-09-27 15:58:52 +00:00