Bug 437481 - Wish links to corresponding documents
Summary: Wish links to corresponding documents
Status: ASSIGNED
Alias: None
Product: kmymoney
Classification: Applications
Component: general (show other bugs)
Version: 5.1.1
Platform: Other Linux
: NOR wishlist
Target Milestone: ---
Assignee: KMyMoney Devel Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-05-22 08:30 UTC by Fabiano Caruana
Modified: 2022-10-06 14:52 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Screenshot how to configure payee based links (75.82 KB, image/png)
2022-07-13 08:38 UTC, Ralf Habacker
Details
Screenshot showing payee based links in ledger (25.53 KB, image/png)
2022-07-13 08:39 UTC, Ralf Habacker
Details
My Example with category (31.16 KB, image/png)
2022-07-13 14:02 UTC, Fabiano Caruana
Details
Patch based on branch-4.8 (19.28 KB, patch)
2022-07-14 15:31 UTC, Ralf Habacker
Details
Document Vodafon (17.43 KB, image/png)
2022-10-06 09:38 UTC, Fabiano Caruana
Details
Payee with empty fields (5.84 KB, image/png)
2022-10-06 12:32 UTC, Fabiano Caruana
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Fabiano Caruana 2021-05-22 08:30:43 UTC
Hello KMyMoney team,

As I get more and more "lazy" with increasing age, I would like to add a new feature in KMyMoney, namely a link to one (or more) PDF-documents. I can always find my documents, but it would be a huge relief if I could simply call up the corresponding document in the booking with a click (or a key combination).
Could this be feasible?

Thank you.

greetings
Udo
Comment 1 Jack 2021-05-22 14:53:43 UTC
As a temporary workaround, could you just add the link to the memo field?  You  might have to copy/paste into a browser or file manager (URL vs full file path) to get it to open instead of just clicking, but it's a start.
Comment 2 antoine 2021-05-22 19:53:16 UTC
this issue seems to be similar to https://bugs.kde.org/show_bug.cgi?id=274021
Comment 3 Fabiano Caruana 2021-05-25 07:19:51 UTC
To Jack:

That is also my approach at the moment. If only the link address is in the comment field, Ctrl + a can be used to mark it nicely, but if there is more information in the field, I must first mark the part of the with the mouse. Of course, it would be nice if I just "click" and ... voila ... the document is there. :-)

To Antoine:
Sorry, I didn't find that. I searched for "corresponding document".

greetings
Udo
Comment 4 Fabiano Caruana 2022-07-12 11:36:47 UTC
Hi KMyMoney team,

I would like to ask if anything is planned in the meantime.
Since I'm in the process of digitizing my paper receipts at the moment, I could combine the two wonderfully.

My current plan is to create a category named "Beleg" and store the link to the receipt with a split posting.
I have already written a utility with xdotool that I can call up the document with a simple keystroke.
But before I record everything in this way, it would be important for me to know whether something is planned. I just don't want to do everything twice.

The indisputable "Skrooge" can do this and I can import all data from KMyMoney just fine.
But Skrooge is otherwise really "terrible"

Thank you for your information.

Greetings
Udo
Comment 5 Ralf Habacker 2022-07-13 08:38:14 UTC
Created attachment 150578 [details]
Screenshot how to configure payee based links

It would need to be considered what that should look like specifically.

For example, I once implemented a function for my needs that supports payee-based links for transactions (see screenshots)
Comment 6 Ralf Habacker 2022-07-13 08:39:03 UTC
Created attachment 150579 [details]
Screenshot showing payee based links in ledger
Comment 7 Fabiano Caruana 2022-07-13 14:02:09 UTC
Created attachment 150584 [details]
My Example with category
Comment 8 Fabiano Caruana 2022-07-13 14:02:41 UTC
Hi Ralf,

Thank you for your example.
But it looks like the payee always has the same address.
Or can you edit the address in the booking form?
But in this form it would be OK, although I prefer the 1-line display myself, but have always activated the booking form.

I need different addresses (usually PDF) for each process, and in my case the associated invoices.
See my example with the category and split booking.

Greetings
Udo
Comment 9 Thomas Baumgart 2022-07-13 15:28:46 UTC
I envision a feature that allows to attach multiple documents (links, references, ...) per transaction. They should be accessible from any account that references the transaction. I don't support misusing an extra split to store this information.
Comment 10 Fabiano Caruana 2022-07-14 10:42:51 UTC
Hi Thomas,

The idea of misusing split postings is based on the use of "Sales Line" (and many other tables) in "Microsoft Dynamics" (formerly "Navision"). These can be of various types such as [(Text),G/L Account,Item,Resource,Fixed Asset,Charge (Item)].

Please don't be angry with me, but this use for documents is currently the only manageable way to manage and view the documents without great effort.

If KMyMoney offers another solution in the future, it would be no problem for me to remove these split entries again, since I work with an SQLite backend. And because the split bookings are entered with zero values, I see no problems with the database consistency.

Greetings
Udo
Comment 11 Ralf Habacker 2022-07-14 11:29:59 UTC
> Thank you for your example.
> But it looks like the payee always has the same address.

I did set `(\d+\d+\d+)` into the id pattern field and  `https://www.amazon.com/...%1` into the url template field of the my payee for example "amazon".

> Or can you edit the address in the booking form?

In the booking form I enter the order number into the memo field of the related transaction e.g. `xxx-yyyy-zzzz` which x,y,z all numbers and get a link to the related order at the amazon web site.
 
> I need different addresses (usually PDF) for each process, and in my case the associated invoices.
> See my example with the category and split booking.

That would be configured with:
1. add payee `vodafone` if not present
2. set url template to `file:///Common/Documents/Vodafone/Rechnungen/%1'
3. in the id pattern field set `(Rechnung_\d+.pdf)` 
4. assign related transaction to payee `vodafone` and add `Rechnung_3668468554.pdf` to the memo field
6. save transaction

Then you would see the term `Rechnung_3668468554.pdf` be underlined in the related transaction to indicate a matching link.

After selecting this transaction the link can be opened by mouse right click and pressing `open url` or by the associate keyboard shortcut.

Cheers
Ralf
Comment 12 Fabiano Caruana 2022-07-14 12:22:21 UTC
Hi Ralf,

That looks very good and after a few tries I would definitely be able to do it.
Too bad... KMyMoney doesn't offer me this feature.

If this is in "kmymoney-master" (latest AppImage), I cannot start it with error messages.
Not in OpenSUSE 15.4
Not in OpenSuse Tumbleweed
Not in Manjaro 21.3.3

Greetings
Udo
Comment 13 Ralf Habacker 2022-07-14 14:46:07 UTC
> If this is in "kmymoney-master

I added this to a local copy of kmymoney sources, which needs to be adjust to work with kmymoney from master branch.
Comment 14 Fabiano Caruana 2022-07-14 14:59:51 UTC
Hi Ralf,

So no chance for me?
I'm not familiar with Devil or anything like that

Greetings
Udo
Comment 15 Ralf Habacker 2022-07-14 15:31:15 UTC
Created attachment 150622 [details]
Patch based on branch-4.8
Comment 16 Ralf Habacker 2022-07-14 15:38:36 UTC
(In reply to Ralf Habacker from comment #15)
> Created attachment 150622 [details]
> Patch based on branch-4.8

The master branch has undergone major changes, so it will probably have to be rewritten in some points. I think that hints are needed to accomplish this.
Comment 17 Fabiano Caruana 2022-07-14 15:49:36 UTC
Hi Ralf,

Try to convince Thomas for this project.
I would be glad.

Many Thanks.

Greetings
Udo
Comment 18 Ralf Habacker 2022-07-23 15:23:19 UTC
(In reply to Ralf Habacker from comment #6)
> Created attachment 150579 [details]
> Screenshot showing payee based links in ledger

I looked at how this could be implemented in the kmymoney master branch and found that there is no support for underlining text fragments when displaying transactions, as was possible in KDE4 times.

The relevant place is https://invent.kde.org/office/kmymoney/-/blob/master/kmymoney/views/journaldelegate.cpp#L481
Comment 19 Fabiano Caruana 2022-07-27 08:59:47 UTC
Hello Ralf,

I think that a quick solution is probably not possible and, as already described above, I will "misuse" the split posting (even if Thomas disapproves of this).
I would like to scan my paper invoices and reference them in KMyMoney soon.

Many thanks for your effort.

Greetings
Udo
Comment 20 Bug Janitor Service 2022-07-27 16:44:10 UTC
A possibly relevant merge request was started @ https://invent.kde.org/office/kmymoney/-/merge_requests/149
Comment 21 Ralf Habacker 2022-07-27 16:49:22 UTC
(In reply to Ralf Habacker from comment #18)
> I looked at how this could be implemented in the kmymoney master branch

Finally, I rearranged the patch for the master branch for which the mentioned merge request was made. If you can build kmymoney from source code, you get this feature immediately, otherwise you would have to wait until it was reviewed and merged.
Comment 22 Fabiano Caruana 2022-07-28 10:06:46 UTC
Ok Ralf ... I'll wait.

Maybe I'll delve into the marvel of compilation and building as well.
Because the current master app image breaks off for me (OpenSuse 15.4 and Tumbleweed, and Manjaro 21.3.5), but it has been for some time. And the Last Successful Artifacts is also about a week old.

Greetings and have a nice day
Udo
Comment 23 Fabiano Caruana 2022-10-06 09:38:23 UTC
Created attachment 152611 [details]
Document Vodafon
Comment 24 Fabiano Caruana 2022-10-06 09:38:54 UTC
Hello Ralf,

I dared and set up a development test system. After a few attempts, I managed to compile your version "kmymoney-work-437481-payee-link-support" and get it running.
I then set up the Payee "Vodafon" according to your specifications for testing and then entered the receipt in the memo field.
Lo and behold... called "Open URL" in the context menu (and added a shortcut) and have the corresponding document .
Great !!! This is exactly what I wanted (see screenshot "Vodafon")

Thanks alot !!!

Now my questions:
Can I also use your version "kmymoney-work-437481-payee-link-support" for live operation? Or would you still advise me against it and wait until this function is implemented in an official version (5.2?).
I would love to start using it like this.
I will definitely test with several Payees.

Thanks again !!

Greetings from Riegelsberg
Udo
Comment 25 Fabiano Caruana 2022-10-06 11:19:15 UTC
Hello Ralf,

Unfortunately, Payee does not store the "Link Matching" data in a SQLite backend. So for my tests I need to use an xml backend.
Of course, this version is not yet suitable for live operation (I use SQLite with a password).
But I can "play" ...

Greetings from Riegelsberg
Udo
Comment 26 Ralf Habacker 2022-10-06 12:02:57 UTC
(In reply to Fabiano Caruana from comment #25)
> Unfortunately, Payee does not store the "Link Matching" data in a SQLite backend. 

Hmmh, sql write support has been added, see  https://invent.kde.org/office/kmymoney/-/merge_requests/149/diffs#12a772abd18634860550279a5ae897eecdbd0a2c_1029_1029 and related locations, but I have not tested this support yet.
Comment 27 Fabiano Caruana 2022-10-06 12:32:25 UTC
Created attachment 152618 [details]
Payee with empty fields
Comment 28 Fabiano Caruana 2022-10-06 12:34:10 UTC
Hi Ralf,

die fields in Payee after saving in SQLite (without password) are empty ... (see attachement).

greetings
Udo
Comment 29 Ralf Habacker 2022-10-06 14:03:37 UTC
(In reply to Fabiano Caruana from comment #28)
Hi Udo

> die fields in Payee after saving in SQLite (without password) are empty ...

thanks for reporting - should be fixed now.
Comment 30 Fabiano Caruana 2022-10-06 14:52:16 UTC
Hi Ralf,

Not Muhammad Ali, You are the Greatest !!!

Many thanks !!!

grettings from Riegelsberg
Udo