Commit Graph

27029 Commits

Author SHA1 Message Date
mocsa
16015110de
Translation update by mocsa <csaba@feltoltve.hu> using Weblate
po/hu.po: 61.8% (3341 of 5401 strings; 1213 fuzzy)
491 failing checks (9.0%)
Translation: GnuCash/Program (Hungarian)
Translate-URL: https://hosted.weblate.org/projects/gnucash/gnucash/hu/

Co-authored-by: mocsa <csaba@feltoltve.hu>
2023-02-12 16:35:46 +01:00
Geert Janssens
76d742c6e3 Fixup csv price import assistant reset
A few lines were missing in my previous commit
2023-02-07 21:16:32 +01:00
Geert Janssens
66660c02fb Only reset csv importer internal state if new file is selected
The changes from
8ed40078b0
and
78c8e8f3af
caused the importers to reset everything in the preview page whenever opening this
page, including when navigating back from a future page. This can be very frustrating
if many settings were adjusted but one went back just to tweak a single one.

With these changes the importer will only be reset whenever the user selects a
different file in the file chooser. So even navigating back to the file chooser,
but not changing files will keep the import state.
2023-02-07 19:36:08 +01:00
Geert Janssens
0c3807414a Generic Importer - allow user to modify exchange rates for unbalanced transactions
With the improved support for multi-currency imports, it
can happen an incomplete transaction needs an exchange
rate (or balancing split amount) before the transaction
can be imported. This commit adds a context menu entry
to set exchange rates on such transactions.
The menu is only enabled for unbalanced transactions
for a destination account has been set.
2023-02-07 17:44:59 +01:00
Geert Janssens
fb8c0ab039 Bug 796955 - Import CSV - Single-line two-currency transactions can't be imported
Calculation using price from csv data was still backwards.
This commit fixes it.
2023-02-07 17:44:59 +01:00
Geert Janssens
27764908e6 Import matcher - remove a few redundant tests with GLists 2023-02-07 17:44:58 +01:00
Geert Janssens
b8a14c172f Import-matcher.c - C99 fun
- introduce bool
- declare variables on first use
2023-02-07 17:44:53 +01:00
Geert Janssens
b862142e82 Bug 793306 - Price is not imported from CSV
This is really a variation of bug 796955, except that in this case
even less data was provided in the csv file, so we needed
extra code to defer second split generation to the generic import
matcher.

The missing details can be either transfer account,
transfer amount and/or price.

The generic import matcher has more options to find this
information: the transfer account can be guessed from
import maps or manually selected by the user.
Only when that one is known, we can consider transfer
amount. In a single currency situation, this is easy.
In the multi-currency case we currently need either
a price or a transfer amount from the csv import data.
2023-02-07 17:41:30 +01:00
flywire
8df11ec91a Remove sample-report crash option and test-stress-options exception 2023-02-07 16:17:22 +11:00
flywire
0ece81aa9b Skip sample report in stress tests 2023-02-07 16:17:22 +11:00
flywire
6650209dba Update report comments 2023-02-07 16:17:21 +11:00
flywire
cc97783a2a Report title option 2023-02-07 16:17:21 +11:00
flywire
f53f760c18 Rename sample report and make values unique 2023-02-07 16:17:20 +11:00
John Ralls
732a005710 Merge Christoph Holtermann's 'python-log-access' into master. 2023-02-06 15:24:04 -08:00
John Ralls
c4af7fa314 Merge branch 'maint' 2023-02-06 15:23:24 -08:00
John Ralls
66d9f1383e Merge Ralf Habacker's 'fix-798732' into maint. 2023-02-06 12:35:49 -08:00
John Ralls
b7eb9bcb47 Merge Ralf Habacker's 'fix-798732' into master. 2023-02-06 12:31:52 -08:00
John Ralls
43a9f8df5e Merge Richard Cohen's 'allow-c-declaration-after-statement' into master. 2023-02-06 12:27:53 -08:00
John Ralls
464d1d237b Merge Richard Cohen's 'fix-unused-variables-part1' into master. 2023-02-06 11:27:16 -08:00
Richard Cohen
5f534161a1 Allow C declarations after statements
Good for declaring variables at point of use
2023-02-06 14:58:49 +00:00
Richard Cohen
bd8e81f35c Move an unused variable into an #ifdef where it is used 2023-02-06 14:20:31 +00:00
Richard Cohen
1c6679720b Use some unused variables 2023-02-06 14:20:31 +00:00
Richard Cohen
78ec20515b Remove some unused variables - and the initialization
- checked that any side effects were irrelevant
2023-02-06 14:20:28 +00:00
Richard Cohen
c819b03a17 Remove some unused variables - leave the side effect 2023-02-06 14:19:29 +00:00
Richard Cohen
ea2d3be217 Remove some unused variables with obviously no side effects 2023-02-06 14:19:22 +00:00
Richard Cohen
4e25bbfc43 Mark some QofLogModules as potentially unused
- __attribute__((unused)) for C
- [[maybe_unused]] for cpp
2023-02-06 14:12:31 +00:00
John Ralls
9446ae7fb7 Release GnuCash 4.901 2023-02-05 09:30:53 -08:00
John Ralls
31d45fc586 Merge branch 'maint' 2023-02-05 09:18:00 -08:00
Christopher Lam
9c87585d4e Bug 798747 - Crash in Investment Portfolio report
add support for pricedb-before in portfolio reports
2023-02-05 22:19:36 +08:00
Robert Fewell
6946d2197b Change default invoice report dialog
If selected default invoice report is missing, hide the timeout and
wait for user selection.
2023-02-05 10:56:50 +00:00
Robert Fewell
45a07463fb Change max timeout to 20 seconds for default invoice report 2023-02-05 10:21:56 +00:00
Christopher Lam
68cd8cfa2c [portfolio] remove unused the_price 2023-02-05 17:24:49 +08:00
Christopher Lam
85c2491664 Merge branch 'maint' 2023-02-05 12:09:38 +08:00
John Ralls
928f4f6232 Fix test error from replacing guile * form. 2023-02-04 14:12:35 -08:00
Geert Janssens
60209a766f Merge branch 'csv_import' 2023-02-04 19:13:16 +01:00
Geert Janssens
89944ba054 Bug 796955 - Import CSV - Single-line two-currency transactions can't be imported - follow up
This second commit implements the suggestion from
that bug to add a 'Transfer Amount' column type to
the importer to avoid rounding errors that could
happen with exchange rates.
2023-02-04 19:11:54 +01:00
Geert Janssens
2d8bb6f62f Bug 796955 - Import CSV - Single-line two-currency transactions can't be imported
Behaviour is as follows:
If
  single line provides a price
And
  at some point in the import process we get into a
  situation where the base account and transfer
  account have a different commodity
Then
  transfer_acct amount = base_acct amount * price

If on the other hand base_acct and transfer_acct turn
out to have the same commodity, price is ignored.
2023-02-04 18:56:02 +01:00
John Ralls
1c09adec87 Use gnc_numeric_multiply instead of Guile's * form for computing prices.
Partly fixes bug 798550 (https://bugs.gnucash.org/show_bug.cgi?id=798550)

Guile's * form when applied to rationals doesn't reduce and since
guile uses gmp for unlimited precision arithmetic produces numbers
that can't be passed back to C functions because they're too big for
any normal C integer types.
2023-02-04 09:43:56 -08:00
Geert Janssens
56d16f4f0f Some cleanups in import-acount-matcher.c
- Remove unused member variables from AccountPickerDialog struct
- Rename boolean function parameter to better describe what it represents
- Simplify a few constructs and condidionals
- remove unused constructor

Kept separate from actual logic changes
2023-02-04 16:53:20 +01:00
Geert Janssens
99506d331a Reduce GncImportMatchMap to just the account
There is no added value in storing the book and account together
The book is easily retrieved from the account (as was
illustrated in the gnc_account_imap_new function).

I looked through the commit history to understand why this struct
was originally created and a long time ago it also had
a reference to a kvp frame.
2023-02-04 16:53:20 +01:00
Geert Janssens
376f0bfae9 Convert import-backend.c to cpp
Allows even more concise code.
2023-02-04 16:53:20 +01:00
Geert Janssens
2e573d9ccd Some cleanups in the import backend code
Improve readability
Simplify a few constructs
2023-02-04 16:52:53 +01:00
Geert Janssens
61817fdc44 Import matcher - filter open transactions early
Open transactions in the context of the importer represent
freshly downloaded transactions. They can't possibly be
valid matches. Filtering them out early is a minor performance
optimization. For large imports it avoids having to traverse
a long list of splits multiple times.
2023-02-04 16:52:53 +01:00
Geert Janssens
3f51775570 Enable import of tranfser split reconcile state and date 2023-02-04 16:52:53 +01:00
Geert Janssens
1c2c184e2e CsvTxImp - rename 'Deposit' and 'Withdrawal' columns
Multiple reasons:
- they only have meaning in bank or cash contexts, but the importer is meant
  to be more generic.
- 'Withdrawal' is misleading in that the code behind it caters very
  generically for cases where values should be negated before being
  used. A 'Withdrawal' is only a single use case of this behaviour.

New names are 'Amount' (iso 'Deposit')
and 'Amount (Negated)' (iso 'Withdrawal')
2023-02-04 16:52:53 +01:00
Geert Janssens
4e6637e67e Bug 798292 - csv Import Transactions Ignores Multi-Splits
This requires GncPreTrans objects to be aware of the multi_split
preference to be able to estimate whether empty date or
description fields should be flagged as error or not.
2023-02-04 16:43:47 +01:00
Geert Janssens
7670068778 CSV Import - rewrite update_pre_trans/split_props
These two functions are always called together and the
flow is more efficient and easier to understand if
they are merged into one function.
2023-02-04 16:43:47 +01:00
Geert Janssens
7fa4966e57 Bug 797756 - Currency format setting is ignored 2023-02-04 16:43:47 +01:00
Geert Janssens
1ce5ace25f Bug 794028 - CSV import, default to matching full account name
If the account map doesn't yield a result, try to map
the import string against existing accounts' full names
2023-02-04 16:43:46 +01:00
Geert Janssens
51706f289c Minor corrections in comments 2023-02-04 16:43:46 +01:00