all repos

clerk @ master

missing tooling for ledger/hledger

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

Oleksandr Smirnov Oleksandr Smirnov
olexsmir@gmail.com
tests: switch to txtar, 3 days ago
1
-- input --
2
2026-05-11 testies
3
	expenses:atm  UAH 20.00 @ 1 USD = 0 UAH
4
	assets:bank
5
-- expect --
6
Journal
7
  Transaction j:1:1-4:1
8
    Date: 2026-05-11
9
    Payee: "testies" j:1:12-2:0
10
    Posting j:2:1-3:1
11
      Account j:2:2-2:14
12
        SubAccount: "expenses" j:2:2-2:10
13
        SubAccount: "atm" j:2:11-2:14
14
      Amount j:2:16-2:16
15
        Quantity: 20
16
        Commodity: "UAH"
17
        CommodityPos: Before
18
        HasSpace: true
19
        Precision: 2
20
        Decimal: "."
21
      Cost(unit) j:2:26-2:33
22
        Amount j:2:28-2:28
23
          Quantity: 1
24
          Commodity: "USD"
25
          CommodityPos: After
26
          HasSpace: true
27
          Precision: 0
28
          Decimal: "."
29
      BalanceAssertion j:2:34-3:0
30
        IsStrict: false
31
        IsInclusive: false
32
        Amount j:2:36-2:36
33
          Quantity: 0
34
          Commodity: "UAH"
35
          CommodityPos: After
36
          HasSpace: true
37
          Precision: 0
38
          Decimal: "."
39
    Posting j:3:1-4:1
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>