GNOME Bugzilla – Bug 764268
[PATCH] MT940 import select account based on transaction info
Last modified: 2018-06-29 23:48:16 UTC
Created attachment 324855 [details] [review] gnc-ab-utils.c.patch When importing MT940 files, AqBanking will (sometimes?) put all transactions under a single AccountInfo, even when there are multiple accounts in the file. Luckily the correct account information can be recovered from the transaction information. This patch will try to use the account information in the transaction before trying to use the saved account state.
Review of attachment 324855 [details] [review]: The code is a good suggestion. There are minor quirks, though: Please keep the "const Account*" constness or otherwise the compiler will complain. Also, for c98 adding this declaration in the middle of the code is still not allowed - please add a declaration before the statements. With this, the patch may very well be applied both in maint and master. Thanks!
Created attachment 324980 [details] [review] gnc-ab-utils.c.patch Updated according to 324855 review
I assume you meant "const AB_TRANSACTION*" which I fixed. I don't see any "const Account*", could you please be specific if that's still an issue?
Created attachment 324981 [details] [review] gnc-ab-utils.c.patch
Review of attachment 324981 [details] [review]: ok, ready for trunk
dc4fce0
GnuCash bug tracking has moved to a new Bugzilla host. This bug has been copied to https://bugs.gnucash.org/show_bug.cgi?id=764268. Please update any external references or bookmarks.