Re: Help with adjustment transaction

2024-05-18 Thread oliver
Thank you. You have been very helpful. It is much appreciated.
Now to go read the docs again.

Oliver

On Friday, May 17, 2024 at 7:29:22 PM UTC-4 Robin H. Johnson wrote:

> On Fri, May 17, 2024 at 06:55:12AM -0700, oliver wrote:
> > I am afraid you are crediting me with more intelligence than I actually 
> > have.
> > I find balance assertion to be very difficult to understand and the few 
> > lines in the docs don't make it
> > any easier.
> > Follwoing your example, I enter:
> > 
> > 2024/04/08 * Balance Assertion:Ally_Savings
> > Assets:Ally_Savings $0.00 = $47.19
> > ($47.19 being the ending balance in the account as of April 8).
> > 
> > In return I get:
> > Warning: "home/oliver/ledger.dat", line 1003: Unknown account 
> > 'Assets:Ally_Savings $0.00 = $47.19'
> > 
> > Obviously, I am doing something wrong, but what?
> You need more whitespace.
> - An account name on the entry line must be prefixed with at least one 
> space.
> - An account name must end with two or more spaces, or one or more tabs.
>
> Per the docs:
> | There must be at least two spaces, or a tab, between the amount and the
> | account. If you do not have adequate separation between the amount and 
> the
> | account Ledger will give an error and stop calculating.
>
> So easy fix for you:
> 2024/04/08 * Balance Assertion:Ally_Savings
> Assets:Ally_Savings $0.00 = $47.19
>
> -- 
> Robin Hugh Johnson
> Gentoo Linux: Dev, Infra Lead, Foundation President & Treasurer
> E-Mail : rob...@gentoo.org
> GnuPG FP : 11ACBA4F 4778E3F6 E4EDF38E B27B944E 34884E85
> GnuPG FP : 7D0B3CEB E9B85B1F 825BCECF EE05E6F6 A48F6136
>

-- 

--- 
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/595a747e-bba8-4359-b32b-7ecbb1c1490an%40googlegroups.com.


Re: Help with adjustment transaction

2024-05-18 Thread psionl0
This is where bank reconciliations come in.
When you enter a bank transaction into your file, you don't set the cleared 
flag (yet).
When you receive your bank statement, you go through it and for each line 
in  the bank statement that matches an entry in your ledger file, you set 
the cleared flag. You also enter (and clear) any lines in the bank 
statement (interest, fees etc) that are not already in your ledger file. If 
you then run your report on the ledger file with the -C option set, all of 
the transactions listed should match those in the bank statement and the 
two totals should match.
By running the report with the -U option set, you should see all of the 
transactions that have not yet been processed by the bank.

On Friday, May 17, 2024 at 3:04:28 AM UTC+8 oliver wrote:

> I am embarrrassed to have to ask for help with this.  Unfortunately, my 
> math skill are non-existant.
>
> I start with savings account equty of $1,348.50. After several months of 
> transactions, ledger balance gives me minus (-) $235.46. According to my 
> bank the balance is $1,828.79.
>
> What adjustment to I have to enter in order for ledger balance to match 
> bank balance and how does one figure that out?
>
> Thamk you
>
>

-- 

--- 
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/0b08460d-4c9b-4aba-859b-f27ce1600b36n%40googlegroups.com.


Re: Help with adjustment transaction

2024-05-18 Thread Alan Schmitt
On 2024-05-17 23:40, "Robin H. Johnson"  writes:

> TL;DR: you insert balance assertions when you know the balance based on
> some source of truth.

Thank you, this is very useful to know.

Alan

-- 

--- 
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/m2r0dzv0t4.fsf%40petitepomme.net.


signature.asc
Description: PGP signature


Re: Help with adjustment transaction

2024-05-17 Thread Robin H. Johnson
On Fri, May 17, 2024 at 08:48:04AM +0200, Alan Schmitt wrote:
> > 2023/06/30 * Balance Assertion: AccountName
> > Assets:Bank:AccountName   $  0.00 = $ 52,289.96
> 
> This looks very useful, but I have trouble understanding how it works
> with past transactions that are not yet reconciled (i.e., not part of
> the balance, yet present and before in the file). Are these transactions
> ignored? If so, the balance will break once they are reconciled in the
> future, won’t it?

TL;DR: you insert balance assertions when you know the balance based on
some source of truth.

My ideal workflow:
- enter transactions, w/ uncleared and/or pending states.
- get the latest bank statement
- add assertions based on bank statement as part of the work to
  reconcile the statement vs the ledger.
- If needed (rare), use intermediate accounts to represent uncleared
  funds. This should only happen if you've made a payment in such a way
  that the bank statement doesn't reflect it yet. The only times for
  Gentoo had previously been cheques that the recipient had deposited
  yet; and those transactions can be moved later to reflect the fact
  that the recipient didn't deposit the cheque for a long time.

My practical workflow:
- I enter data primarily from the bank & paypal transactions in the
  first place, and reconcile vs other sources.

-- 
Robin Hugh Johnson
Gentoo Linux: Dev, Infra Lead, Foundation President & Treasurer
E-Mail   : robb...@gentoo.org
GnuPG FP : 11ACBA4F 4778E3F6 E4EDF38E B27B944E 34884E85
GnuPG FP : 7D0B3CEB E9B85B1F 825BCECF EE05E6F6 A48F6136

-- 

--- 
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/robbat2-20240517T233242-785749295Z%40orbis-terrarum.net.


Re: Help with adjustment transaction

2024-05-17 Thread Robin H. Johnson
On Fri, May 17, 2024 at 06:55:12AM -0700, oliver wrote:
> I am afraid you are crediting me with more intelligence than I actually 
> have.
> I find balance assertion to be very difficult to understand and the few 
> lines in the docs don't make it
> any easier.
> Follwoing your example, I enter:
> 
> 2024/04/08 * Balance Assertion:Ally_Savings
> Assets:Ally_Savings $0.00 = $47.19
> ($47.19 being the ending balance in the account as of April 8).
> 
> In return I get:
> Warning: "home/oliver/ledger.dat", line 1003: Unknown account 
> 'Assets:Ally_Savings $0.00 = $47.19'
> 
> Obviously, I am doing something wrong, but what?
You need more whitespace.
- An account name on the entry line must be prefixed with at least one space.
- An account name must end with two or more spaces, or one or more tabs.

Per the docs:
| There must be at least two spaces, or a tab, between the amount and the
| account. If you do not have adequate separation between the amount and the
| account Ledger will give an error and stop calculating.

So easy fix for you:
2024/04/08 * Balance Assertion:Ally_Savings
Assets:Ally_Savings$0.00 = $47.19

-- 
Robin Hugh Johnson
Gentoo Linux: Dev, Infra Lead, Foundation President & Treasurer
E-Mail   : robb...@gentoo.org
GnuPG FP : 11ACBA4F 4778E3F6 E4EDF38E B27B944E 34884E85
GnuPG FP : 7D0B3CEB E9B85B1F 825BCECF EE05E6F6 A48F6136

-- 

--- 
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/robbat2-20240517T232604-542031603Z%40orbis-terrarum.net.


Re: Help with adjustment transaction

2024-05-17 Thread oliver
I am afraid you are crediting me with more intelligence than I actually 
have.
I find balance assertion to be very difficult to understand and the few 
lines in the docs don't make it
any easier.
Follwoing your example, I enter:

2024/04/08 * Balance Assertion:Ally_Savings
Assets:Ally_Savings $0.00 = $47.19
($47.19 being the ending balance in the account as of April 8).

In return I get:
Warning: "home/oliver/ledger.dat", line 1003: Unknown account 
'Assets:Ally_Savings $0.00 = $47.19'

Obviously, I am doing something wrong, but what?

Thanks





On Friday, May 17, 2024 at 2:48:09 AM UTC-4 Alan Schmitt wrote:

> Hello,
>
> On 2024-05-16 22:57, "Robin H. Johnson"  writes:
>
> > Our bank statements give us the opening and closing balances for each
> > statement, and I enter those as an assertion of the balance.
> >
> > If I have an error somewhere before that, such as a missing transaction,
> > or a typo; the assertion flags that something is wrong.
> >
> > If your bank statements provide a known balance after each transaction,
> > you can enter that:
> >
> > 2009/04/30 * Interest Earned: AccountName
> > Assets:Bank:AccountName $ 16.14 = $ 19,016.25
> > Income:Interest:AccountName
> >
> > If your bank statements provide an opening or closing balance to the 
> statement,
> > you can use that:
> >
> > 2023/06/30 * Balance Assertion: AccountName
> > Assets:Bank:AccountName $ 0.00 = $ 52,289.96
>
> This looks very useful, but I have trouble understanding how it works
> with past transactions that are not yet reconciled (i.e., not part of
> the balance, yet present and before in the file). Are these transactions
> ignored? If so, the balance will break once they are reconciled in the
> future, won’t it?
>
> Best,
>
> Alan
>

-- 

--- 
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/82706c5f-823a-4013-bc7c-c8e248aba99fn%40googlegroups.com.


Re: Help with adjustment transaction

2024-05-17 Thread Alan Schmitt
Hello,

On 2024-05-16 22:57, "Robin H. Johnson"  writes:

> Our bank statements give us the opening and closing balances for each
> statement, and I enter those as an assertion of the balance.
>
> If I have an error somewhere before that, such as a missing transaction,
> or a typo; the assertion flags that something is wrong.
>
> If your bank statements provide a known balance after each transaction,
> you can enter that:
>
> 2009/04/30 * Interest Earned: AccountName
> Assets:Bank:AccountName   $ 16.14 = $ 19,016.25
> Income:Interest:AccountName
>
> If your bank statements provide an opening or closing balance to the 
> statement,
> you can use that:
>
> 2023/06/30 * Balance Assertion: AccountName
> Assets:Bank:AccountName   $  0.00 = $ 52,289.96

This looks very useful, but I have trouble understanding how it works
with past transactions that are not yet reconciled (i.e., not part of
the balance, yet present and before in the file). Are these transactions
ignored? If so, the balance will break once they are reconciled in the
future, won’t it?

Best,

Alan

-- 

--- 
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/m2ikzdx7bv.fsf%40mac-03220211.irisa.fr.


signature.asc
Description: PGP signature


Re: Help with adjustment transaction

2024-05-16 Thread Robin H. Johnson
On Thu, May 16, 2024 at 11:50:31AM -0700, oliver wrote:
> I am embarrrassed to have to ask for help with this.  Unfortunately, my 
> math skill are non-existant.
> 
> I start with savings account equty of $1,348.50. After several months of 
> transactions, ledger balance gives me minus (-) $235.46. According to my 
> bank the balance is $1,828.79.
Without seeing more of your ledger, I think you have sign errors rather than
value errors: e.g. debits that should have been credits.

> What adjustment to I have to enter in order for ledger balance to match 
> bank balance and how does one figure that out?
Not a direct answer, but a trick I use from Gentoo Foundation's
accounting: Balance Assertions.

Our bank statements give us the opening and closing balances for each
statement, and I enter those as an assertion of the balance.

If I have an error somewhere before that, such as a missing transaction,
or a typo; the assertion flags that something is wrong.

If your bank statements provide a known balance after each transaction,
you can enter that:

2009/04/30 * Interest Earned: AccountName
Assets:Bank:AccountName   $ 16.14 = $ 19,016.25
Income:Interest:AccountName

If your bank statements provide an opening or closing balance to the statement,
you can use that:

2023/06/30 * Balance Assertion: AccountName
Assets:Bank:AccountName   $  0.00 = $ 52,289.96

Errors will show up like this (I deliberately introduced an error of one cent
for the example).


While parsing file "REDACTED.ledger", line 36:
While parsing posting:
  Assets:Bank:AccountName $  0.00 = $ 52,289.97
^^^
Error: Balance assertion off by $0.01 (expected to see $52,289.96)


Caveats:
Sometimes such bank statements contain sequences that are only correct with
eventual consistency. Paypal's CSV export is esp. bad if you have events
close-in-time: Events T1, T2.1, T2.2, T3: correct at T1, correct at T2, but
both T2.1 & T2.2 use the balance after T1.

-- 
Robin Hugh Johnson
Gentoo Linux: Dev, Infra Lead, Foundation President & Treasurer
E-Mail   : robb...@gentoo.org
GnuPG FP : 11ACBA4F 4778E3F6 E4EDF38E B27B944E 34884E85
GnuPG FP : 7D0B3CEB E9B85B1F 825BCECF EE05E6F6 A48F6136

-- 

--- 
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/robbat2-20240516T224140-275480074Z%40orbis-terrarum.net.


Help with adjustment transaction

2024-05-16 Thread oliver
I am embarrrassed to have to ask for help with this.  Unfortunately, my 
math skill are non-existant.

I start with savings account equty of $1,348.50. After several months of 
transactions, ledger balance gives me minus (-) $235.46. According to my 
bank the balance is $1,828.79.

What adjustment to I have to enter in order for ledger balance to match 
bank balance and how does one figure that out?

Thamk you

-- 

--- 
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/870f8b8d-7b85-4a48-8758-59e3e345b84dn%40googlegroups.com.