all repos

clerk @ cddf442e7f66ba3c73d9f4f9bcb13693d28aa6b1

missing tooling for ledger/hledger

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

Oleksandr Smirnov Oleksandr Smirnov
olexsmir@gmail.com
fix: journal used to parse unset transaction status as *; print expressions, 2 months ago
1
-- input --
2
3
~ monthly
4
    expenses:rent          $2000
5
    assets:bank:checking
6
7
~ monthly from 2023-04-15 to 2023-06-16
8
    expenses:utilities          $400
9
    assets:bank:checking
10
11
~ every 2 months  in 2023, we will review
12
    expenses:utilities          $400
13
    assets:bank:checking
14
15
~ monthly  Next year blah blah
16
    expenses:food  $100
17
    assets:checking
18
19
~ monthly from 2018/6 ;In 2019 we will change this
20
    expenses:food  $100
21
    assets:checking
22
-- expect --
23
Journal
24
  BlankLine j:2:0-2:1
25
  PeriodicTransaction j:2:1-6:0
26
    Period: "monthly"
27
    Posting j:3:1-4:1
28
      Account j:3:5-3:18
29
        SubAccount: "expenses" j:3:5-3:13
30
        SubAccount: "rent" j:3:14-3:18
31
      Amount j:3:28-4:0
32
        Quantity: 2000
33
        Commodity: "$" j:3:28-3:29
34
        CommodityPos: Before
35
        HasSpace: false
36
        Precision: 0
37
        Decimal: "."
38
    Posting j:4:1-6:0
39
      Account j:4:5-5:0
40
        SubAccount: "assets" j:4:5-4:11
41
        SubAccount: "bank" j:4:12-4:16
42
        SubAccount: "checking" j:4:17-5:0
43
      Amount: <elided>
44
  BlankLine j:6:0-6:1
45
  PeriodicTransaction j:6:1-10:0
46
    Period: "monthly from 2023-04-15 to 2023-06-16"
47
    From: 2023-04-15
48
    To: 2023-06-16
49
    Posting j:7:1-8:1
50
      Account j:7:5-7:23
51
        SubAccount: "expenses" j:7:5-7:13
52
        SubAccount: "utilities" j:7:14-7:23
53
      Amount j:7:33-8:0
54
        Quantity: 400
55
        Commodity: "$" j:7:33-7:34
56
        CommodityPos: Before
57
        HasSpace: false
58
        Precision: 0
59
        Decimal: "."
60
    Posting j:8:1-10:0
61
      Account j:8:5-9:0
62
        SubAccount: "assets" j:8:5-8:11
63
        SubAccount: "bank" j:8:12-8:16
64
        SubAccount: "checking" j:8:17-9:0
65
      Amount: <elided>
66
  BlankLine j:10:0-10:1
67
  PeriodicTransaction j:10:1-14:0
68
    Period: "every 2 months"
69
    Description: "in 2023, we will review" j:10:19-11:0
70
    Posting j:11:1-12:1
71
      Account j:11:5-11:23
72
        SubAccount: "expenses" j:11:5-11:13
73
        SubAccount: "utilities" j:11:14-11:23
74
      Amount j:11:33-12:0
75
        Quantity: 400
76
        Commodity: "$" j:11:33-11:34
77
        CommodityPos: Before
78
        HasSpace: false
79
        Precision: 0
80
        Decimal: "."
81
    Posting j:12:1-14:0
82
      Account j:12:5-13:0
83
        SubAccount: "assets" j:12:5-12:11
84
        SubAccount: "bank" j:12:12-12:16
85
        SubAccount: "checking" j:12:17-13:0
86
      Amount: <elided>
87
  BlankLine j:14:0-14:1
88
  PeriodicTransaction j:14:1-18:0
89
    Period: "monthly"
90
    Description: "Next year blah blah" j:14:12-15:0
91
    Posting j:15:1-16:1
92
      Account j:15:5-15:18
93
        SubAccount: "expenses" j:15:5-15:13
94
        SubAccount: "food" j:15:14-15:18
95
      Amount j:15:20-16:0
96
        Quantity: 100
97
        Commodity: "$" j:15:20-15:21
98
        CommodityPos: Before
99
        HasSpace: false
100
        Precision: 0
101
        Decimal: "."
102
    Posting j:16:1-18:0
103
      Account j:16:5-17:0
104
        SubAccount: "assets" j:16:5-16:11
105
        SubAccount: "checking" j:16:12-17:0
106
      Amount: <elided>
107
  BlankLine j:18:0-18:1
108
  PeriodicTransaction j:18:1-21:1
109
    Period: "monthly from 2018/6"
110
    Comment j:18:23-19:0
111
      Marker: ";"
112
      Text: "In 2019 we will change this"
113
    Posting j:19:1-20:1
114
      Account j:19:5-19:18
115
        SubAccount: "expenses" j:19:5-19:13
116
        SubAccount: "food" j:19:14-19:18
117
      Amount j:19:20-20:0
118
        Quantity: 100
119
        Commodity: "$" j:19:20-19:21
120
        CommodityPos: Before
121
        HasSpace: false
122
        Precision: 0
123
        Decimal: "."
124
    Posting j:20:1-21:1
125
      Account j:20:5-21:0
126
        SubAccount: "assets" j:20:5-20:11
127
        SubAccount: "checking" j:20:12-21:0
128
      Amount: <elided>