I’ve got a sample entry of an unpaid amount.
2021-09-10 Alimony Due 2021-09
Receivable:Alimony 200.00 PLN
Revenues:Alimony
# All other entries removed to be able to compare with an online calculator
# Last entry added as there was no output without it.
2024-03-10 Alimony Due 2024-03
Receivable:Alimony 200.00 PLN
Revenues:Alimony
I run the command with annual-schedule
hledger-interest -f ~/.hledger.alimony \
--act \
--annual-schedule='[(2020-10-07,0.056),(2021-10-07,0.06),(2021-11-04,0.0675),(2021-12-09,0.0725),(2022-01-05,0.0775),(2022-02-09,0.0825),(2022-03-09,0.09),(2022-04-07,0.1),(2022-05-06,0.1075),(2022-06-09,0.115),(2022-07-08,0.12),(2022-09-08,0.1225),(2023-09-07,0.115),(2023-10-05,0.1125)]' \
-s Receivable:Interest \
-t Receivable:Alimony:Interest \
Receivable:Alimony
This is the result:
2021-09-10 Alimony Due 2021-09
Receivable:Alimony 200.00 PLN
Revenues:Alimony -200.00 PLN
2021-12-31 5.6% interest for 200.00 PLN over 112 days
Receivable:Alimony:Interest 3.44 PLN
Receivable:Interest -3.44 PLN
2022-12-31 7.25% interest for 200.00 PLN over 365 days
Receivable:Alimony:Interest 14.50 PLN
Receivable:Interest -14.50 PLN
2023-12-31 12.25% interest for 200.00 PLN over 365 days
Receivable:Alimony:Interest 24.50 PLN
Receivable:Interest -24.50 PLN
2024-03-10 11.25% interest for 200.00 PLN over 70 days
Receivable:Alimony:Interest 4.30 PLN
Receivable:Interest -4.30 PLN
2024-03-10 Alimony Due 2024-03
Receivable:Alimony 200.00 PLN
Revenues:Alimony -200.00 PLN
The interest are calculated for the full year in 2022 and 2023.
I expected it to be the same as in the online calculator:
from-to | days | rate | amount |
---|---|---|---|
11.09.2021 - 06.10.2021 | 26 | 5,60% | 0,80 |
07.10.2021 - 03.11.2021 | 28 | 6,00% | 0,92 |
04.11.2021 - 08.12.2021 | 35 | 6,75% | 1,29 |
09.12.2021 - 04.01.2022 | 27 | 7,25% | 1,07 |
05.01.2022 - 08.02.2022 | 35 | 7,75% | 1,49 |
09.02.2022 - 08.03.2022 | 28 | 8,25% | 1,27 |
09.03.2022 - 06.04.2022 | 29 | 9,00% | 1,43 |
07.04.2022 - 05.05.2022 | 29 | 10,00% | 1,59 |
06.05.2022 - 08.06.2022 | 34 | 10,75% | 2,00 |
09.06.2022 - 07.07.2022 | 29 | 11,50% | 1,83 |
08.07.2022 - 07.09.2022 | 62 | 12,00% | 4,08 |
08.09.2022 - 06.09.2023 | 364 | 12,25% | 24,43 |
07.09.2023 - 04.10.2023 | 28 | 11,50% | 1,76 |
05.10.2023 - 21.03.2024 | 169 | 11,25% | 10,42 |
How should I change the data/command to achieve the result?