Commit Graph

16244 Commits

Author SHA1 Message Date
John Ralls
3c3f034393 Update all message catalogs with the 2.6.7 gnucash.pot and fix all warnings. 2015-09-19 15:34:25 -07:00
John Ralls
766cf48f45 Fix rename failure for gnc_xfer_dialog_set_exchange_rate. 2015-09-17 16:03:39 -07:00
John Ralls
6e6eba35c2 Correct the Stock, Bond, Market Index, and Mutual Fund account types in all locales. 2015-09-17 13:07:48 -07:00
John Ralls
0b7e4773f7 Fix warning about always-true condition. 2015-09-17 13:02:27 -07:00
John Ralls
42859b91bb Set -std=gnu99, matching master.
Fixes broken build on win32
2015-09-16 17:59:50 -07:00
John Ralls
bc9285bbfb Merge branch 'single-price' into maint 2015-09-15 12:06:46 -07:00
John Ralls
05bb4bd955 Prevent F::Q from updating PRICE_SOURCE_EDIT_DLG prices. 2015-09-15 12:06:29 -07:00
John Ralls
74d11b2736 Remove unnecessary and harmful price rounding. 2015-09-15 12:06:29 -07:00
John Ralls
cfa5aa1cb2 Remove the preference for storing prices relative to the base currency.
It interferes with the preference for storing the price in the direction
in which the price is >1 for preserving sigfigs.
2015-09-15 12:06:29 -07:00
John Ralls
4259255af1 Export the price-source enums to Guile and use them in price-quotes.scm. 2015-09-15 12:06:29 -07:00
John Ralls
6b6920fd04 Remove static function swap_amount(), not used. 2015-09-15 12:06:29 -07:00
John Ralls
585cc4883f 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-09-15 12:06:29 -07:00
John Ralls
d9a0f311a4 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-09-15 12:06:29 -07:00
John Ralls
7db7e0cf7a Recognize and handle reversed price quotes from gnc-fq-helper.
Gnc-fq-helper will flip currency price quotes if the one requested is < 1
or not available, which might mean that it's not representable in 4 digits
to the right of the decimal.
2015-09-15 12:06:29 -07:00
John Ralls
7d8b51e8db 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-09-15 12:06:29 -07:00
John Ralls
d52a0b602c Fix whitespace error. 2015-09-15 12:06:28 -07:00
John Ralls
d4968d3bb4 Extract function lookup_price in dialog_transfer.c 2015-09-15 12:06:28 -07:00
John Ralls
157c7e30a5 Invert the F::Q price if there's already one in the other direction.
We don't want to create prices in both directions on the same day.
2015-09-15 12:06:28 -07:00
John Ralls
890cfe2186 Handle currencies with one-directional quotes and quotes < 1 in F::Q.
Some currencies quotes are one-directional, so check both directions if
necessary. Quotes with values < 1 often have too few significant digits,
so in that case use the other direction if available.
2015-09-15 12:06:28 -07:00
John Ralls
96471379f0 Adjust split_register to match transfer dialog checking inverted prices. 2015-09-15 12:06:28 -07:00
John Ralls
d7fb92d03f Fix missing initialization of price_value. 2015-09-15 12:06:28 -07:00
John Ralls
93bb5c0fdd Change CURRENCY_DENOM to 10000, matching what F::Q returns. 2015-09-15 12:06:28 -07:00
John Ralls
ffe96b3044 Extract function round_price(), consistently apply it. 2015-09-15 12:06:28 -07:00
John Ralls
bfbb508799 Fix swap_amount so that it swaps the account pointers. 2015-09-15 12:06:28 -07:00
John Ralls
86320a4d11 Fix gnc_numeric_invert to correctly handle negative values. 2015-09-15 12:06:28 -07:00
John Ralls
c068397633 Flip return values of check_edit() and check_accounts().
It's easier to understand if they return FALSE on fail.
2015-09-15 12:06:28 -07:00
John Ralls
e12c89b5ca Move gnc_numeric_invert to be not-inline.
The inline version crashed.
2015-09-15 12:06:27 -07:00
John Ralls
6b5207785a 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-09-15 12:06:27 -07:00
John Ralls
c7c97be684 Rename _gnc_xfer_dialog_set_exchange_rate and use it consistently.
_gnc_xfer_dialog_set_price_edit says what we're actually setting.
2015-09-15 12:06:27 -07:00
John Ralls
73233a5e2e Provide gnc_numeric_invert() convenience function.
Clearer and faster than dividing into 1/1.
2015-09-15 12:06:27 -07:00
John Ralls
3a51c0d5c1 Use price_value when referring to a gnc_numeric.
Price and prc are for gnc_price*.
For clarity.
2015-09-15 12:06:27 -07:00
John Ralls
06f70bad61 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-09-15 12:06:27 -07:00
John Ralls
ea48ed882b 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-09-15 12:06:27 -07:00
John Ralls
0b03328143 Check for an existing price before adding one in split_reg.
To make the behavior the same as in xfer_dialog.
2015-09-15 12:06:27 -07:00
John Ralls
c6a67f4eac 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-09-15 12:06:27 -07:00
John Ralls
407d61cbb6 Fix up whitespace in dialog-transfer.c. 2015-09-15 12:06:27 -07:00
John Ralls
47f91c0227 Refactor gnc_xfer_dialog_response_cb with several extract-functions. 2015-09-15 12:06:27 -07:00
John Ralls
e1b4e45de5 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-09-15 12:06:27 -07:00
John Ralls
9a611a2aca Replace the price source and type strings with defines. 2015-09-15 12:06:26 -07:00
John Ralls
e921de8b6f Correct the Stock, Bond, Market Index, and Mutual Fund account types.
STOCK and MUTUAL are not compatible with currency.
2015-09-15 12:05:23 -07:00
John Ralls
44d4365046 Bug 754617 - Gnucash should use PKG_PROG_PKG_CONFIG
Actually we already do, making this fragment unnecessary. What's more
Ximian Desktop is long gone so the work-around is redundant as well.
2015-09-12 18:01:36 -07:00
Geert Janssens
10d81d653b Small doxigen improvements to previous commit 2015-09-09 14:03:54 +02:00
Matt
de3ca9d7d8 Bug754764Fix
Adds Doxygen Comments to file 'gnc-budget-view.c'.
2015-09-09 12:27:46 +02:00
yomlogs
eed42580f4 Bug 724738 - Value in "Display Symbol" field not saved
Updated gnc_ui_commodity_dialog_to_object() to call
gnc_commodity_set_user_symbol() for non-currency commodities.

https://bugzilla.gnome.org/show_bug.cgi?id=724738
2015-08-27 16:09:27 +02:00
Alex Aycinena
18073f6163 Remove e-mail form AUTHORS and DOCUMENTERS 2015-08-19 11:13:22 -07:00
John Ralls
8b66590631 Sort the source list from gnc-fq-check. 2015-08-17 10:12:22 +01:00
Alex Aycinena
e47cc8ff13 Correct wording on AUTHORS and DOCUMENTERS 2015-08-10 12:01:01 -07:00
Mike Alexander
054e6f7a22 Avoid passing invalid arguments to functions to get rid of some non-fatal asserts. 2015-08-10 03:16:45 -04:00
John Ralls
05fdefa306 Add note at the top to disuade users from contacting authors directly for support. 2015-08-10 07:58:55 +01:00
John Ralls
20242c5a3d Put the quotes back around the date string in gnc-fq-helper. 2015-08-02 08:38:12 -07:00