Commit Graph

24219 Commits

Author SHA1 Message Date
John Ralls
4f030aac6e Bug 798093 - Changing the symbol/abbreviation of a security...
after the trading account was created breaks GnuCash.

Revisited. The original changeset looked for a top level trading account
and a namespace account in the transaction currency; if either of those
accounts had been created in a different currency it would duplicate
them.

This commit will accept any such account regardless of commodity. If
more than one exists it will prefer the one in the root currency if
there is one, otherwise it will select the first one found.
2021-05-12 09:00:51 -07:00
John Ralls
18c72baddf Don't bother scrubbing for orphans if there's no transaction currency.
If it found one it would try to create an orphan account with no
currency which will crash later.
2021-05-11 14:43:45 -07:00
John Ralls
2b48fd375d Revert "Fix duplicate trading accounts."
This reverts commit ed486a58a4.
2021-05-03 17:16:23 -07:00
Eugenia Russell
a60471c951 Translation update by Eugenia Russell <eugenia.russell2019@gmail.com> using Weblate
po/el.po: 53.4% (2931 of 5479 strings; 1501 fuzzy)
611 failing checks (11.1%)
Translation: GnuCash/Program (Greek)
Translate-URL: https://hosted.weblate.org/projects/gnucash/gnucash/el/

Co-authored-by: Eugenia Russell <eugenia.russell2019@gmail.com>
2021-05-01 18:54:17 +02:00
Arve Eriksson
6cbc650d23 Translation update by Arve Eriksson <031299870@telia.com> using Weblate
po/glossary/sv.po: 85.5% (178 of 208 strings; 16 fuzzy)
0 failing checks (0.0%)
Translation: GnuCash/Glossary (Swedish)
Translate-URL: https://hosted.weblate.org/projects/gnucash/glossary/sv/

Co-authored-by: Arve Eriksson <031299870@telia.com>
2021-05-01 18:54:17 +02:00
John Ralls
ac1abcb8c3 Fix reversed parameters in call to xaccAccountTypesCompatible.
Missed in 2258e7a4.
2021-05-01 09:53:56 -07:00
John Ralls
ca6fcf8af7 Restore French localizations to stripped Docker image. 2021-04-30 12:28:33 -07:00
Christopher Lam
185eb4465e [test-ifrs-cost-basis] rename functions and report name 2021-04-30 19:42:52 +08:00
Christopher Lam
254ccacafa Merge branch 'maint-ACB-report' into maint #978 2021-04-30 19:31:13 +08:00
Christopher Lam
3168347ab7 [ifrs-cost-basis] initial commit
Candidate Report https://bugs.gnucash.org/show_bug.cgi?id=797796#c153
2021-04-30 19:28:38 +08:00
Christopher Lam
14c523e4f1 [test-engine-extras] augment book data generators
* txn-currency can be specified explicitly instead of currency of
first split
* split memos can be specified

Note test-register.scm gets some changes because the Trans Num field
was erroneously saved into Split Action fields. Now the num field is
only copied into the TransNum field.
2021-04-30 08:55:26 +08:00
Christopher Lam
c38740fcd9 [report-utilities] more dump data functions
Two API to dump splits in whole book:
* gnc:dump-book             - splits grouped by account
* gnc:dump-all-transactions - splits grouped by transaction
* gnc:dump-split - dumps single split

Example output -- note (gnc:dump-book) dumps each account followed by
its splits, then account balance. (gnc:dump-all-transactions) dumps all
transactions in date order, each followed by its splits.

(gnc:dump-book)

Account 8e56ef54: <Expense> Comm<USD> Type<Expense>
n Split 5dd1c0a9: 05/11/19 Amt<$200.00> $200.00 Desc<vend1> Memo<AP>
n Split f9cb052f: 05/11/19 Amt<$20.00> $20.00 Desc<emp1> Memo<vouch1>
n Split daafc64b: 05/11/19 Amt<$69.00> $69.00 Desc<vend1> Memo<job-bill>
n Split 5e6af9fe: 14/11/19 Amt<$86.00> $86.00 Desc<emp1> Memo<emp-voucher>
n Split 6d636ea2: 14/11/19 Amt<$46.00> $46.00 Desc<vend1>
n Split e618644b: 14/12/19 Amt<-$100.00> -$100.00 Desc<Vend-USD>
n Split 8be19fbd: 25/12/19 Amt<-$46.00> -$46.00 Desc<Vend-USD> Memo<CN$100-desc>
n Split ee4fe250: 01/04/20 Amt<$32.00> $32.00 Desc<Cell phone>
n Split 2cb02dac: 09/05/20 Amt<-$307.00> -$307.00
         Balance: $0.00 Cleared: $0.00 Reconciled: $0.00

Account 6f39f557: <Closing> Comm<USD> Type<Equity>
n Split 13916652: 09/05/20 Amt<$307.00> $307.00
         Balance: $307.00 Cleared: $0.00 Reconciled: $0.00

Account fa6507e1: <Closing:GBP> Comm<GBP> Type<Equity>
n Split 34ce3c03: 09/05/20 Amt<-£1,293.00> -£1,293.00
         Balance: -£1,293.00 Cleared: £0.00 Reconciled: £0.00

(gnc:dump-all-transactions)

  Trans cfbbc2a4: 12/07/19 Curr GBP  Desc<Customer-GBP>
n Split d12f74b2: 12/07/19 Acc<AR-GBP> Amt<£120.00> £120.00 Desc<Customer-GBP> Memo<due 91+>
n Split 3880e99c: 12/07/19 Acc<Standard Sales> Amt<-£20.00> -£20.00 Desc<Customer-GBP> Memo<due 91+>
n Split 6bd9c7e4: 12/07/19 Acc<Income-GBP> Amt<-£100.00> -£100.00 Desc<Customer-GBP> Memo<due 91+>

  Trans 60344bab: 09/10/19 Curr GBP  Desc<Customer-GBP>
n Split aaca8ee0: 09/10/19 Acc<AR-GBP> Amt<£225.00> £225.00 Desc<Customer-GBP> Memo<due 2-3 months ago>
n Split ee49bde8: 09/10/19 Acc<Standard Sales> Amt<-£20.00> -£20.00 Desc<Customer-GBP> Memo<due 2-3 months ago>
n Split e989e863: 09/10/19 Acc<Reduced Sales> Amt<-£5.00> -£5.00 Desc<Customer-GBP> Memo<due 2-3 months ago>
n Split 91d6cadd: 09/10/19 Acc<Income-GBP> Amt<-£200.00> -£200.00 Desc<Customer-GBP> Memo<due 2-3 months ago
2021-04-30 08:54:46 +08:00
Giuseppe Foti
e3d4bd2e24 Translation update by Giuseppe Foti <foti.giuseppe@gmail.com> using Weblate
po/it.po: 100.0% (5479 of 5479 strings; 0 fuzzy)
0 failing checks (0.0%)
Translation: GnuCash/Program (Italian)
Translate-URL: https://hosted.weblate.org/projects/gnucash/gnucash/it/

Co-authored-by: Giuseppe Foti <foti.giuseppe@gmail.com>
2021-04-30 01:11:56 +02:00
Eugenia Russell
13871595ea Translation update by Eugenia Russell <eugenia.russell2019@gmail.com> using Weblate
po/glossary/el.po: 95.1% (198 of 208 strings; 9 fuzzy)
0 failing checks (0.0%)
Translation: GnuCash/Glossary (Greek)
Translate-URL: https://hosted.weblate.org/projects/gnucash/glossary/el/

Translation update  by Eugenia Russell <eugenia.russell2019@gmail.com> using Weblate

po/glossary/el.po: 93.7% (195 of 208 strings; 10 fuzzy)
0 failing checks (0.0%)
Translation: GnuCash/Glossary (Greek)
Translate-URL: https://hosted.weblate.org/projects/gnucash/glossary/el/

Translation update  by Eugenia Russell <eugenia.russell2019@gmail.com> using Weblate

po/el.po: 53.4% (2927 of 5479 strings; 1503 fuzzy)
611 failing checks (11.1%)
Translation: GnuCash/Program (Greek)
Translate-URL: https://hosted.weblate.org/projects/gnucash/gnucash/el/

Co-authored-by: Eugenia Russell <eugenia.russell2019@gmail.com>
2021-04-30 01:11:55 +02:00
Avi Markovitz
b485f42f93 Translation update by Avi Markovitz <avi.markovitz@gmail.com> using Weblate
po/he.po: 100.0% (5479 of 5479 strings; 0 fuzzy)
0 failing checks (0.0%)
Translation: GnuCash/Program (Hebrew)
Translate-URL: https://hosted.weblate.org/projects/gnucash/gnucash/he/

Co-authored-by: Avi Markovitz <avi.markovitz@gmail.com>
2021-04-30 01:11:55 +02:00
John Ralls
705db5aa0b Merge Hong Xu's 'from-to-price' into maint. 2021-04-29 16:10:30 -07:00
John Ralls
b8e22b3655 Fix archlinux dockerfile for github actions CI 2021-04-29 16:06:27 -07:00
Hong Xu
888676eb31 from_price and to_price may be uninitialized in extract_comon_prices
Fix the compilation error on gcc 10:

    gnucash/libgnucash/engine/gnc-pricedb.c: In function ‘extract_common_prices’:
    gnucash/libgnucash/engine/gnc-pricedb.c:2469:40: error:
    to_price may be used uninitialized in this function [-Werror=maybe-uninitialized]
     2469 |     if (from_price == NULL || to_price == NULL)
           |                                        ^
           gnucash/libgnucash/engine/gnc-pricedb.c:2469:20:
           error: ‘from_price’ may be used uninitialized in this
           function [-Werror=maybe-uninitialized]
            2469 |     if (from_price == NULL || to_price == NULL)
                  |                    ^
2021-04-29 14:51:07 -07:00
Christopher Lam
37afd65f26 [income-gst-statement] amend headers post Brexit
UK left EU, therefore VAT headers have now changed.
2021-04-29 07:17:20 +08:00
John Ralls
d60d5c30d2 Bug 798177 - Price of new stock transactions not saved in price database
Add call to xaccTransRecordPrice after every call to xaccTransCommitEdit
in gnc_split_register_save.
2021-04-26 12:13:53 -07:00
John Ralls
6bb4faac58 Bug 795804 - Extremely slow save
Only update the status bar when the percentage changes by at least 1%
because running the mainloop is expensive on macOS and Microsoft
Windows. This speeds up all operations that run the progress bar with
overly-fine resolution.
2021-04-26 12:13:53 -07:00
Giuseppe Foti
2392bc2442 Translation update by Giuseppe Foti <foti.giuseppe@gmail.com> using Weblate
po/it.po: 99.7% (5466 of 5479 strings; 10 fuzzy)
5 failing checks (0.1%)
Translation: GnuCash/Program (Italian)
Translate-URL: https://hosted.weblate.org/projects/gnucash/gnucash/it/

Co-authored-by: Giuseppe Foti <foti.giuseppe@gmail.com>
2021-04-26 10:32:03 +02:00
Frank H. Ellenberger
42a41c792d I18N: Another improvement of price source list 2021-04-26 03:57:13 +02:00
Guille Lopez
58abf252a3 Translation update by Guille Lopez <willelopz@gmail.com> using Weblate
po/es.po: 94.7% (5193 of 5479 strings; 242 fuzzy)
83 failing checks (1.5%)
Translation: GnuCash/Program (Spanish)
Translate-URL: https://hosted.weblate.org/projects/gnucash/gnucash/es/

Co-authored-by: Guille Lopez <willelopz@gmail.com>
2021-04-26 01:16:43 +02:00
Christopher Lam
ae7eb9b3ad [gnc-pricedb] extract common code into get_nearest_price
Extracts common code in:

* gnc_pricedb_get_nearest_before_price
* gnc_pricedb_get_nearest_price
* gnc_pricedb_get_latest_price
2021-04-26 07:16:25 +08:00
Christopher Lam
a2f5223148 [gnc-pricedb] use g_list_find and plug memory leak
found_coms was not being freed.
2021-04-26 07:16:25 +08:00
Christopher Lam
a37060c95d ignore .vscode folder 2021-04-26 07:16:25 +08:00
Frank H. Ellenberger
973a0bb708 Reorder and relabel price source list for better coherence 2021-04-25 22:08:34 +02:00
TianXing_Yi
b168de77af Translation update by TianXing_Yi <duguqiubailee@gmail.com> using Weblate
po/zh_CN.po: 58.4% (3200 of 5479 strings; 1579 fuzzy)
627 failing checks (11.4%)
Translation: GnuCash/Program (Chinese (Simplified))
Translate-URL: https://hosted.weblate.org/projects/gnucash/gnucash/zh_Hans/

Translation update  by TianXing_Yi <duguqiubailee@gmail.com> using Weblate

po/zh_CN.po: 58.3% (3196 of 5479 strings; 1582 fuzzy)
627 failing checks (11.4%)
Translation: GnuCash/Program (Chinese (Simplified))
Translate-URL: https://hosted.weblate.org/projects/gnucash/gnucash/zh_Hans/

Co-authored-by: TianXing_Yi <duguqiubailee@gmail.com>
2021-04-25 21:06:05 +02:00
Frank H. Ellenberger
a4fd8e8b3b I18N: Unify period labels; quote terms in a tooltip 2021-04-25 20:44:32 +02:00
Milo Ivir
1b57c297af Translation update by Milo Ivir <mail@milotype.de> using Weblate
po/hr.po: 99.9% (5478 of 5479 strings; 0 fuzzy)
0 failing checks (0.0%)
Translation: GnuCash/Program (Croatian)
Translate-URL: https://hosted.weblate.org/projects/gnucash/gnucash/hr/

Co-authored-by: Milo Ivir <mail@milotype.de>
2021-04-25 00:59:34 +02:00
TianXing_Yi
6103723d69 Translation update by TianXing_Yi <duguqiubailee@gmail.com> using Weblate
po/zh_CN.po: 58.1% (3186 of 5479 strings; 1589 fuzzy)
629 failing checks (11.4%)
Translation: GnuCash/Program (Chinese (Simplified))
Translate-URL: https://hosted.weblate.org/projects/gnucash/gnucash/zh_Hans/

Translation update  by TianXing_Yi <duguqiubailee@gmail.com> using Weblate

po/zh_CN.po: 57.9% (3177 of 5479 strings; 1595 fuzzy)
631 failing checks (11.5%)
Translation: GnuCash/Program (Chinese (Simplified))
Translate-URL: https://hosted.weblate.org/projects/gnucash/gnucash/zh_Hans/

Co-authored-by: TianXing_Yi <duguqiubailee@gmail.com>
2021-04-25 00:59:34 +02:00
Anonymous
46582a66a4 Translation update by Anonymous <noreply@weblate.org> using Weblate
po/glossary/fr.po: 100.0% (209 of 209 strings; 0 fuzzy)
0 failing checks (0.0%)
Translation: GnuCash/Glossary (French)
Translate-URL: https://hosted.weblate.org/projects/gnucash/glossary/fr/

Co-authored-by: Anonymous <noreply@weblate.org>
2021-04-25 00:59:34 +02:00
Thomas Jungers
2e78ffdc8b Translation update by Thomas Jungers <thomasjungers@gmail.com> using Weblate
po/glossary/fr.po: 100.0% (209 of 209 strings; 0 fuzzy)
0 failing checks (0.0%)
Translation: GnuCash/Glossary (French)
Translate-URL: https://hosted.weblate.org/projects/gnucash/glossary/fr/

Translation update  by Thomas Jungers <thomasjungers@gmail.com> using Weblate

po/fr.po: 74.7% (4096 of 5479 strings; 982 fuzzy)
484 failing checks (8.8%)
Translation: GnuCash/Program (French)
Translate-URL: https://hosted.weblate.org/projects/gnucash/gnucash/fr/

Translation update  by Thomas Jungers <thomasjungers@gmail.com> using Weblate

po/fr.po: 73.8% (4046 of 5479 strings; 985 fuzzy)
485 failing checks (8.8%)
Translation: GnuCash/Program (French)
Translate-URL: https://hosted.weblate.org/projects/gnucash/gnucash/fr/

Co-authored-by: Thomas Jungers <thomasjungers@gmail.com>
2021-04-25 00:59:34 +02:00
Christopher Lam
be1c67e593 Translation update by Christopher Lam <christopher.lck@gmail.com> using Weblate
po/fr.po: 73.8% (4046 of 5479 strings; 985 fuzzy)
485 failing checks (8.8%)
Translation: GnuCash/Program (French)
Translate-URL: https://hosted.weblate.org/projects/gnucash/gnucash/fr/

Co-authored-by: Christopher Lam <christopher.lck@gmail.com>
2021-04-25 00:59:33 +02:00
Thomas Jungers
9ec6e58c86 Translation update by Thomas Jungers <thomasjungers@gmail.com> using Weblate
po/fr.po: 73.8% (4046 of 5479 strings; 985 fuzzy)
485 failing checks (8.8%)
Translation: GnuCash/Program (French)
Translate-URL: https://hosted.weblate.org/projects/gnucash/gnucash/fr/

Co-authored-by: Thomas Jungers <thomasjungers@gmail.com>
2021-04-25 00:59:33 +02:00
Christopher Lam
92521c8623 Translation update by Christopher Lam <christopher.lck@gmail.com> using Weblate
po/fr.po: 73.8% (4046 of 5479 strings; 985 fuzzy)
485 failing checks (8.8%)
Translation: GnuCash/Program (French)
Translate-URL: https://hosted.weblate.org/projects/gnucash/gnucash/fr/

Co-authored-by: Christopher Lam <christopher.lck@gmail.com>
2021-04-25 00:59:33 +02:00
John Ralls
ed486a58a4 Fix duplicate trading accounts.
In many cases GnuCash would create a new trading account hierarchy
when one already existed because gnc_account_lookup_by_type_and_commodity
didn't check the account presented and didn't recurse down the
account hierarchy correctly.
2021-04-24 15:51:32 -07:00
John Ralls
2258e7a44e xaccAccountTypes was backwards
vs. the documentation. The unit tests and dialog-account were similarly
backwards, but the use in gnucash/import-export/ofx followed the docs.
2021-04-24 15:51:32 -07:00
Christopher Lam
2e7fcad833 [balsheet-pnl] simplify code
inline single-use functions
2021-04-24 11:23:53 +08:00
Christopher Lam
66f228440b Remove more multichoice tooltips missed in #917 2021-04-24 11:23:53 +08:00
TianXing_Yi
92dac8284c Translation update by TianXing_Yi <duguqiubailee@gmail.com> using Weblate
po/zh_CN.po: 57.6% (3156 of 5479 strings; 1605 fuzzy)
635 failing checks (11.5%)
Translation: GnuCash/Program (Chinese (Simplified))
Translate-URL: https://hosted.weblate.org/projects/gnucash/gnucash/zh_Hans/

Translation update  by TianXing_Yi <duguqiubailee@gmail.com> using Weblate

po/zh_CN.po: 57.5% (3155 of 5479 strings; 1606 fuzzy)
635 failing checks (11.5%)
Translation: GnuCash/Program (Chinese (Simplified))
Translate-URL: https://hosted.weblate.org/projects/gnucash/gnucash/zh_Hans/

Translation update  by TianXing_Yi <duguqiubailee@gmail.com> using Weblate

po/glossary/zh_CN.po: 100.0% (214 of 214 strings; 0 fuzzy)
0 failing checks (0.0%)
Translation: GnuCash/Glossary (Chinese (Simplified))
Translate-URL: https://hosted.weblate.org/projects/gnucash/glossary/zh_Hans/

Co-authored-by: TianXing_Yi <duguqiubailee@gmail.com>
2021-04-23 21:32:06 +02:00
Sean Guan
d547c3a53e Translation update by Sean Guan <guanshangkang@gmail.com> using Weblate
po/zh_CN.po: 57.2% (3134 of 5479 strings; 1625 fuzzy)
635 failing checks (11.5%)
Translation: GnuCash/Program (Chinese (Simplified))
Translate-URL: https://hosted.weblate.org/projects/gnucash/gnucash/zh_Hans/

Co-authored-by: Sean Guan <guanshangkang@gmail.com>
2021-04-23 21:32:05 +02:00
Thomas Jungers
09d176cebf Translation update by Thomas Jungers <thomasjungers@gmail.com> using Weblate
po/fr.po: 70.5% (3868 of 5479 strings; 1130 fuzzy)
687 failing checks (12.5%)
Translation: GnuCash/Program (French)
Translate-URL: https://hosted.weblate.org/projects/gnucash/gnucash/fr/

Translation update  by Thomas Jungers <thomasjungers@gmail.com> using Weblate

po/glossary/fr.po: 100.0% (208 of 208 strings; 0 fuzzy)
0 failing checks (0.0%)
Translation: GnuCash/Glossary (French)
Translate-URL: https://hosted.weblate.org/projects/gnucash/glossary/fr/

Translation update  by Thomas Jungers <thomasjungers@gmail.com> using Weblate

po/fr.po: 70.1% (3845 of 5479 strings; 1151 fuzzy)
694 failing checks (12.6%)
Translation: GnuCash/Program (French)
Translate-URL: https://hosted.weblate.org/projects/gnucash/gnucash/fr/

Co-authored-by: Thomas Jungers <thomasjungers@gmail.com>
2021-04-23 21:32:05 +02:00
Christopher Lam
2ba930713a Add new price source - 'nearest before report date'
Add new price source - 'nearest before report date' will ignore
prices *after* report date. Will be useful to fix bug 743753.
2021-04-23 21:47:28 +08:00
Christopher Lam
5957b3c256 Add scheme backward compatibility functions renamed in #979 2021-04-23 21:20:42 +08:00
John Ralls
49102c7ac2 Python Bindings: Provide a deprecated GncPriceDB.lookup_latest_before_t64.
To avoid breaking user scripts.
2021-04-23 11:56:15 +01:00
Robert Fewell
87285f945e Update gnucash_core.py with gnc-pricedb function name change 2021-04-23 11:56:15 +01:00
Robert Fewell
e535ba5411 Change some functions to use const gnc_commodity for gnc_pricedb 2021-04-23 11:56:15 +01:00
Robert Fewell
e75308e684 Rename a couple of gnc-pricedb functions that have not been used.
To be more consistent change gnc_pricedb_lookup_latest_before_t64 and
gnc_pricedb_lookup_latest_before_any_currency_t64 to be of the form
'_nearest_before_' and add a missing utest.
2021-04-23 11:56:15 +01:00