Commit Graph

58 Commits

Author SHA1 Message Date
Christian Stimming
8139f08d62 Replace 'static inline' by 'static' for functions that are used by function pointers.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@15161 57a11ea4-9604-0410-9ed3-97b8803252fd
2006-11-29 15:13:02 +00:00
David Hampton
2ba716c4ed Use the existing QOF API to modify the instance dirty flag.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13912 57a11ea4-9604-0410-9ed3-97b8803252fd
2006-05-03 02:28:18 +00:00
Chris Shoemaker
39d4d945b8 Replace calls to QOF_COMMIT_EDIT_PART1 macro with calls to qof_commit_edit()
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13827 57a11ea4-9604-0410-9ed3-97b8803252fd
2006-04-22 04:42:29 +00:00
David Hampton
61a12b2715 Remove more functions to be deprecated in libqof2. (Pass Two - more
trivial substitutions, some simple translations.)


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13547 57a11ea4-9604-0410-9ed3-97b8803252fd
2006-03-09 03:48:49 +00:00
Chris Shoemaker
cec7bb732c Use function version of QOF_COMMIT_EDIT_PART2.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13395 57a11ea4-9604-0410-9ed3-97b8803252fd
2006-02-26 18:36:05 +00:00
David Hampton
db2bed0e58 Include file cleanup. Remove the messages.[ch] files in favor of the
glib supplied gi18n.h file.  Replace includes of gnome.h with gtk.h
(or better yet glib.h) wherever possible.  Don't include gnome.h from
any header files.  Remove some extraneous includes.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@11981 57a11ea4-9604-0410-9ed3-97b8803252fd
2005-11-19 23:53:34 +00:00
David Hampton
0b8a944f30 Update FSF street address.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@11964 57a11ea4-9604-0410-9ed3-97b8803252fd
2005-11-17 05:35:02 +00:00
David Hampton
f28d033d74 Collapse the gnome2 branch back into HEAD.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@11565 57a11ea4-9604-0410-9ed3-97b8803252fd
2005-11-02 03:32:36 +00:00
Derek Atkins
0bc9bfb411 Neil Williams's "QOF create: functionality added" patch.
QOF create: adding functions to be used with
	qof_object_new_instance for new qof_book_merge objects, including
	business objects.

	Small documentation tweak to make QofEntity and QofParam
	structures visible to doxygen.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@10220 57a11ea4-9604-0410-9ed3-97b8803252fd
2004-08-19 19:47:34 +00:00
Linas Vepstas
48df8b8884 Apply patch from Neil Williams <linux@codehelp.co.uk>
Extended the QofSetterFunc to business objects, for those set_fcn 's that
exist.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@10207 57a11ea4-9604-0410-9ed3-97b8803252fd
2004-07-26 12:41:43 +00:00
Linas Vepstas
4a1e07e594 merge changes from the backend-work-1 branch.
These changes conisted of:
-- change the backend begin()/commit() signatures to take qofinstance
   instead of gpointer
-- clean up non-standard use of books by the pricedb
-- rename the gnc-be-utils.h file so that its now a part of QOF


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@10056 57a11ea4-9604-0410-9ed3-97b8803252fd
2004-06-13 16:48:32 +00:00
Linas Vepstas
832d75d08e rename 'new' to 'create' to avoid reserved word collision with C++
add 'version_compare' function for sql backedn updates


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@10042 57a11ea4-9604-0410-9ed3-97b8803252fd
2004-06-12 20:27:08 +00:00
Linas Vepstas
ce63311484 -- Rename QOF_QUERY_PARAM_XX to QOF_PARAM_XX
-- Add 'new' callback to QofObject.  This allows QofObject to act
   as an 'object factory', creating a new instance of something,
   given only the type name.  Plan to use this in the new SQL
   backend, when restoring objects from SQL tables.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@9965 57a11ea4-9604-0410-9ed3-97b8803252fd
2004-05-23 17:31:40 +00:00
Linas Vepstas
fee30d10b3 more cloning; update status in BusPeriod.c
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@9611 57a11ea4-9604-0410-9ed3-97b8803252fd
2003-10-21 13:53:55 +00:00
Linas Vepstas
8e9f1afc97 more cloning of stuff.
(Yes Derek, I'm agonizing over whether/how to clone/not clone depending
on the backend.  But in the meantime this fills in needed function anyway.)


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@9606 57a11ea4-9604-0410-9ed3-97b8803252fd
2003-10-21 05:12:38 +00:00
Linas Vepstas
93e1d35a87 remove set_guid from customer, add clone to vendor
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@9595 57a11ea4-9604-0410-9ed3-97b8803252fd
2003-10-20 13:44:41 +00:00
Linas Vepstas
6444e8169b change address to use entity instead of naked guid
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@9579 57a11ea4-9604-0410-9ed3-97b8803252fd
2003-10-19 15:45:30 +00:00
Linas Vepstas
9ba2722cbb changes to use generic 'collection-of-entities' functions instead of
per-module specific functions.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@9570 57a11ea4-9604-0410-9ed3-97b8803252fd
2003-10-19 05:13:59 +00:00
Linas Vepstas
6089b89c6f remove vestiges of prior incomkplete gnc->qof renaming scheme changes
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@9538 57a11ea4-9604-0410-9ed3-97b8803252fd
2003-10-17 05:15:56 +00:00
Linas Vepstas
5b7d9cae9e merge from entity-mess branch: minor tweaks to bring into line
with entity reworjk in engine.  Add GPL licenses to some of the files.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@9533 57a11ea4-9604-0410-9ed3-97b8803252fd
2003-10-17 04:32:04 +00:00
Linas Vepstas
87a5b565b5 start work to make ids/entities/objects a little less wonky
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@9505 57a11ea4-9604-0410-9ed3-97b8803252fd
2003-10-14 21:20:55 +00:00
Linas Vepstas
c1935ea584 add qofinstance to vendor
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@9504 57a11ea4-9604-0410-9ed3-97b8803252fd
2003-10-14 13:46:24 +00:00
Linas Vepstas
84967a7f2e change include files
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@9426 57a11ea4-9604-0410-9ed3-97b8803252fd
2003-09-27 17:02:19 +00:00
Linas Vepstas
fd10a04277 add setters to the query object
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@9424 57a11ea4-9604-0410-9ed3-97b8803252fd
2003-09-27 16:33:06 +00:00
Linas Vepstas
f8bfae598f rename QofQueryObejct to QofParam to better reflect its acutal purpose
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@9422 57a11ea4-9604-0410-9ed3-97b8803252fd
2003-09-27 10:21:27 +00:00
Linas Vepstas
c87ddd7293 rename QOF_QUERYCORE_DATE to QOF_TYPE_DATE so taht these can be used
generically


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@9420 57a11ea4-9604-0410-9ed3-97b8803252fd
2003-09-27 09:39:27 +00:00
Derek Atkins
948af280a0 * src/engine/gnc-event*.[ch]:
Change the event generation and callback routines to
	  pass a QofIdType in addition to the GUID*

	* src/app-utils/gnc-component-manager.c:
	* src/gnome-utils/gnc-account-sel.c:
	  change to match the new event API.  Remove the need for
	  xaccGUIDType(), which means we no longer get the g_warning.

	* src/backend/postgres/events.c:
	* src/business/business-core/gncAddress.c:
	* src/business/business-core/gncAddress.h:
	* src/business/business-core/gncBillTerm.c:
	* src/business/business-core/gncCustomer.c:
	* src/business/business-core/gncEmployee.c:
	* src/business/business-core/gncEntry.c:
	* src/business/business-core/gncInvoice.c:
	* src/business/business-core/gncJob.c:
	* src/business/business-core/gncOrder.c:
	* src/business/business-core/gncTaxTable.c:
	* src/business/business-core/gncVendor.c:
	* src/business/business-core/test/test-address.c:
	* src/engine/Account.c:
	* src/engine/FreqSpec.c:
	* src/engine/Group.c:
	* src/engine/Period.c:
	* src/engine/SchedXaction.c:
	* src/engine/Transaction.c:
	* src/engine/gnc-lot.c:
	* src/engine/gnc-pricedb.c:
	* src/engine/qofbook.c:
	  Pass the QofIdType into the event generation code.
	Fixes #115988


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@8776 57a11ea4-9604-0410-9ed3-97b8803252fd
2003-06-27 05:51:05 +00:00
Linas Vepstas
e574f17710 oops, needed some hand-made conversions
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@8770 57a11ea4-9604-0410-9ed3-97b8803252fd
2003-06-27 03:45:42 +00:00
Linas Vepstas
bd03ce3eb1 continuing port to the qof code
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@8769 57a11ea4-9604-0410-9ed3-97b8803252fd
2003-06-27 03:36:02 +00:00
Linas Vepstas
761724ab32 continue port to qof
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@8768 57a11ea4-9604-0410-9ed3-97b8803252fd
2003-06-27 03:09:39 +00:00
Linas Vepstas
31b3a0284c port to qof
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@8766 57a11ea4-9604-0410-9ed3-97b8803252fd
2003-06-27 03:05:25 +00:00
Linas Vepstas
35163676f1 change over to new include files
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@8748 57a11ea4-9604-0410-9ed3-97b8803252fd
2003-06-26 07:27:52 +00:00
Linas Vepstas
731d1e78a3 add missing include file
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@8719 57a11ea4-9604-0410-9ed3-97b8803252fd
2003-06-25 07:18:48 +00:00
Linas Vepstas
7e3cfdb060 add missing include files
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@8711 57a11ea4-9604-0410-9ed3-97b8803252fd
2003-06-25 06:11:30 +00:00
Linas Vepstas
cd0ead1ee2 fix include file usage
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@8676 57a11ea4-9604-0410-9ed3-97b8803252fd
2003-06-24 23:48:58 +00:00
Derek Atkins
0aacad725a * src/business/business-core/gncBillTerm.c:
- keep a list of children so we can unref ourselves from our
	    children when we get destroyed
	  - deal with parentless children
	* src/business/business-core/gncCustomer.c:
	* src/business/business-core/gncInvoice.c:
	* src/business/business-core/gncVendor.c:
	  deal with properly un-ref'ing Bill Terms and Tax Tables
	* src/business/business-core/file/gnc-bill-term-xml-v2.c:
	  create a scrub function to clear up bogus bill terms due to
	  bug #114888 which could cause bill terms to get created
	  due to post/unpost of invoices.  Scrubs all invoices and
	  fixes the reference to bill terms, and updates the refcounts.
	Fixes bug #114888 for bill terms.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@8597 57a11ea4-9604-0410-9ed3-97b8803252fd
2003-06-14 05:17:07 +00:00
Linas Vepstas
4d997e5b52 add missing gnc-commodity.h include file
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@8573 57a11ea4-9604-0410-9ed3-97b8803252fd
2003-06-11 16:22:26 +00:00
Derek Atkins
198f41ee89 * src/engine/QueryNew.h: add QUERY_PARAM_ACTIVE
* src/business/business-core/gncCustomer.c:
	* src/business/business-core/gncEmployee.c:
	* src/business/business-core/gncInvoice.c:
	* src/business/business-core/gncJob.c:
	* src/business/business-core/gncOrder.c:
	* src/business/business-core/gncVendor.c:
	  add the QUERY_PARAM_ACTIVE parameter support
	* src/app-util/prefs.scm: add hidden preference to store
	  the user's choice of searchin
	* src/gnome-search/search.glade: add a checkbox to search-for-all
	* src/gnome-search/dialog-search.c -- add preliminary support to
	  limit searches to only "active" objects.  Fixes bug #103506


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@7833 57a11ea4-9604-0410-9ed3-97b8803252fd
2003-01-15 03:49:51 +00:00
Derek Atkins
c1adfb5be8 * .../business-core/gncCustomer.[ch]:
* .../business-core/gncVendor.[ch]:
	* .../business-core/gncEmployee.[ch]:
	  Rename ...Commodity() to ...Currency()
	* .../business-core/gw-business-core-spec.scm: fix function wrappings
	* .../business-core/file/gnc-customer-xml-v2.c:
	* .../business-core/file/gnc-vendor-xml-v2.c:
	* .../business-core/file/gnc-employee-xml-v2.c:
	  Use new function names.
	* .../business-gnome/business-gnome.scm:
	* .../business-gnome/dialog-customer.c:
	* .../business-gnome/dialog-vendor.c:
	* .../business-gnome/dialog-employee.c:
	  Use new ...Currency() functions
	More prep to fix #101001


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@7819 57a11ea4-9604-0410-9ed3-97b8803252fd
2003-01-12 22:53:02 +00:00
Derek Atkins
25f3ffddb9 * business/business-core/*.c: add begin/commit edit calls in every 'set'
function.  Fixes 96855.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@7434 57a11ea4-9604-0410-9ed3-97b8803252fd
2002-11-04 00:41:01 +00:00
Derek Atkins
ac574a38eb * engine/gnc-be-utils.h: implement macro helpers for begin/commit functions
* business/business-core/*.c: Implement BeginEdit()/CommitEdit() functions
	  for all the business-accounting data objects.
	* Use the begin/commit calls in the GUI and file-backend.
	* mostly fixes bug #96855.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@7431 57a11ea4-9604-0410-9ed3-97b8803252fd
2002-11-03 20:21:42 +00:00
Derek Atkins
78103fb7ae Fix bug #91413 -- Add TaxTable defaults to Customers and Vendors
* business-core/gncCustomer.[ch] -- add API for TaxTable and TaxTableOverride
	* business-core/gncVendor.[ch] -- add API for TaxTable and TaxTableOverride
	* business-core/file/gnc-customer-xml-v2.c -- store TaxTable and TTOverride
	* business-core/file/gnc-vendor-xml-v2.c -- store TaxTable and TTOverride
	* business-gnome/dialog-customer.c -- display/choose TaxTable and TTOverride
	* business-gnome/dialog-vendor.c -- display/choose TaxTable and TTOverride
	* business-gnome/glade/customer.glade -- add TaxTable Menu and Override button
	* business-gnome/glade/vendor.glade -- add TaxTable Menu and Override button
	* business-ledger/gncEntryLedger.c -- set traverse_to_new = TRUE when
	  you create a new ledger.
	* business-ledger/gncEntryLedgerLoad.c -- don't load the ledger the
	  first time through (e.g. when there is no invoice and no entries).
	  Pull in the default TaxTable, TaxIncluded, and Discount flags.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@7223 57a11ea4-9604-0410-9ed3-97b8803252fd
2002-09-17 04:19:57 +00:00
Derek Atkins
7bebb2eae9 Customer and Vendors can set TaxIncluded to Yes, No, and Use Global,
which will allow you to override the global setting or just use it..
(Default is Use Global).

Grab the default TaxIncluded settings in the Entry Ledger.

Fix a couple compiler warnings.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@7011 57a11ea4-9604-0410-9ed3-97b8803252fd
2002-06-24 04:59:04 +00:00
Derek Atkins
00a335aca1 * integrate the Billing Terms into the Core, GUI, and XML Backend
for the rest of the business objects that need billing terms.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@6994 57a11ea4-9604-0410-9ed3-97b8803252fd
2002-06-22 02:38:13 +00:00
Derek Atkins
068749c658 Fix logic for "dirty" setting; only set dirty when data actually
changes.  Only set "global" dirty flag at 'commitedit'


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@6990 57a11ea4-9604-0410-9ed3-97b8803252fd
2002-06-21 19:00:34 +00:00
Derek Atkins
aef6a39dce * Create new options for a few business objects. This allows you to
save reports that reference Invoices, Customers, or Vendors and have
  them reload properly.

* Add two new functions to interface Invoices, Customers, and Vendors
  to scheme (RetGUID and LookupDirect)

* fix the way Entry values are computed.  Cache the computed values so
  you're not recomputing the math all the time.  It should also round
  properly, now.

* fix the display of entry values to round to the commodity fraction.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@6920 57a11ea4-9604-0410-9ed3-97b8803252fd
2002-05-27 18:17:31 +00:00
Derek Atkins
cfd8718a42 * Plug-in Extensions for backends, so pluggable objects can
provide backend-support without changing the core backend
	implementation.

	* src/engine/gncObject: Add a 'mark_clean' data-type method()
				add backend extension registration.

	* src/engine/gnc-book.c: use mark_clean object interface

	* src/backend/file/io-gncxml-v2: use the backend extensions

	* src/business/business-core/gnc*: add the mark_clean methods
					   add commodities to many objects

	* src/business/business-core/gncInvoice.c: fix GetPaidTxn() bug

	* src/business/business-core/file: the XML backend extensions for
	business objects.

	* src/business/business-gnome/dialog-*: supply default commodities


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@6770 57a11ea4-9604-0410-9ed3-97b8803252fd
2002-03-04 19:34:52 +00:00
Derek Atkins
e83341b8c7 - Add new Backend method, counter(), which increments a named counter and
returns the new value.
- Add gnc_book_get_counter() which implements the API and calls the
  counter() method in the backend if it exists.  If not, it stores the
  counters in the Book KVP Frame.
- Modify all the Business objects to use the new counter API.  Counter is
  gint64 so modify all the users to expect that.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@6759 57a11ea4-9604-0410-9ed3-97b8803252fd
2002-03-03 02:17:07 +00:00
Derek Atkins
e130451499 emit gnc events for the business objects.
change the address API to know about its parents' guid, and emit events
 based upon the parent
get the job-select dialog to use events to update
fix a crash in the invoice and order dialogs when creating a new one.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@6754 57a11ea4-9604-0410-9ed3-97b8803252fd
2002-03-02 18:55:01 +00:00
Derek Atkins
bc76542925 gncVendor.c: convert terms to string
dialog-search: update on events.

restructure code to try to make it more asynchronous.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@6752 57a11ea4-9604-0410-9ed3-97b8803252fd
2002-03-01 21:45:54 +00:00