Commit Graph

16347 Commits

Author SHA1 Message Date
Peter Broadbery
6a8e97600f cashflow: Further separate work into a per-split section. 2015-11-12 20:29:26 +00:00
Peter Broadbery
5d98d4af9d standard-reports/cash-flow.scm: break out main calculation part
This adds a function cash-flow-calc which does most of the donkey work and
can be tested independently of report generation.
2015-11-12 20:29:23 +00:00
Peter Broadbery
b47f04539e Move account & split.scm to engine-utilities 2015-11-12 20:26:18 +00:00
Peter Broadbery
8dfea02da7 reports: Add account and split module, plus tests.
Remove common functions from the budget and cashflow reports.
Add into separate modules, plus some tests for these newly exposed
functions.
2015-11-12 18:17:32 +00:00
Peter Broadbery
f9ab945cad Add and use a macro for loading modules. 2015-11-12 18:17:32 +00:00
John Ralls
fa4532b603 Updated Arabic Translation by Abdulsalam Alshilash. 2015-11-11 08:44:35 -08:00
Bill Nottingam
1a92dad9d0 Bug 742321 - Reset temporary prefs on application startup 2015-11-10 21:54:38 +01:00
Geert Janssens
68f1db9ed6 Bug 756720 - configure fails to find libgoffice 0.10-10 (0.10.18-1)
While we can't support libgoffice 0.10 because that would require gtk3
we can improve the error message if no libgoffice 0.8.x version is found.
2015-11-03 12:19:52 +01:00
Mark Haanen
16bc91d6c9 Add new account chart for Duch small businesses.
In the Netherlands, several parties have created an account structure for standardized information exchange. This file provides a GnuCash translation of this (public domain) structure.
2015-11-03 12:00:22 +01:00
root
4c0dbb1748 disable recursion for balance and balance (usd)
https://bugzilla.gnome.org/show_bug.cgi?id=647952
2015-11-01 13:14:48 +01:00
Geert Janssens
21525713a3 Reduce code duplication 2015-11-01 11:18:26 +01:00
yomlogs
f7781681bb Bug 757378: display the user-defined display symbol for non-currency commodities. 2015-11-01 11:18:25 +01:00
Mechtilde
b047467e3b some more German translation 2015-10-31 19:53:36 +01:00
Mechtilde
e7378e876d more corr in German translation 2015-10-31 19:53:36 +01:00
Mechtilde
a7248b24d4 corr translation in German 2015-10-31 19:53:36 +01:00
John Ralls
d061f6e962 Don't require prices in Scheduled Transactions with marker commodity splits.
Bug 754192 - Since Last Run Dialog asks for security price even if not needed
Bug 662126 - Cannot create scheduled transaction for dividend reinvestment

If a split in an SX has a 0 amount, don't make its commodity the transaction
commodity, set the multi-commodity flag, or create a variable for it.

Make the warning about not being able to auto-create SXes with variables
or multiple commodities more explicit about the latter.
2015-10-30 14:07:24 -07:00
John Ralls
ce838d3cfc Rename GNOME_COMPILE_WARNINGS to just COMPILE_WARNINGS.
Poaching someone else's macro name is a really dumb idea, because aclocal
looks in our macros directory only if it can't find the macro in the system
directories. Our config code doesn't work with Gnome's macro, it exports
WARN_CFLAGS rather than modifying CFLAGS directly the way ours does.
2015-10-27 17:25:48 -07:00
John Ralls
f3de156e65 Revert "Use gnc_pricedb_has_prices instead of testing the return value of get_prices."
This reverts commit ae35dbb464.
because the return value was actually used later on.
2015-10-27 14:08:59 -07:00
John Ralls
f5cf2ba542 Merge branch 'single-price' into maint 2015-10-24 14:52:49 -07:00
John Ralls
362b9e3d7c Fix leaking QofBook in most of the engine unit tests.
The problem is that QofBook is not a well-formed GObject and doesn't clean
itself up properly when its ref count goes to zero. qof_book_destroy() must
be explicitly called on it. An interesting side effect is that QofObject
keeps a list of all of the books ever opened and not properly destroyed and
registering a class (in this case GNCPriceDB) tries to create that class's
instance in all of those leaked books. Since they already have one, the
instantiation code raises a critical error and the test program fails.
2015-10-24 14:15:23 -07:00
John Ralls
ae35dbb464 Use gnc_pricedb_has_prices instead of testing the return value of get_prices. 2015-10-24 13:24:13 -07:00
John Ralls
dfc0b28bed Remove be->price_lookup conditional clauses.
No backend implements price_lookup, and the struct member is removed from
master. Even if it had existed these clauses wouldn't actually do anything.
2015-10-24 13:24:13 -07:00
John Ralls
4bfe29aca3 Prevent F::Q from updating PRICE_SOURCE_EDIT_DLG prices. 2015-10-24 13:24:12 -07:00
John Ralls
9a53cc8f58 Remove unnecessary and harmful price rounding. 2015-10-24 13:24:10 -07:00
John Ralls
7298a46999 Implement user-entered-price preference.
Add user:price as a source and prefer values with lower PriceSource enum
values over higher ones: In other words a price with a lower PriceSource
value (e.g. user:price-editor) will overwrite one with a higher value (e.g.
user:split-register) and not the other way around.
2015-10-24 13:22:51 -07:00
John Ralls
811a30db4a Fold separate call of gnc_pricedb_lookup_latest() into lookup_price.
Requires a 3-state enum instead of a boolean for the second arg to lookup_price.
2015-10-24 13:22:46 -07:00
John Ralls
70493537e9 Use an enum for internal representation of Price Sources.
Strings are still used for storage and display.
Purpose is to make multiple comparisons and conditional setting more
convenient.
2015-10-24 13:20:29 -07:00
John Ralls
ab15ca8f84 Extract function lookup_price in dialog_transfer.c 2015-10-24 13:20:28 -07:00
John Ralls
76c1259f1b Adjust split_register to match transfer dialog checking inverted prices. 2015-10-24 13:20:28 -07:00
John Ralls
348fe45b76 Fix missing initialization of price_value. 2015-10-24 13:20:28 -07:00
John Ralls
a40bc92d34 Change CURRENCY_DENOM to 10000, matching what F::Q returns. 2015-10-24 13:20:27 -07:00
John Ralls
6e14137710 Extract function round_price(), consistently apply it. 2015-10-24 13:20:23 -07:00
John Ralls
f30b38b5c3 Create a rounding policy for prices in the pricedb.
Currency-currency prices will be priced in the smaller currency so that
the price > 1 and will be rounded to 3 digits after the decimal.
Commodity-currency prices will be priced in the currency and rounded to
the currency's scu * 10000.
This affects only prices stored in the pricedb. Prices in splits will
continue to be computed from value/amount.
2015-10-24 13:19:05 -07:00
John Ralls
a8d4eaae5e Rename _gnc_xfer_dialog_set_exchange_rate and use it consistently.
gnc_xfer_dialog_set_price_edit says what we're actually setting.
2015-10-24 13:18:39 -07:00
John Ralls
f79a3af4a2 Provide gnc_numeric_invert() convenience function.
Clearer and faster than dividing into 1/1.
2015-10-24 13:15:05 -07:00
John Ralls
be5b9f2b84 Use price_value when referring to a gnc_numeric.
Price and prc are for gnc_price*.
For clarity.
2015-10-24 13:15:05 -07:00
John Ralls
9c2813acb6 Price-quotes: Modify quotes on same day instead of creating new ones.
We can use only one per day so no point in keeping a bunch of them.
Finance::Quote prices always overwrite user prices.
2015-10-24 13:15:04 -07:00
John Ralls
966789374d Edit split-based prices instead of adding.
For split-register and xfer-dialog generated prices if there's an existing
non-FQ price for the day, change it. If there's an F::Q quote for the day,
do nothing. Only add a price if there isn't one for the from/to
combination.
2015-10-24 13:15:04 -07:00
John Ralls
5e609dac0d Check for an existing price before adding one in split_reg.
To make the behavior the same as in xfer_dialog.
2015-10-24 13:15:04 -07:00
John Ralls
c4082524cb In the transfer dialog use the price_edit value for the saved price.
Instead of computing it separately and differently from to_amt and from_amt.
2015-10-24 13:15:04 -07:00
John Ralls
ca447fc047 Fix up whitespace in dialog-transfer.c. 2015-10-24 13:14:49 -07:00
John Ralls
85148cd23b Refactor gnc_xfer_dialog_response_cb with several extract-functions. 2015-10-24 13:12:39 -07:00
John Ralls
e94622c9e3 Don't store prices of source invoice.
They're intended to be temporary, for creating splits. They're also already
stored from the transfer dialog.
2015-10-24 13:12:38 -07:00
John Ralls
ab535fb100 Replace the price source and type strings with defines. 2015-10-24 13:12:38 -07:00
John Ralls
e3da1c4247 Revert "Merge branch 'single-price' into maint"
This reverts commit bc9285bbfb, reversing
changes made to e921de8b6f.
Final step of reverting the single-price changes.
2015-10-23 12:11:51 -07:00
John Ralls
b723578c82 Revert "Fix rename failure for gnc_xfer_dialog_set_exchange_rate."
This reverts commit 766cf48f45, and
is step 3 of reverting the single-price changes from maint.
2015-10-23 11:49:11 -07:00
John Ralls
39d43a31fa Revert "Fix price-reading crash if the price needs to be inverted."
This reverts commit 027080a830,
and is step 2 in reverting the single-price changes.
2015-10-23 11:44:57 -07:00
John Ralls
9fc0c4667c Revert "Bug 756339 - Prices table not updated"
This reverts commit 0baf078b6f,
and is step 1 in reverting out the single-price changes and
moving them to master.
2015-10-23 11:43:03 -07:00
John Ralls
9d43a616e1 Fix typo. 2015-10-16 10:28:41 -07:00
John Ralls
9ac2bb8158 Add Business Ledger to Doxygen docs. 2015-10-15 15:58:04 -07:00