If a file is opened from the history list and does not exist the dialog
advises of this and asks if it should be removed from the list. If a
file is opened from the command line and does not exist, the normal
dialog is used
taxinvoice was throwing an exception when there were taxes on bill entries.
It also did scan the invoice parts to determine if there were taxes and discounts.
When charging entries from bills we need to exclude taxes since the tax
rate of the invoice might be different than that of the bill.
This fixes Bug 776380 - Gross value of bills charged back instead of
net value (https://bugzilla.gnome.org/show_bug.cgi?id=776380)
xaccSplitSetValue and xaccSplitSetAmount round to the denominator found by
get_currency_denom and get_commodity_denom. The problem was that if the
commodity was unfindable because either the split’s parent or account hadn’t
been set (as is the case during loading, because the parent isn’t yet complete)
the returned denominator would be 100000, smaller than the max supported.
That would cause the value/amount to be prematurely rounded.
Guard against recursively calling the account doesn’t exist query or creation
dialog if one is already in the account creation dialog.
The underlying problem is that creating the dialog forces a UI update that
in turn sets the cell value and checks for the existence of the account.
In basic view the cell being displayed (“transfer”) isn’t the one being
changed (“account”) so the account check isn’t invoked, but in
multi-split view the “account” cell *is* displayed so the check is invoked
again.
Since they touch strings and user behavior they cannot go into maint.
The pull request now only includes the backend change. By that you can
easily tweak the invoice reports to show the net price.
Create one gncEntryGetPrice function which can create given price or
net price for both invoices and bills based on option parameters.
The master version of taxinvoice.eguile.scm needs this for bills too.
Add gncEntryGetNetPrice
Create an option in taxinvoice to either use gncEntryGetNetPrice or
gncEntryGetPrice
So far taxinvoice would show net or gross prices dependent on the internal flag tax_included.
This is inconsistent for the reader of the invoice since there is no notion of that flag.
This patch adds the option to always show net prices.
It does not change the default behaviour even if I would consider it broken.
I have added the resize function to all jqplot reports and an on load
function to bar and line charts. This last change is required when a
table is added to the report and the vertical scroll bar appears and
covers part of the plot. This was observed in the Gnucash and also when
opening the generated file in the gnome browser.
With these changes the reports are not created until the page is shown,
realized. It still uses the idle add to create the page but is started
from the realized call back. Doing it this way has the added advantage
that if the app is closed on a non report page, the next start up is
quicker as the reports are not created.
- Change locale from de_DE to fr_FR.utf8
- Expect correct thousands separator
This also partly undoes the previous commit (it removes the
test for gcc 5 or more)
Apparently gcc V4.8 provides a defective implementation of
std::locale which first doesn't support std::numpunct and second
throws the wrong exception type.
Unfortunately boost::locale isn't a solution because it uses the
gcc facets.
So for now, we don't compile that bit if gcc is too old.
To allow for a difference of 1 on very large numbers (>1e16). At the
same time made the test harder with a wider range, skipping cases where
the result overflows. Use GncRational::valid() instead of testing
components for both overflow and NaN.
Loses three bits so GncInt128 becomes really a GncInt125, but we don’t
really need the single order-of-magnitude: 10**38 is big enough. Saves
a full word of memory for each GncInt128, which means 2 words for GncRational.
That’s a 33% saving in memory for 64-bit and makes the object size the
same (32 bytes) for all architectures.
More consistent with GncNumeric and saves a word of memory per instance.
Still bleeping huge because the two GncInt128s each need 128 bits (2 or 4 words)
plus a word for status (for 3 bits!).
Also provide a couple of convenience functions, is_big() and valid() to
test if the either numerator and denominator is big or overflowed or NaN.
Similar to GncRational, except that it’s based on int64_t instead of
GncInt128 and throws instead of using a status byte.
Most calculations are performed using GncRational, the result is then
rounded (RoundType::half_down) to fit. GncRational should be used in
circumstances where the automatic rounding is undesirable.