Commit Graph

63 Commits

Author SHA1 Message Date
Linas Vepstas
c90c817e64 merge first round of entity rework back into head branch
The net total of this work is (i beleive) fewer lines of code.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@9530 57a11ea4-9604-0410-9ed3-97b8803252fd
2003-10-17 04:25:53 +00:00
Linas Vepstas
9df9674b96 change Account to use qofinstance
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@9481 57a11ea4-9604-0410-9ed3-97b8803252fd
2003-10-12 04:44:40 +00:00
Linas Vepstas
697846331a quick whack to add LIFO accounting policy (in addition to FIFO)
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@9410 57a11ea4-9604-0410-9ed3-97b8803252fd
2003-09-23 03:25:37 +00:00
Linas Vepstas
367a8b5f69 rename kvp_frame to KvpFrame to more closely follow gnome naming conventions
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@8782 57a11ea4-9604-0410-9ed3-97b8803252fd
2003-06-27 23:33:00 +00:00
Linas Vepstas
92a2f26e52 Rename gncbook and gncsession to qofbook and qofsession
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@8762 57a11ea4-9604-0410-9ed3-97b8803252fd
2003-06-27 02:51:10 +00:00
Linas Vepstas
88c88039dc rename the entity functions from xaccEntity to qof_entity
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@8749 57a11ea4-9604-0410-9ed3-97b8803252fd
2003-06-26 07:30:48 +00:00
Linas Vepstas
50906151db rename GNCBook to QofBook
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@8681 57a11ea4-9604-0410-9ed3-97b8803252fd
2003-06-25 00:52:46 +00:00
Linas Vepstas
63519bdf21 start removing accounting-specific structures (i.e. Account, Transaction)
from the backend, and from the session; goal is a generic backend.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@8567 57a11ea4-9604-0410-9ed3-97b8803252fd
2003-06-11 01:23:18 +00:00
Christian Stimming
4cb98c9779 2003-03-15 Christian Stimming <stimming@tuhh.de>
* src/engine/gnc-book.h, src/engine/*.h: Added a lot of
	documentation comments, improved doxygen output. At least the most
	important header files will now show up in doxygen.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@8081 57a11ea4-9604-0410-9ed3-97b8803252fd
2003-03-14 23:59:25 +00:00
David Hampton
c98a3a1a8d Support for having an account scu that doesn't match the account
commodity's scu.  This allows a user to notice/correct a case where
the two are out of whack and correct it (#100295), or to intentionally
set them that way.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@7677 57a11ea4-9604-0410-9ed3-97b8803252fd
2002-12-12 04:44:35 +00:00
Derek Atkins
47eaa5c35d * src/engine/GNCId.c: Implement xaccForeachEntity() as a which
allows a traversal of all entities of a particular type.

	* Register GncObject_t descriptions for Splits, Transactions, and
	Accounts.  Move the QueryObject definitions into the actual module
	sources for Transactions, Splits, Accounts, and Books.  This
	allows QueryNew searches for Splits, Transactions, and Accounts.

	* gnc-engine.c: call the registration functions for Splits,
	Transactions, Accounts, and Books to enable searching using the
	new search subsystem.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@6913 57a11ea4-9604-0410-9ed3-97b8803252fd
2002-05-25 02:50:24 +00:00
Linas Vepstas
f082d63108 Accounts 'own' lots and provide memory management, etc.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@6888 57a11ea4-9604-0410-9ed3-97b8803252fd
2002-05-22 05:48:22 +00:00
Linas Vepstas
8c2d2d4cf0 further backend->book simplification
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@6050 57a11ea4-9604-0410-9ed3-97b8803252fd
2001-11-25 08:31:26 +00:00
Linas Vepstas
e4f1cef9b6 more backend/book cleanup, rework the account clone function.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@6047 57a11ea4-9604-0410-9ed3-97b8803252fd
2001-11-25 06:43:25 +00:00
Linas Vepstas
c104a92c47 fix documentation
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@6042 57a11ea4-9604-0410-9ed3-97b8803252fd
2001-11-25 05:37:30 +00:00
Linas Vepstas
f63b341c66 more documentation cleanup
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@6038 57a11ea4-9604-0410-9ed3-97b8803252fd
2001-11-25 03:21:10 +00:00
Linas Vepstas
085a778161 idocumentation cleanup
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@6037 57a11ea4-9604-0410-9ed3-97b8803252fd
2001-11-25 03:14:05 +00:00
Dave Peticolas
860adf103c Move entity tables from sessions to books.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@6018 57a11ea4-9604-0410-9ed3-97b8803252fd
2001-11-24 12:10:42 +00:00
Dave Peticolas
f55253d1ae Make xaccAccountSortSplits a private function so the backends can use it.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@5781 57a11ea4-9604-0410-9ed3-97b8803252fd
2001-11-07 09:00:37 +00:00
Linas Vepstas
63ec87aa7b add strict types in order to enable the perl/Java wrappers to function
properly.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@5751 57a11ea4-9604-0410-9ed3-97b8803252fd
2001-10-31 15:25:46 +00:00
Dave Peticolas
2408e0f983 Work on moving entity tables into sessions.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@5468 57a11ea4-9604-0410-9ed3-97b8803252fd
2001-10-06 08:12:55 +00:00
Dave Peticolas
97b19d1878 Work on moving entity tables into sessions.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@5466 57a11ea4-9604-0410-9ed3-97b8803252fd
2001-10-05 08:35:04 +00:00
Dave Peticolas
4cc2bfb9a9 Missed some.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@5076 57a11ea4-9604-0410-9ed3-97b8803252fd
2001-08-07 23:36:04 +00:00
Dave Peticolas
939f78a1cc 2001-08-06 Bill Gribble <grib@billgribble.com>
* Added module/plugin system (src/gnc-module/*)

	* reshuffled source code from src/engine, src/register, and some
	from src/guile, src/scm, src/gnome (see src/README.modules).
	engine, backends, register, qif importer are now "modules".

	* unfinished new QIF import/export module (the old one's still
	there and still works)

	* really too many files touched to get into it.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@5075 57a11ea4-9604-0410-9ed3-97b8803252fd
2001-08-07 23:29:04 +00:00
Linas Vepstas
eab9e6b82c prepare for improved kvp frame handling in backend
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@5046 57a11ea4-9604-0410-9ed3-97b8803252fd
2001-07-28 03:19:36 +00:00
Linas Vepstas
c4152da33e remove stale message
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@4947 57a11ea4-9604-0410-9ed3-97b8803252fd
2001-07-12 19:43:36 +00:00
Dave Peticolas
47e7d75848 2001-07-11 Dave Peticolas <dave@krondo.com>
* src/test/test-xml-transaction.c: CIT (currency-in-transaction)

	* src/test/test-xml-account.c: CIT

	* src/test/gnc-test-stuff.c: CIT

	* src/scm/report/taxtxf.scm: CIT

	* src/scm/qif-import/qif-to-gnc.scm: CIT

	* src/scm/qif-import/qif-dialog-utils.scm: CIT

	* src/scm/text-export.scm: CIT

	* src/scm/price-quotes.scm: CIT

	* src/scm/main-window.scm: CIT

	* src/scm/engine-interface.scm: CIT

	* src/guile/gnc.gwp: CIT. remove unused api

	* src/gnome/glade/transfer.glade: remove currency account list

	* src/gnome/glade/account.glade: remove security gui

	* src/gnome/window-reconcile.c: CIT

	* src/gnome/window-main-summarybar.c: CIT

	* src/gnome/window-acct-tree.c: CIT

	* src/gnome/druid-stock-split.c: CIT

	* src/gnome/druid-qif-import.c: CIT

	* src/gnome/druid-hierarchy.c: CIT

	* src/gnome/druid-commodity.c: CIT

	* src/gnome/dialog-transfer.c: CIT. don't use currency accounts

	* src/gnome/dialog-commodities.c: CIT

	* src/gnome/dialog-account.c: CIT

	* src/gnome/account-tree.c: CIT

	* src/engine/sql/txn.c: fix for CIT

	* src/engine/sql/account.c: remove old currency/security cruft

	* src/engine/sixtp-dom-parsers.[ch]: allow parsing kvp data into
	an existing frame

	* src/engine/kvp_doc.txt: document new keys used for storing
	old currency/security fields

	* src/engine/io-gncxml-v2.c: CIT

	* src/engine/io-gncxml-r.c: CIT

	* src/engine/io-gncbin-r.c: CIT

	* src/engine/io-example-account.c: CIT

	* src/engine/gnc-transaction-xml-v2.c: CIT

	* src/engine/gnc-schedxaction-xml-v2.c: load kvp data
	into existing frame

	* src/engine/gnc-commodity.[ch]: add new lookup api, fixes
	for NULL pointers

	* src/engine/gnc-book.c: don't scrub (moved elsewhere)

	* src/engine/gnc-account-xml-v2.c: store transaction currency
	and account commodity.

	* src/engine/Transaction.[ch]: add a transaction currency

	* src/engine/TransLog.c: CIT

	* src/engine/Scrub.[ch]: add api for fixing up
	account and transaction commodities.

	* src/engine/SchedXaction.c: CIT

	* src/engine/Ledger-xml-parser-v1.c: CIT

	* src/engine/Group.[ch]: don't cache a group balance

	* src/engine/Account.[ch]: CIT. remove currency, security
	fields, add commodity fields. Store old currency/security
	in kvp_data.

	* src/engine/Account-xml-parser-v1.c: fix for CIT

	* src/gnc-ui-util.[ch]: fix for CIT

	* src/gnc-component-manager.c: remove deleted api

	* src/SplitLedger.c: fix for currency-in-transaction (CIT)


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@4943 57a11ea4-9604-0410-9ed3-97b8803252fd
2001-07-12 00:13:21 +00:00
Dave Peticolas
f9ee248445 2001-07-02 Dave Peticolas <dave@krondo.com>
* many header files: apply Ben Stanley's script to
	convert __HEADER_H__ to HEADER_H. All names starting
	with '_' are reserved.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@4852 57a11ea4-9604-0410-9ed3-97b8803252fd
2001-07-03 06:49:39 +00:00
Linas Vepstas
79e5ebb8d2 performance enhancement
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@4639 57a11ea4-9604-0410-9ed3-97b8803252fd
2001-06-12 17:55:11 +00:00
Dave Peticolas
638c2487ec 2001-05-16 Dave Peticolas <dave@krondo.com>
* src/doc/design/gnucash-design.texinfo: update docs

	* src/doc/design/engine.texinfo: update docs

	* src/engine/Account.c (xaccCloneAccountSimple): remove
	redundant initialization
	(xaccAccountGetSlots): handle NULL

	* src/engine/Account.h: fix docs

	* src/engine/AccountP.h: fix spelling errors in comments


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@4228 57a11ea4-9604-0410-9ed3-97b8803252fd
2001-05-16 09:33:33 +00:00
Dave Peticolas
a14bf2bfab James LewisMoss's patch.
* src/test/test-stuff.c (failure): don't print num if == -1.
	(success): same.
	(get_random_account): move here from test-xml-account.c
	(get_random_split): move here from test-xml-transaction.c
	(get_random_transaction): same.
	(success_args): New func.
	(success): Simplified version
	(failure_args): new func.
	(failure): Simplified version.

	* src/engine/io-gncbin-r.c: same as below.

	* src/engine/TransLog.c (xaccTransWriteLog): same as below.

	* src/engine/Group.c (xaccGroupMergeAccounts): same as below.

	* src/engine/Backend.c (xaccTransactionGetBackend): Convert to not
	use the split's acc part directly, but only to access through
	funcs

	* src/engine/sixtp-dom-parsers.c (dom_tree_generic_parse): Add
	generic parser.

	* src/engine/gnc-account-xml-v2.c (gnc_account_end_handler): use
	generic parser extracted from here and used here and
	gnc-transaction-iml-v2.c

	* src/engine/Transaction.c (xaccInitSplit): Add a split->acc_guid
	field that is set to the account's guid.  This way an Account is
	not required to exist yet when loading the split.  Later when
	xaccSplitGetAccount is called the account is looked up, cached and
	returned.  Make sure everything accesses ->acc through the helper
	function.

	* src/engine/AccountP.h: same as below.

	* src/engine/Account.c (xaccAccountSetGUID): mark guid argument
	const since it doesn't keep a pointer to it.

	* src/doc/xml/transactions-v2.dtd: change guid -> id.
	* src/engine/Transaction.c (get_denom_internal): New helper func.
	(get_currency_denom): use func.
	(get_security_denom): use func.

	* src/engine/sixtp.c: (sixtp_sax_end_handler,
	sixtp_sax_characters_handler, sixtp_sax_start_handler): don't use
	g_return_if_fail to test pdata->parsing_ok so we don't see the
	million CRITICAL warnings.  We'll print an error at the end
	anyway.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@3762 57a11ea4-9604-0410-9ed3-97b8803252fd
2001-03-09 07:46:13 +00:00
Dave Peticolas
e30a8bc509 Rob Browning's patch with price db & miscellany.
* first iteration of pricedb: we should preserve quotes from old
    binfiles now (rather than throwing it away during the conversion),
    and we can read/write the pricedb as XML.

  * added configure --enable-error-on-warning -- developers, please
    use this.

  * add fancier TAGS handling -- we now track file additions/deletions
    dynamically.

  * add g_hash_table_key_value_pairs: returns a GSList of all the key
    value pairs in a given hash table so you can manipulate them.

    add g_hash_table_kv_pair_free_gfunc: g_slist_foreach helper for
    deleting key value hash pairs when you're finished with the
    results from g_hash_table_key_value_pairs.  You'll still need to
    call g_slist_free as well to delete the spine of the list.

  * continue migration to using backend for all IO and switching from
    top-level Group to top level GNCBook.

  * switch from const gnc_commodity to gnc_commodity in many places,
    after consultation with Bill.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@3684 57a11ea4-9604-0410-9ed3-97b8803252fd
2001-02-25 00:42:44 +00:00
Dave Peticolas
6073e9bf31 Christian Stimming's update to the currency documentation.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@3681 57a11ea4-9604-0410-9ed3-97b8803252fd
2001-02-23 06:39:42 +00:00
Linas Vepstas
c9a40649ec add version numbers to account and transaction.
These are used by the backend to track multi-user updates


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@3669 57a11ea4-9604-0410-9ed3-97b8803252fd
2001-02-19 08:35:17 +00:00
Linas Vepstas
d590daddac large invasive patch to send account-deletion info to the backend
Hopefully the last such invasion ...


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@3597 57a11ea4-9604-0410-9ed3-97b8803252fd
2001-02-05 10:09:57 +00:00
Linas Vepstas
9ac973c443 Minimally invasive change to set cached starting balance
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@3543 57a11ea4-9604-0410-9ed3-97b8803252fd
2001-01-28 17:41:47 +00:00
Dave Peticolas
1ab2c3ff0a Remove ** cruft.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@3340 57a11ea4-9604-0410-9ed3-97b8803252fd
2000-12-22 07:05:23 +00:00
Linas Vepstas
f6f026aa42 annotate file descriptions to make lxr happy
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@3300 57a11ea4-9604-0410-9ed3-97b8803252fd
2000-12-13 21:15:53 +00:00
Dave Peticolas
73837e5670 Cleanup.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@3230 57a11ea4-9604-0410-9ed3-97b8803252fd
2000-12-03 07:50:29 +00:00
Dave Peticolas
f88675cf90 Use currency SCU for security SCU when security == NULL.
Use a higher precision for loading prices from the binary format.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@3150 57a11ea4-9604-0410-9ed3-97b8803252fd
2000-11-15 11:02:00 +00:00
Dave Peticolas
4f84ccd735 Use GLists to store splits in transactions. Remove cruft.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@3120 57a11ea4-9604-0410-9ed3-97b8803252fd
2000-11-04 01:05:41 +00:00
Dave Peticolas
be92668bd2 Move amount printing and parsing routines out of the engine
and into src/gnc-ui-util.[ch]. Move src/engine/util.[ch] to
src/engine/gnc-engine-util.[ch].

Cleanup header files.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@3107 57a11ea4-9604-0410-9ed3-97b8803252fd
2000-11-01 08:52:30 +00:00
Dave Peticolas
e4e1453257 Rob Browning's XML I/O Code.
Bill Gribble's commodity and numerics code and new qif importer druid.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@3065 57a11ea4-9604-0410-9ed3-97b8803252fd
2000-10-23 09:41:51 +00:00
Dave Peticolas
79ee7381ad Bill Gribble's patch to add gtkhtml support, key-value pairs,
and g-wrapping of the query api.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@2545 57a11ea4-9604-0410-9ed3-97b8803252fd
2000-07-08 12:35:12 +00:00
Dave Peticolas
7011321677 Work on reconciling stock/mutual fund accounts.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@2369 57a11ea4-9604-0410-9ed3-97b8803252fd
2000-05-21 07:40:51 +00:00
Linas Vepstas
3927fe149b change name of account group subroutine
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@2333 57a11ea4-9604-0410-9ed3-97b8803252fd
2000-05-15 22:11:19 +00:00
Linas Vepstas
66af6ed055 minor sql backend fixups
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@2326 57a11ea4-9604-0410-9ed3-97b8803252fd
2000-05-15 04:00:19 +00:00
Linas Vepstas
e92c343927 new, improved debug printing macros
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@2308 57a11ea4-9604-0410-9ed3-97b8803252fd
2000-05-14 20:54:20 +00:00
Dave Peticolas
e40f406d3a More work on GUIDs. Removed src/scm cruft.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@2294 57a11ea4-9604-0410-9ed3-97b8803252fd
2000-05-11 02:57:33 +00:00
Dave Peticolas
58058e8010 *** empty log message ***
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@2183 57a11ea4-9604-0410-9ed3-97b8803252fd
2000-04-14 10:42:18 +00:00