John Ralls
917b4b247c
[stock-txn-asst] Fix sell-side stock amounts.
...
It was setting a negative amount in one too many places.
2023-09-08 16:05:03 -07:00
John Ralls
502dcc03ce
[stock-txn-asst] Extract Logger class
2023-09-08 16:05:03 -07:00
John Ralls
e46195cba7
[stock-txn-asst] Move prepare details into Assistant Page member funcs.
...
Substantially simplifies the code by reducing the needed indirection.
In most cases the StockTransactionEntry has everything the page needs
and can be passed as a parameter, further simplifying the code.
2023-09-08 16:05:03 -07:00
John Ralls
4c916ada22
Make connect_signals and prepare StockAssistantController members.
2023-09-08 16:05:03 -07:00
John Ralls
30b41544ce
Make StockAssistantController's view member in-place instead of a unique_ptr.
...
Requires moving some parameters around so we can initialize it
correctly:
All of the view's pages need to take an Account* and get its commodity
or currency in their ctors, and creation of the builder has to move to
gnc_stock_transaction_assistant and get passed in.
2023-09-08 16:05:03 -07:00
John Ralls
89360252fb
Bug 798983 - Empty Orphan account appears after entering transactions in 5.3
...
Caused by trying to set the account on the blank split. The blank split
was present because the method used to clear the split list for the
receiving transaction in gnc_float_txn_to_txn_swap_accounts only removed
splits that belong to the transaction, and the blank split doesn't.
Adds new function xaccTransClearSplits to do a more thorough job.
Also improve the documentation for xaccSplitDestroy to better explain when
a transaction will be destroyed if it empties the split list.
# Please enter the commit message for your
changes. Lines starting
2023-09-08 15:08:44 -07:00
Christopher Lam
76ac345edb
Merge branch 'GNCAccountSel-default-commodity' into stable #1762
2023-09-08 17:24:44 +08:00
Andrea Andre
9d12874cec
Translation update by Andrea Andre <andrea.tsg19@slmail.me> using Weblate
...
po/ro.po: 48.6% (2689 of 5524 strings; 1752 fuzzy)
662 failing checks (11.9%)
Translation: GnuCash/Program (Romanian)
Translate-URL: https://hosted.weblate.org/projects/gnucash/gnucash/ro/
Co-authored-by: Andrea Andre <andrea.tsg19@slmail.me>
2023-09-07 21:55:29 +02:00
Christopher Lam
492f8c927c
[dialog-account] remove gnc_ui_new_accounts_from_name_window_with_types
2023-09-07 23:41:47 +08:00
Christopher Lam
c1bc9e17c6
[gncEntryLedger] don't use gnc_ui_new_accounts_from_name_window_with_types
...
use gnc_ui_new_accounts_from_name_with_defaults instead
2023-09-07 23:41:47 +08:00
Christopher Lam
58d5d4bc73
[gnc-account-sel] can specify any new account's default commodity
2023-09-07 23:41:47 +08:00
Christopher Lam
af371af172
[dialog-account] new: gnc_ui_new_account_with_types_and_commodity
...
same as gnc_ui_new_account_with_types but can specify new account's
default commodity
2023-09-07 23:41:42 +08:00
John Ralls
4206300dce
Bug 799075 - Saving display tab changes in Report Options does not work.
...
When altering a library report option change the default value, not
the value so that the option system recognizes user changes correctly.
2023-09-05 16:42:48 -07:00
Zdenko Podobný
4ffe1082c1
Translation update by Zdenko Podobný <zdenop@gmail.com> using Weblate
...
po/sk.po: 51.0% (2818 of 5524 strings; 1404 fuzzy)
530 failing checks (9.5%)
Translation: GnuCash/Program (Slovak)
Translate-URL: https://hosted.weblate.org/projects/gnucash/gnucash/sk/
Co-authored-by: Zdenko Podobný <zdenop@gmail.com>
2023-09-04 20:52:25 +02:00
Szia Tomi
09664063c4
Translation update by Szia Tomi <sziatomi01@gmail.com> using Weblate
...
po/glossary/hu.po: 100.0% (216 of 216 strings; 0 fuzzy)
0 failing checks (0.0%)
Translation: GnuCash/Glossary (Hungarian)
Translate-URL: https://hosted.weblate.org/projects/gnucash/glossary/hu/
Translation update by Szia Tomi <sziatomi01@gmail.com> using Weblate
po/hu.po: 69.4% (3837 of 5524 strings; 635 fuzzy)
1 failing checks (0.1%)
Translation: GnuCash/Program (Hungarian)
Translate-URL: https://hosted.weblate.org/projects/gnucash/gnucash/hu/
Co-authored-by: Szia Tomi <sziatomi01@gmail.com>
2023-09-04 20:52:24 +02:00
Andrea Andre
47589c43e1
Translation update by Andrea Andre <andrea.tsg19@slmail.me> using Weblate
...
po/ro.po: 48.6% (2688 of 5524 strings; 1779 fuzzy)
681 failing checks (12.3%)
Translation: GnuCash/Program (Romanian)
Translate-URL: https://hosted.weblate.org/projects/gnucash/gnucash/ro/
Translation update by Andrea Andre <andrea.tsg19@slmail.me> using Weblate
po/ro.po: 48.6% (2685 of 5524 strings; 1804 fuzzy)
701 failing checks (12.6%)
Translation: GnuCash/Program (Romanian)
Translate-URL: https://hosted.weblate.org/projects/gnucash/gnucash/ro/
Translation update by Andrea Andre <andrea.tsg19@slmail.me> using Weblate
po/ro.po: 48.5% (2681 of 5524 strings; 1837 fuzzy)
714 failing checks (12.9%)
Translation: GnuCash/Program (Romanian)
Translate-URL: https://hosted.weblate.org/projects/gnucash/gnucash/ro/
Co-authored-by: Andrea Andre <andrea.tsg19@slmail.me>
2023-09-04 20:52:24 +02:00
Andrea Andre
73d9bf73dc
Translation update by Andrea Andre <andrea.tsg19@slmail.me> using Weblate
...
po/ro.po: 48.5% (2683 of 5524 strings; 1897 fuzzy)
726 failing checks (13.1%)
Translation: GnuCash/Program (Romanian)
Translate-URL: https://hosted.weblate.org/projects/gnucash/gnucash/ro/
Co-authored-by: Andrea Andre <andrea.tsg19@slmail.me>
2023-09-02 20:56:03 +02:00
Jeremy White
f10948d21d
Remove reference to unused assistant subfield.
...
This did not cause trouble because the only use of this
was in a call to gnc_warning_dialog, which protects against
a NULL pointer.
2023-08-29 16:49:35 -05:00
Christopher Lam
7ce4198c20
rename string_to_gnc_numeric to gnc_numeric_from_string
2023-08-29 08:45:20 +08:00
Christopher Lam
75f6ee1817
[test-scm-engine] tests gnc-numeric-from-string
2023-08-29 08:30:52 +08:00
Christopher Lam
c45b9736ab
[gnc-numeric.cpp] parse integer + fraction; e.g."10 1/4" == 10.25
2023-08-29 08:30:30 +08:00
Christopher Lam
9802c80996
Bug 799069 - Multicurrency Invoice Payment
...
Don't use TransGetCurrency/SplitValue to show payment details. They
may convert to the user's home currency. Use SplitAccount's and
SplitAmount to show the payment details in the APAR currency.
2023-08-28 13:00:11 +08:00
Christopher Lam
eb2dd3ef0e
[csv-transaction-export.cpp] Refactor export into export_query_splits
...
account_splits handles XML_EXPORT_TRANS.
2023-08-26 20:29:18 +08:00
Christopher Lam
8fe9dc9845
Bug 799068 - csv export active register not working
...
XML_EXPORT_TRANS uses info->csva.account_list. XML_EXPORT_REGISTER
doesn't use an account list, and uses the register QofQuery
instead. Call account_splits once with a nullptr account.
2023-08-25 00:16:07 +08:00
Dimitris Mandalidis
3d1e11545a
Translation update by Dimitris Mandalidis <dimitris.mandalidis@gmail.com> using Weblate
...
po/el.po: 52.4% (2897 of 5524 strings; 1563 fuzzy)
546 failing checks (9.8%)
Translation: GnuCash/Program (Greek)
Translate-URL: https://hosted.weblate.org/projects/gnucash/gnucash/el/
Translation update by Dimitris Mandalidis <dimitris.mandalidis@gmail.com> using Weblate
po/el.po: 52.2% (2887 of 5524 strings; 1563 fuzzy)
546 failing checks (9.8%)
Translation: GnuCash/Program (Greek)
Translate-URL: https://hosted.weblate.org/projects/gnucash/gnucash/el/
Co-authored-by: Dimitris Mandalidis <dimitris.mandalidis@gmail.com>
2023-08-23 18:54:23 +02:00
Christopher Lam
bd2d3182d1
Revert "[gnc-tree-container.hpp] define GncTreeContainer"
2023-08-23 18:08:52 +08:00
Christopher Lam
737efe4c49
Revert "[assistant-csv-trans-import.cpp] uses GtkTreeModelContainer"
...
This reverts commit bea6b52d3f
.
2023-08-23 18:05:35 +08:00
Christopher Lam
bd7e4cbf9f
Revert "[assistant-csv-price-import.cpp] uses GtkTreeModelContainer"
...
This reverts commit f10d7a7c8e
.
2023-08-23 18:05:35 +08:00
Geert Janssens
422a47fd49
Lower cmake requirement again to cater for our slightly outdated build server
2023-08-23 09:50:00 +02:00
Geert Janssens
e2f8233e1e
Bug 798950 - Bug Report: Incorrect Currency Conversion and Provider Invoice Payment Recording
...
- Balancing lots always involves splits in the same account. So
the relevant number to use in the calculations is the split
amount, not the split value.
- Additionally don't assume transactions are single-currency.
So if amounts change, recalculate the associated values
based on deduced exchange rates.
- Finally if the lot balancing resulted in a split to be broken up
into two splits use conservative calculations for the new
splits' values to avoid introducing imbalances due to
rounding errors.
2023-08-21 16:01:27 +02:00
Christopher Lam
63eae802a1
[gnc-tree-container.hpp] bugfix in operator==
...
when comparing two GncTreeIter, if they both were end() iterators from
differing GtkTreeModels they would have been deemed equal. Amend so
that operator== returns false.
2023-08-19 22:42:30 +08:00
John Ralls
38435a75de
Bug 799060 - Consistent Crash in Invoices
...
{macOS] NSApp remembers the last menu set and if the window that owns
it is deleted then trying to reference that will crash. Avoid that
by reseting the menu to the next or previous window on the active
windows list when destroying a window.
2023-08-18 15:53:17 -07:00
Geert Janssens
6c99523a70
Bump minimum cmake version to 3.16
...
This allows to drop some conditionals for older versions
2023-08-18 18:57:00 +02:00
Christopher Lam
51e932c99a
Amendment last commit, must use std::make_optional
2023-08-18 23:21:32 +08:00
Christopher Lam
1e44d1a73a
[gnc-tree-container.hpp] if the GtkTreeModel is empty, init m_iter with std::nullopt
...
Thus an empty container will evaluate begin()==end() as true.
2023-08-18 23:10:42 +08:00
Robert Fewell
891e39363d
Fix Typo in previous commit, use Python3_INCLUDE_DIRS
2023-08-18 10:51:12 +01:00
Geert Janssens
29b7a9099d
Fix cmake warnings while searching for python
...
There is a new find module since cmake 3.12. Cmake 3.27 will start
emitting warnings if the old modules are still in use.
Current implementation supports both. As soon as we can bump our minimal
cmake version to 3.12, the old support code can be dropped as well.
2023-08-17 18:23:33 +02:00
Mike Alexander
3aa6e60f95
fix debugging output, no functional change.
2023-08-16 00:07:56 -04:00
Philippe Lamare
4ad7a701a7
Translation update by Philippe Lamare <ph.lamare@free.fr> using Weblate
...
po/fr.po: 99.9% (5523 of 5524 strings; 1 fuzzy)
0 failing checks (0.0%)
Translation: GnuCash/Program (French)
Translate-URL: https://hosted.weblate.org/projects/gnucash/gnucash/fr/
Co-authored-by: Philippe Lamare <ph.lamare@free.fr>
2023-08-15 19:51:14 +02:00
Christopher Lam
9213853a3b
[iter-to-stl] last merge: rename filename to gnc-tree-container.hpp
...
to reflect class name
2023-08-15 13:25:39 +08:00
Christopher Lam
d8a0e294dc
Merge branch 'iter-to-stl' into stable #1745
2023-08-15 13:09:05 +08:00
Christopher Lam
bea6b52d3f
[assistant-csv-trans-import.cpp] uses GtkTreeModelContainer
2023-08-15 12:41:40 +08:00
Christopher Lam
f10d7a7c8e
[assistant-csv-price-import.cpp] uses GtkTreeModelContainer
2023-08-15 12:41:40 +08:00
Christopher Lam
d5b5d01698
[gnc-tree-model-container.hpp] GtkTreeModelContainer
2023-08-15 12:32:17 +08:00
Carsten Hütter
f6f305fdee
Translation update by Carsten Hütter <Carsten.Huetter@gmx.de> using Weblate
...
po/de.po: 100.0% (5524 of 5524 strings; 0 fuzzy)
1 failing checks (0.1%)
Translation: GnuCash/Program (German)
Translate-URL: https://hosted.weblate.org/projects/gnucash/gnucash/de/
Co-authored-by: Carsten Hütter <Carsten.Huetter@gmx.de>
2023-08-14 20:48:52 +02:00
Christian Wehling
9164c3fea6
Translation update by Christian Wehling <christian.wehling@web.de> using Weblate
...
po/glossary/de.po: 100.0% (216 of 216 strings; 0 fuzzy)
5 failing checks (2.3%)
Translation: GnuCash/Glossary (German)
Translate-URL: https://hosted.weblate.org/projects/gnucash/glossary/de/
Translation update by Christian Wehling <christian.wehling@web.de> using Weblate
po/de.po: 100.0% (5524 of 5524 strings; 0 fuzzy)
1 failing checks (0.1%)
Translation: GnuCash/Program (German)
Translate-URL: https://hosted.weblate.org/projects/gnucash/gnucash/de/
Co-authored-by: Christian Wehling <christian.wehling@web.de>
2023-08-14 20:48:52 +02:00
Carsten Hütter
e3e62c8363
Translation update by Carsten Hütter <Carsten.Huetter@gmx.de> using Weblate
...
po/de.po: 100.0% (5524 of 5524 strings; 0 fuzzy)
6 failing checks (0.1%)
Translation: GnuCash/Program (German)
Translate-URL: https://hosted.weblate.org/projects/gnucash/gnucash/de/
Translation update by Carsten Hütter <Carsten.Huetter@gmx.de> using Weblate
po/de.po: 99.7% (5512 of 5524 strings; 10 fuzzy)
11 failing checks (0.1%)
Translation: GnuCash/Program (German)
Translate-URL: https://hosted.weblate.org/projects/gnucash/gnucash/de/
Co-authored-by: Carsten Hütter <Carsten.Huetter@gmx.de>
2023-08-14 03:52:28 +02:00
Stephan Paternotte
2bce6bd387
Translation update by Stephan Paternotte <stephan@paternottes.net> using Weblate
...
po/nl.po: 100.0% (5524 of 5524 strings; 0 fuzzy)
0 failing checks (0.0%)
Translation: GnuCash/Program (Dutch)
Translate-URL: https://hosted.weblate.org/projects/gnucash/gnucash/nl/
Co-authored-by: Stephan Paternotte <stephan@paternottes.net>
2023-08-14 03:52:27 +02:00
Carsten Hütter
8fa8ee69b4
Translation update by Carsten Hütter <Carsten.Huetter@gmx.de> using Weblate
...
po/de.po: 99.7% (5509 of 5524 strings; 12 fuzzy)
12 failing checks (0.2%)
Translation: GnuCash/Program (German)
Translate-URL: https://hosted.weblate.org/projects/gnucash/gnucash/de/
Co-authored-by: Carsten Hütter <Carsten.Huetter@gmx.de>
2023-08-12 12:46:10 +02:00
Christopher Lam
9fea6a87c5
[gnucash-cli] doesn't need gnc-gnome-utils anymore
...
removing 4k from the gnucash-cli file
2023-08-12 00:07:27 +08:00