Commit Graph

28644 Commits

Author SHA1 Message Date
John Ralls
35946c8e1c [stock-txn-asst] Make action a StockTransactionEntry member.
Instead of a function paramter that's set and translated
inconsistently.
2023-09-10 10:32:48 -07:00
John Ralls
eebf505548 [stock-txn-asst] Reformat explanation messages to remove long lines. 2023-09-10 10:32:39 -07:00
Luna Jernberg
ccd6d5ccf4
Translation update by Luna Jernberg <droidbittin@gmail.com> using Weblate
po/sv.po: 100.0% (5524 of 5524 strings; 0 fuzzy)
2 failing checks (0.1%)
Translation: GnuCash/Program (Swedish)
Translate-URL: https://hosted.weblate.org/projects/gnucash/gnucash/sv/

Co-authored-by: Luna Jernberg <droidbittin@gmail.com>
2023-09-09 08:39:34 +02:00
Zdenko Podobný
d5f3cf5734
Translation update by Zdenko Podobný <zdenop@gmail.com> using Weblate
po/sk.po: 56.3% (3114 of 5524 strings; 1161 fuzzy)
374 failing checks (6.7%)
Translation: GnuCash/Program (Slovak)
Translate-URL: https://hosted.weblate.org/projects/gnucash/gnucash/sk/

Translation update  by Zdenko Podobný <zdenop@gmail.com> using Weblate

po/sk.po: 55.6% (3075 of 5524 strings; 1200 fuzzy)
413 failing checks (7.4%)
Translation: GnuCash/Program (Slovak)
Translate-URL: https://hosted.weblate.org/projects/gnucash/gnucash/sk/

Translation update  by Zdenko Podobný <zdenop@gmail.com> using Weblate

po/glossary/sk.po: 83.3% (180 of 216 strings; 17 fuzzy)
0 failing checks (0.0%)
Translation: GnuCash/Glossary (Slovak)
Translate-URL: https://hosted.weblate.org/projects/gnucash/glossary/sk/

Translation update  by Zdenko Podobný <zdenop@gmail.com> using Weblate

po/sk.po: 54.4% (3009 of 5524 strings; 1265 fuzzy)
487 failing checks (8.8%)
Translation: GnuCash/Program (Slovak)
Translate-URL: https://hosted.weblate.org/projects/gnucash/gnucash/sk/

Translation update  by Zdenko Podobný <zdenop@gmail.com> using Weblate

po/glossary/sk.po: 82.8% (179 of 216 strings; 17 fuzzy)
6 failing checks (2.7%)
Translation: GnuCash/Glossary (Slovak)
Translate-URL: https://hosted.weblate.org/projects/gnucash/glossary/sk/

Co-authored-by: Zdenko Podobný <zdenop@gmail.com>
2023-09-09 08:39:34 +02:00
Christopher Lam
7aa283fbab [gnc-account-sel.c] shortcut checks for account visibility 2023-09-09 14:38:42 +08:00
John Ralls
b5e5a0ed2f [stock-txn-asst] Add notes about cash-in-lieu and capgains.
Cash in lieu must be reported as a separate transaction. There was
already a note about that in reverse splits, apply it to regular
splits.

Add suggestion to enter a placeholder number when one can't
immediately calculate the capital gain on a sale or cover buy.
2023-09-08 16:05:03 -07:00
John Ralls
a2bd020b13 [stock-txn-asst] Call gettext on the transaction type explanation. 2023-09-08 16:05:03 -07:00
John Ralls
814754891f [stock-txn-asst] Don't generate stock splitinfo if no stock split. 2023-09-08 16:05:03 -07:00
John Ralls
fc4f4ae6d7 Bug 799054 - Stock Assist not functioning
* Get the sign right when calculating new shares
* Fix displaying values and units on the summary page
* Don't display "missing" for values when the user skips
  entering a 0 value.
* Create the Stock-account's fees split (when capitalizing)
  and cap-gains split.
2023-09-08 16:05:03 -07:00
John Ralls
c284f96286 [asst-stock-txn] Fix typo. 2023-09-08 16:05:03 -07:00
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
Robert Fewell
a2e99bdafc Bug 798995 - Keystrokes ignored during ledger entry
Some themes add additional pixels to list rows and dialogs, in this
case with 'TraditionalOK' 2 pixels are added to each entry in the
list and 2 to the popup. This make the calculation for the pop up
height wrong and so when compared to the allocation height it is
different so tries to resolve by re-poping the list and this
cuases an endless loop.

To fix this, use the calculated height which works for Adwaita but
if this is different to the popup allocation height use that.
2023-08-19 13:02:42 +01: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