Re: Stats Report Failure

2023-02-03 Thread Martin Michlmayr
* Jasel17212  [2023-01-30 15:49]:
> John / Martin - I've noticed that running the stats report fails when I 
> have an automatic transaction configured.

Do you have a test case you can add to 
https://github.com/ledger/ledger/issues/2079

-- 
Martin Michlmayr
https://www.cyrius.com/

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Ledger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ledger-cli+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ledger-cli/Y94ARzKK4/3OyNv9%40jirafa.cyrius.com.


Re: Stats Report Failure

2023-02-03 Thread John Wiegley
> "J" == Jasel17212   writes:

J> Is this a bug? Other than commenting out the automatic transaction, is
J> there a workaround?

Any assertion failure is always a bug.

John

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Ledger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ledger-cli+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ledger-cli/m2357mmvz3.fsf%40newartisans.com.


Re: How do period expressions work with --begin and --end?

2023-02-03 Thread John Wiegley
> "MB" == Marcin Borkowski  writes:

MB> Is that correct?  Also, is it documented somewhere?

Try the "ledger period EXPR" command, which will tell you how Ledger
interprets any given date expression. Not sure if this debugging subcommand is
documented...

John

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Ledger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ledger-cli+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ledger-cli/m27cwymvzx.fsf%40newartisans.com.


Re: Two questions about budgeting

2023-02-03 Thread John Wiegley
> "MB" == Marcin Borkowski  writes:

MB> 1. I can do
MB> ~ Daily from 2022-01-01 to 2023-01-01
MB> ~ Daily from 2023-01-01
MB> (the intervals are closed-open, like with -b/-e).  Right?

Yes, intervals should always be closed-open, everywhere.

MB> 2. The --invert option does nothing for the `budget` report. Correct?

I wouldn't be surprised at all if that were the case.

MB> 3. If I don't provide -b, the default for the budget seems to be what was
MB> in `~ Daily from`, but the transactions from before that date also count
MB> towards the actual expenses. That probably means that I should /always/
MB> provide -b to the `budget` report. Is that right?

I would, yes.

MB> 4. If I don't provide -e, the default (for the `budget` report) is
MB> --current. Is that correct?

That sounds right.

MB> 5. If I don't provide `from` in `~ Daily`, the default seems to be the
MB> date if the /first/ transaction on a given account. Right?

Correct.

MB> 6. (Almost) last but not least -- the `budget` report gives me a table
MB> with 5 columns: - actual expenses - budgeted expenses - the difference
MB> (negative means I spent less than the budget -- a bit counterintuitive,
MB> but makes sense given the order of the previous two) - what percentage of
MB> the budget was spent - name of the account

MB> Using classical spreadsheet column names: C = A - B and D = A/B (as
MB> percentage). Do I guess correctly?

I think so?

MB> If so, this means that the web app I wrote to present this exact
MB> information is mostly irrelevant. %-P Still, it draws a nice chart which
MB> is accessible from a smartphone. I have a post-commit hook which scp's the
MB> file to my VPS, and the web app there serves the chart - that's a very
MB> useful arrangement I plan to blog about one day.

I'm glad it's useful, but definitely, custom code can always go further.

MB> Now, my final question is this. Much of what we discuss here is apparently
MB> undocumented in the Ledger manual. My book is my book, and it contains
MB> examples and such, but I think it is fair to have these options at least
MB> mentioned in the manual. I have just fetched the ledger repo, and I can
MB> see that the last commit in `ledger/doc/ledger3.texi` was 7 years ago...
MB> Would you accept a PR with a small manual update? (One minor issue with
MB> that idea is that I don't speak texinfo, so you'd have to check every my
MB> edit very carefully.)

Absolutely! I'd be honored to accept your PR.

John

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Ledger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ledger-cli+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ledger-cli/m2bkmamw2k.fsf%40newartisans.com.


Re: How to split expenses

2023-02-03 Thread Alexandre Rademaker

Continuing the trip with a friend…. I renamed the accounts suggested by John 
from Assets:Payable:DF to Assets:Receivable:DF. Regarding the Liabilities:DF 
and Liabilities:Payable:DF. Actually Liabilities:Payable is kind of redundant.. 
maybe Liabilities:DF is enough. 

when I paid something for us, I record the total cost and add in 
Assets:Receivable:DF the fact that he owe me half of the expense:

2023/01/07 Place1
Expenses:Food   EU 6,00
Assets:Receivable:DFEU 6,00
Assets:Wise 

When he paid something, I recorded that I owe him half of the total. This 
turned out to be the simpler alternative as Yuri's suggestion. But the 
alternative in the message below is interesting too, adding a little bit of 
extra complexity to move between Assets:Receivable:DF and Liabilities:DF, but I 
can do that once in the end of the trip.

2023/01/02 Sample
Expenses:Food   EU 6,00 ; total EU 12,00
Liabilities:DF 


But how to record when both of us paid some different amount of the same 
expense? Maybe this turns out to suggest to rethink the option for the case 
above? 

Below the total expense is EU 12,00 we should both pay EU 6,00, but I paid EU 
10,00 and he paid only EU 2,00. Does it make sense? I am trying to record that 
I would add 6 to the amount he owe me, but at the same transaction, I am also 
removing EU 2,00 from that because he is giving EU 2,00. But I am not touching 
in the Liabilities:DF

2023/01/17 Place3
Expenses:Food   EU 6,00
Assets:Receivable:DFEU 6,00
Assets:Receivable:DF   EU -2,00
Assets:Cash   EU -10,00

Best,
Alexandre


> On 12 Jan 2023, at 14:23, Yuri Khan  wrote:
> 
> On Thu, 12 Jan 2023 at 19:10, Alexandre Rademaker  
> wrote:
> 
>> I see your point and you are right that using the second entry below would 
>> be simpler and record the fact that I owe ‘DF’ 3 euros.  But using the first 
>> entry below allow me to also record the total amount of the expense if later 
>> on we all want to remember how much was the parking. Using only the comment 
>> would be an alternative too. The only real problem with the first entry is 
>> the fact that usually liabilities are negative, right? Maybe I could find a 
>> better name? The ‘Payable:DF’ is to record the moneys that ‘DF’ owes to me.
>> 
>> 2023/01/07 Hotel Braga Parking
>>Expenses:ParkingEU 3,00
>>Liabilities:DF  EU 3,00
>>Assets:DF  EU -6,00
> 
> If you want to track everything in full detail, you can do that too.
> Just pretend that you manage all the finances.
> 
> * Count goods and services you consume into Expenses.
> * Count goods and services your friends consume into
> Assets:Receivable, as if they owe you.
> * Track money you pay from the actual accounts you pay from (Assets if
> cash or debit cards; Liabilities if credit cards).
> * Track money your friends pay from Liabilities:Payable, as if you owe them.
> 
> 2023-01-07 Hotel Braga Parking
>Expenses:Parking   EUR 3,00
>Assets:Receivable:DF   EUR 3,00
>Liabilities:Payable:DFEUR -6,00
> 
> At the end of trip, or at any time, you can cancel out debts:
> 
> 2023-01-07 Debt cancellation
>Liabilities:Payable:DF EUR 3,00
>Assets:Receivable:DF  EUR -3,00
> 
> After the above, Assets:DF is at 0 and Liabilities:DF is at EUR -3,00,
> indicating you owe DF 3 Euro.
> 
> (Unrelated: Consider using standard ISO 4217 currency codes. While we
> are at it, consider also using the standard ISO 8601 date separator.)
> 

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Ledger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ledger-cli+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ledger-cli/6A5D7A4C-3DB3-4D81-81E9-3632E0E64032%40gmail.com.