Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

Periodic transaction being generated outside planned period

31 views
Skip to first unread message

LucaBH

unread,
Aug 24, 2024, 6:40:11 AM8/24/24
to hledger
(sorry, I deleted previous message as I was not accurate)

Hi Simon, all.

The issue I'm seeing is as per the subject.

Take the attached file and run the following command:
hledger -f budget.journal print --forecast=2024q2

I see the following output (latest hledger version here on MacOS via homebrew):
2024-04-30 Salary
    revenue:salary -1000 ; entry#1
    asset:cash:bank

2024-05-31 Salary
    revenue:salary -1000 ; entry#1
    asset:cash:bank

2024-06-30 Salary
    revenue:salary -1000 ; entry#1
    asset:cash:bank

2024-06-30 Salary
    revenue:salary -2000 ; entry#2
    asset:cash:bank


The highlighted entry shouldn't be generated, as per my understanding, is it right?

Thank you. Bye
Luca
budget.journal

Simon Michael

unread,
Aug 24, 2024, 2:34:48 PM8/24/24
to hle...@googlegroups.com
Hi Luca,

It looks wrong indeed. Thanks! I have opened https://github.com/simonmichael/hledger/issues/2218
--
You received this message because you are subscribed to the Google Groups "hledger" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hledger+u...@googlegroups.com.

Attachments:
  • budget.journal

Dmytro Astapov

unread,
Aug 27, 2024, 12:13:12 PM8/27/24
to hle...@googlegroups.com
You are specifying a transaction that happens on every 31st day of the month, with the start date of 2024-07 (which is the same as 2024-07-01).

As 1st of July is not the 31st day of the month, the start date is adjusted to the earlier date such that your start date (2024-07-01) will be included in the first interval of your period.

That adjusted date is 2024-06-30 -- which is inside 2024q2 (your reporting interval). 

If you change the definition to read "every 31st day from 2024-07-31", I think it would work like you want it to.

Best regards, Dmytro


--

Simon Michael

unread,
Sep 4, 2024, 11:11:13 AM9/4/24
to hle...@googlegroups.com
This is now fixed in master I believe - thanks for the report.



On Sat, Aug 24, 2024, at 11:40, LucaBH wrote:
--
You received this message because you are subscribed to the Google Groups "hledger" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hledger+u...@googlegroups.com.

Attachments:
  • budget.journal

Message has been deleted
Message has been deleted
Message has been deleted

LucaBH

unread,
Sep 7, 2024, 3:55:49 PM9/7/24
to hledger
Thank you Michael.

Now as I remember, some time ago a posted a message here about a similar problem, after which you opened an issue on gh. I found out it: https://github.com/simonmichael/hledger/issues/1986
Maybe this fix solves that former issue too?

Bye
Luca

Simon Michael

unread,
Sep 7, 2024, 4:38:24 PM9/7/24
to LucaBH, hle...@googlegroups.com
Yes it does. Thanks!
Reply all
Reply to author
Forward
0 new messages