Tino Schmidt
unread,Dec 28, 2020, 2:52:40 PM12/28/20Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to ledge...@googlegroups.com
Hi folks,
I'm trying to understand how ledger works and while I'm trying to
reproduce some examples, I'm running into some unexpected behavior.
I want to split some of my expenses between me and my roommate. The file
looks like this:
$ cat example.dat
= tag(split_mate)
$account -0,5
Assets:Mate 0,5
2020/12/09 * (CODE) Supermarket
;2020-12-08T08:47 Debit 2020-12
; bic: XXXXXXXX
; iban: XXXXXXXXXXXXXXXXXX
; split_mate: y
Expenses:Grocery €-40,91
MyBank
2020/12/19 * (CODE) Supermarket
;2020-12-08T08:47 Debit 2020-12
; bic: XXXXXXXX
; iban: XXXXXXXXXXXXXXXXX
; split_mate: y
Expenses:Grocery €-50,91
MyBank
2020/12/20 * (CODE) Supermarket
;2020-12-08T08:47 Debit 2020-12
; bic: XXXXXXXX
; iban: XXXXXXXXXXXXXXXXX
Expenses:Grocery €-60,91
MyBank
My goal is to catch all entries tagged with 'split_mate', deduct 50% of
the expenses and move them to another account called Assets:Mate.
Starting ledger with that file results in the following output:
$ ledger --decimal-comma -f example.dat
Ledger 3.1.2-20190205, the command-line accounting tool
Copyright (c) 2003-2019, John Wiegley. All rights reserved.
This program is made available under the terms of the BSD Public License.
See LICENSE file included with the distribution for details and disclaimer.
While parsing file "/tmp/ledger/example.dat", line 11:
While applying automated transaction from "/tmp/ledger/example.dat",
lines 1-3:
> = tag(split_mate)
> $account -0,5
> Assets:Mate 0,5
While extending transaction from "/tmp/ledger/example.dat", lines 5-11:
> 2020/12/09 * (CODE) Supermarket
> ;2020-12-08T08:47 Debit 2020-12
> ; bic: XXXXXXXX
> ; iban: XXXXXXXXXXXXXXXXXX
> ; split_mate: y
> Expenses:Grocery €-40,91
> MyBank
Error: Automated transaction's posting has no amount
While parsing file "/tmp/ledger/example.dat", line 19:
While applying automated transaction from "/tmp/ledger/example.dat",
lines 1-3:
> = tag(split_mate)
> $account -0,5
> Assets:Mate 0,5
While extending transaction from "/tmp/ledger/example.dat", lines 13-19:
> 2020/12/19 * (CODE) Supermarket
> ;2020-12-08T08:47 Debit 2020-12
> ; bic: XXXXXXXX
> ; iban: XXXXXXXXXXXXXXXXX
> ; split_mate: y
> Expenses:Grocery €-50,91
> MyBank
Error: Automated transaction's posting has no amount
I don't understand the error message here. What do I have to do to make
it work?
Tino