all repos

clerk @ 065541f

missing tooling for ledger/hledger

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

Oleksandr Smirnov Oleksandr Smirnov
olexsmir@gmail.com
syntax: respect commodity format; =*; ===; :=, 2 months 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
          Decimal: "."
30
      BalanceAssertion j:2:34-3:0
31
        IsStrict: false
32
        IsInclusive: false
33
        IsAssignment: false
34
        Amount j:2:36-3:0
35
          Quantity: 0
36
          Commodity: "UAH" j:2:38-3:0
37
          CommodityPos: After
38
          HasSpace: true
39
          Precision: 0
40
          Decimal: "."
41
    Posting j:3:1-5:0
42
      Account j:3:2-4:0
43
        SubAccount: "assets" j:3:2-3:8
44
        SubAccount: "bank" j:3:9-4:0
45
      Amount: <elided>
46
  BlankLine j:5:0-5:1