macxred / pyledger

Python package to streamline the implementation and management of accounting systems.
MIT License
0 stars 0 forks source link

In account sheets, link receipt as hyperlink #1

Closed annamaertens closed 5 months ago

annamaertens commented 9 months ago

When listing 'documents' in an excel account sheet, link via hyperlink to each document if the document path exists.

lasuk commented 9 months ago

Added in 930ed0. Document paths pointing to an existing file in the file system are now rendered as hyperlinks in the account sheets. Thanks for the feature request.

Unfortunately, Excel on OSX opens several dialogs when clicking on the links. See screenshot below. This renders the new functionality less useful.

image
lasuk commented 9 months ago

I've also added an option '-s' or '--show-documents' to display the document path with the ledger history subcommand.

The output is best viewed in a very large terminal window. See example below:

ledger history -s 2000 
                                id        date  account  counter  ... base_amount  base_balance                                                                        text                                                                           document
0   2022-12-31_balance 2022.csv:00  2022-12-31     2000     <NA>  ...   -21071.75     -21071.75                                           Balance sheet 2022 - account 2000                     2022/financial_statements/2023-03-15 Bilanz intern FW 2022.pdf
1  2023-01/Current Accounts.csv:01  2023-01-03     2000     5700  ...     4529.75      -16542.0                                                 Reverse accrued AVH 2022-Q4                                    2023/documents/accounts_payable/AHV-2022_Q4.pdf
2  2023-01/Current Accounts.csv:07  2023-01-03     2000     5720  ...      1702.5      -14839.5                                             Reverse accrued AXA BVG 2022-Q4                                                                               TODO
3  2023-01/Current Accounts.csv:09  2023-01-03     2000     6510  ...       300.0      -14539.5                                  Reverse accrued Bluwat AG_phone Q3+Q4 2022             2023/documents/accounts_payable/Bluwat_2022-12-16_phone Q3+Q4 2022.pdf
4  2023-01/Current Accounts.csv:02  2023-01-03     2000     5710  ...     -1800.0      -16339.5                                     Reverse accrued child allowance 2022-Q4                                    2023/documents/accounts_payable/AHV-2022_Q4.pdf
5  2023-01/Current Accounts.csv:14  2023-01-27     2000     4450  ...      8142.1       -8197.4  Reverse accrued Cooktrust_Accounting Services Investment Portfolio 2022-Q4  2023/documents/accounts_payable/Cooktrust_2023-01_Trading Controlling Q4 2022.pdf
6  2023-01/Current Accounts.csv:16  2023-01-27     2000     5700  ...      3075.7       -5121.7                                  Reverse accrued AHV 2022 closing statement               2023/documents/accounts_payable/AHV-2023-01_Schlussrechnung 2022.pdf
7  2023-01/Current Accounts.csv:18  2023-01-27     2000     6532  ...      1292.4       -3829.3                                    Reverse accrued Legal Blum Recht 2022-Q4                          2023/documents/accounts_payable/Blum.Recht_2023-01-20.pdf
8  2023-01/Current Accounts.csv:20  2023-01-27     2000     6510  ...      378.05      -3451.25                             Reverse accrued Bluwat AG_phone support Q3 2022                2023/documents/accounts_payable/Bluwat_2023-01-09_phone_support.pdf
9  2023-03/Current Accounts.csv:07  2023-03-27     2000     6530  ...     3451.25           0.0                       Reverse accrued Cooktrust Accounting Services 2022-Q4       2023/documents/accounts_payable/Cooktrust_2023_01-04_Buchführung 2022 Q4.pdf

[10 rows x 11 columns]

@annamaertens:ledger history -s ... might be a useful alternative to review documents. It's probably quicker than producing account sheets and stepping through all excel links.