all repos

clerk @ 2298caf

missing tooling for ledger/hledger

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

Oleksandr Smirnov Oleksandr Smirnov
olexsmir@gmail.com
add support of subdirectives and it's highlights, 1 month ago
1
-- input --
2
2026-05-11 testies
3
	expenses:atm  UAH 20.00 @ 1 USD = 0 UAH
4
	assets:bank
5
6
-- expect --
7
Journal
8
  Transaction j:1:1-5:0
9
    Date: 2026-05-11
10
    Payee: "testies" j:1:12-2:0
11
    Posting j:2:1-3:1
12
      Account j:2:2-2:14
13
        SubAccount: "expenses" j:2:2-2:10
14
        SubAccount: "atm" j:2:11-2:14
15
      Amount j:2:16-2:25
16
        Quantity: 20
17
        Commodity: "UAH" j:2:16-2:19
18
        CommodityPos: Before
19
        HasSpace: true
20
        Precision: 2
21
        Decimal: "."
22
      Cost(unit) j:2:26-2:33
23
        Amount j:2:28-2:33
24
          Quantity: 1
25
          Commodity: "USD" j:2:30-2:33
26
          CommodityPos: After
27
          HasSpace: true
28
          Precision: 0
29
      BalanceAssertion j:2:34-3:0
30
        IsStrict: false
31
        IsInclusive: false
32
        IsAssignment: false
33
        Amount j:2:36-3:0
34
          Quantity: 0
35
          Commodity: "UAH" j:2:38-3:0
36
          CommodityPos: After
37
          HasSpace: true
38
          Precision: 0
39
    Posting j:3:1-5:0
40
      Account j:3:2-4:0
41
        SubAccount: "assets" j:3:2-3:8
42
        SubAccount: "bank" j:3:9-4:0
43
      Amount: <elided>
44
  BlankLine j:5:0-5:1