all repos

clerk @ e2e9e2b

missing tooling for ledger/hledger

clerk/journal/parser/testdata/transaction_with_virtual_accounts.txtar (view raw)

Oleksandr Smirnov Oleksandr Smirnov
olexsmir@gmail.com
tests: switch to txtar, 3 days ago
1
-- input --
2
2024/01/01 groceries
3
	(virtual:account)  1 PESO
4
	[something:else]   5 PESO
5
	something:else
6
-- expect --
7
Journal
8
  Transaction j:1:1-5:1
9
    Date: 2024/01/01
10
    Payee: "groceries" j:1:12-2:0
11
    Posting j:2:1-3:1
12
      Type: unbalanced virtual
13
      Account j:2:3-2:18
14
        SubAccount: "virtual" j:2:3-2:10
15
        SubAccount: "account" j:2:11-2:18
16
      Amount j:2:21-2:21
17
        Quantity: 1
18
        Commodity: "PESO"
19
        CommodityPos: After
20
        HasSpace: true
21
        Precision: 0
22
        Decimal: "."
23
    Posting j:3:1-4:1
24
      Type: balanced virtual
25
      Account j:3:3-3:17
26
        SubAccount: "something" j:3:3-3:12
27
        SubAccount: "else" j:3:13-3:17
28
      Amount j:3:21-3:21
29
        Quantity: 5
30
        Commodity: "PESO"
31
        CommodityPos: After
32
        HasSpace: true
33
        Precision: 0
34
        Decimal: "."
35
    Posting j:4:1-5:1
36
      Account j:4:2-5:0
37
        SubAccount: "something" j:4:2-4:11
38
        SubAccount: "else" j:4:12-5:0
39
      Amount: <elided>