Commit Graph

20578 Commits

Author SHA1 Message Date
Christopher Lam
4d22890d16 [commodity-utilities] optimize weighted-average price calculator
(get-commoditylist-totalavg-prices) will generate a whole-book
splitlist. This is then filtered to 'interesting' splits only, and
sorted by posted date.

This sorted, filtered list is then filtered to each commodity, and
passed down as argument to (gnc:get-commodity-totalavg-prices) to be
used immediately, rather than calling the expensive function
(gnc:get-match-commodity-splits-sorted) which eventually creates a
query for each commodity.
2018-10-12 17:02:29 +08:00
Frank H. Ellenberger
e23ce385e1 Remove unset color slot from SKR49
See Bug 796887
2018-10-11 10:10:34 +02:00
Christoph Franzen
116ea7a46d Bug 795425 - Version 2018 of german account template SKR49 ...
Datev-Kontenrahmen SKR49 für Vereine, Stiftungen und gemeinnützige GmbHs
2018-10-11 10:10:34 +02:00
Pedro Albuquerque
a777666c2e updated pt.po
5238 translated messages, 1 untranslated message.
2018-10-11 08:58:58 +02:00
Frank H. Ellenberger
c713540def Merge recent changes in pt.po
5082 translated messages, 114 fuzzy translations, 43 untranslated
messages.
2018-10-11 02:03:13 +02:00
Pedro Albuquerque
17ff6aa0a3 updated po/glossary/pt.po 2018-10-09 09:49:08 +01:00
Pedro Albuquerque
b1e96f5e40 Updated pt.po 2018-10-09 09:08:50 +01:00
Christopher Lam
23d2ed708e [net-charts] remove doubles. send pure numbers to charts. 2018-10-09 08:53:00 +08:00
Christopher Lam
b1f03ecd9e [net-charts] rename variables to mathematical terms
This report seems to have evolved from a pure asset-liability
chart. It handles income-expense too, so rename to minuend-subtrahend
to be generic.

Also report percentages done.
2018-10-09 08:53:00 +08:00
Christopher Lam
3f2a9022bf [net-charts] simplify date-list variables
dates-list is now a list of time64 for both inc-exp and net-worth
therefore we can combine the strings.
2018-10-09 08:53:00 +08:00
Christopher Lam
a86d17e77d [net-charts] modify process-datelist to cycle balancelist once
This will deconstruct process-datelist to not call the utility
(gnc:accounts-get-comm-total-*) functions which are still slow,
because they will cycle through the balancelist for each account. In a
large enough report, the balance list may be thousands of entries
long, and we don't want to cycle through them every time.

This commit will loop all so that the balances are cycled once only.
2018-10-09 08:53:00 +08:00
Christopher Lam
ab97eed979 [net-charts] modify process-datelist to use account-balances
This will retrieve the cached balances in account-balances, rather
than calling (gnc:account-get-comm-balance-interval)
or (gnc:account-get-comm-balance-at-date) which are very expensive
because they will call xaccAccountGetBalanceAsOfDate which will scan
the account splitlist every time.
2018-10-09 08:53:00 +08:00
Christopher Lam
cacb15c3f3 [net-charts] create account->balancelist
This function will scan the splitlist for account, and build a list of
balances at the dates specified in the dates-list variable.
2018-10-09 08:53:00 +08:00
Christopher Lam
53cab269f4 [test-charts] add basic test for net-charts amounts & dates
This is similar to test-standard-net-linechart but designed to test
date boundaries. Creates book with following entries in bank accounts,
and calculates amounts at each date boundary.

             Bank1 Bank2 Bank3

    05/05/69               $25

01/01/1970

    05/01/70               $25
    12/01/70   $10
    18/01/70   $15   $50

01/02/1970

    18/02/70         $50

01/03/1970

    03/03/70  $200

01/04/1970

15/04/1970
2018-10-09 08:53:00 +08:00
Pedro Albuquerque
0f2e89afb8 updated pt.po 2018-10-08 15:06:03 +01:00
Christopher Lam
caa3807f05 Revert "Revert "[net-charts] deoptimize accounts-list""
This reverts commit 70bc472ffe.
2018-10-08 10:33:59 +08:00
Christopher Lam
4102e7007e [test-report-utilities] gnc:strify tests 2018-10-08 00:24:22 +08:00
Christopher Lam
9d25b25be3 [report-utilities] add (gnc:strify) and (gnc:pk) for debugging
The (gnc:strify) function will take an object, and try various methods
to display a useful output. Instead of a cryptic "#<swig-pointer
Split * 55a7079b2660> () # ?" message it can show
"Split<d:02/05/2018,acc:Bank1,amt:$20,val:$20>"

The (gnc:pk) function is a debugging tool. It will dump all arguments
via gnc:strify to console and return the last argument. In addition,
it will print the time stamp since the procedure was defined, and the
delta time since the last (gnc:pk) call.

(gnc:pk "call weird-fn with " acc " = " (weird-fn acc))
(gnc:pk "call another-fn =" (another-fn))

[d2.3243 t2.3243] call weird-fn with Acc<Bank> = Mon<$25.00>
[d0.1000 t2.4243] call another-fn = #t

This would suggest that (weird-fn acc) ran for 0.1 seconds, and
returned a gnc:gnc-monetary object.
2018-10-08 00:24:22 +08:00
Tom Lofts
820cd842f1 Bug 796893 - invoice.GetDatePosted() and other date related...
functions returns strange values for uninitalised dates.

Convert time64 equal to INT64_MAX to Python's None value.
2018-10-06 14:59:52 -07:00
John Ralls
7a4b06c442 Bug 796878 - test-qofsession fails on x86_32. 2018-10-04 15:44:32 -07:00
John Ralls
a8c884016e Make the case of the Mac help directories the same as in the Bundle.
Using the preferred camel-case rendering.
2018-10-04 14:06:13 -07:00
John Ralls
3eab36e832 Reindent Mac version of gnc_gnome_help. 2018-10-04 14:06:12 -07:00
Geert Janssens
e068366277 Bug 796772 - Receivable Ageing Report invalid URL for Totals column
Use some pointer arithmetic to split the owner guid into a separate
string before handing it over to boost::uuid for interpretation
2018-10-01 13:18:25 +02:00
Di Mang
893383ce9b removing double semicolons at the end of lines 2018-09-30 19:10:50 +02:00
John Ralls
65c8357f53 Release 3.3 2018-09-29 16:05:55 -07:00
John Ralls
b7be8d59b7 Remove engine-deprecated.i from CMakeLists.txt.
It wasn't created in the timespec functions deprecation commit.
2018-09-29 13:01:29 -07:00
John Ralls
8d90966251 Update Farsi and Ukrainian translations from the Translation Project.
Includes re-applying http://bugzilla.gnome.org -> https://bugs.gnucash.org.
2018-09-29 12:44:09 -07:00
Geert Janssens
c96fb6209c Bug 795821 - GnuCash could not obtain the lock for file://C:\Users\username\Documents\GnuCash\2.6.21\xxxx\xxxx.gnucash 2018-09-28 22:15:56 +02:00
Geert Janssens
406953c2ae Bug 796820 - References to 'Gnome Bugzilla' should be changed to 'GnuCash Bugzilla'
Additionally use https everywhere to refer to bugs.gnucash.org or bugzilla.gnome.org
2018-09-28 15:00:43 +02:00
John Ralls
26714d2e17 Bug 792446 - Mixed languages in error dialog. 2018-09-27 18:05:42 -07:00
Geert Janssens
2094282790 Merge branch 'block-pref' of https://github.com/Bob-IT/gnucash into maint 2018-09-27 21:57:39 +02:00
Robert Fewell
b6f2b111bc Block registered prefs when preference dialogue loaded
When the preference dialogue is loaded and options are set, the ones
with registered callbacks fire causing parts of Gnucash to be updated.
This was observed with gnc_split_register_load being executed 5 times
for each open register when the preference dialogue was loaded.

To overcome this, a couple of functions have been created to block and
unblock all registered prefs and used while the preference dialogue is
loaded.
2018-09-27 15:57:34 +01:00
Geert Janssens
02e3a747e4 Merge branch 'patch-1' of https://github.com/myaser/gnucash into maint 2018-09-26 09:57:12 +02:00
Mahmoud Yaser
3e014f189f
Update change_tax_code.py 2018-09-26 08:21:17 +02:00
Geert Janssens
ed436f4151 Bug 796819 - bad icon with Spanish localization
Drop translations of the 'gnucash-icon' string from our po files
and add a note for translators to not translate this string or
use the litteral 'gnucash-icon' as translation
2018-09-24 23:05:59 +02:00
Geert Janssens
9261cabfbb Bug 787439 - Segmentation Fault in Transfer dialog after clearing Date field and pressing escape
Disconnect date edit's focus-out callback before destroying the transfer dialog widget.
This should prevent the callback being triggered while the widget's internal state
is being destroyed.
2018-09-24 19:34:18 +02:00
Geert Janssens
c4b40dbf46 Bug 796816 - Notes field in Duplicate Invoice dialogue is 'read-only' 2018-09-24 18:35:10 +02:00
Geert Janssens
9c9068cf5a Use proper GtkAction function instead of generic g_object call 2018-09-24 18:24:40 +02:00
Mahmoud Yaser
f726238865
Update change_tax_code.py 2018-09-24 17:21:16 +02:00
Geert Janssens
f89a40e3eb Fix gtk accelerator mixups by explicitly disabling actions that are not relevant
The issue I found was with File->Print and its variants for various page types.
They all use the same '<primary>p' as global accelerator. It was possible to
have gnucash invoke the 'Print Report...' action instead of the 'Print Invoice...'
action when hitting <primary>p on an invoice page. If no report page was
open at this point, gnucash would crash. If a report was open, gnucash
would invoke the print action on that report instead of opening an
invoice report for the invoice. This looks like a bug internally in
the gtkaction handling or our improper use of it. However I could
work around it by disabling action groups before unmerging them.
2018-09-24 17:15:11 +02:00
Mahmoud Yaser
3b416f07be
Update change_tax_code.py 2018-09-24 11:12:16 +02:00
John Ralls
26a179872d Don't create 2 new books for every new session.
And don't ask to save a not-dirty or empty book, fixing
Bug 794870 - If no book is opened, gnucash still asks if the user wants
to save changes when opening a file
2018-09-23 16:42:11 -07:00
Geert Janssens
1c5eb86d90 Simplify GNCQueryView's data model
It was managing a number of redudant parameters which were leaking
memory all over the place. The information that was tracked could
easily be extracted from the underlying GtkTreeView, GtkTreeModel
or GtkTreeSelection when needed.
2018-09-23 22:19:56 +02:00
Geert Janssens
9bec660fba Revert "Fix memory leaks in GncQueryView"
This reverts commit 5609b704c5.

While it fixed the memory leaks it also caused gnucash to crash
when trying to search for invoices. Will be redone differently
in a follow-up commit.
2018-09-23 22:19:14 +02:00
Geert Janssens
164f484718 Open customer/vendor/employee report when double-clicking an the respective owner the cust/vend/empl overview page
Before this action would open the cust/vend/empl edit window. However opening the report is a much
more common use case so it makes sense to make that one default.
2018-09-23 17:35:34 +02:00
Geert Janssens
3991ccb9c2 Cache current owner balances
These are queried continuously by the owner tree view (on Customer/Vendor/Employee
Overview pages) and recalculating them is an expensive operation.
The cache will be invalidated each time a lot reated to the owner
changes (modify or delete). The net effect is a huge responsiveness
improvement of said overviews in case of a large book.
2018-09-23 16:00:41 +02:00
Christoph Holtermann
64a28b5263 xrange deprecated in python3, change to range
thanks to Sumit Bhardwaj for the hint
2018-09-22 18:12:11 +02:00
John Ralls
40bcd1e377 Bump the max_denom_mult to match the new GNC_COMMODITY_MAX_FRACTION. 2018-09-21 14:33:02 -07:00
John Ralls
4fe12f5422 Some more magic number replacements. 2018-09-21 14:32:03 -07:00
John Ralls
87533fe4bc Catch std::underflow_error as well as std::overflow_error.
Any operation that can overflow will throw an underflow if it's a
negative number. The C interface needs to catch both to prevent
unhandled exception crashes,
2018-09-21 14:28:49 -07:00