dao-treasury 0.0.10__cp310-cp310-win32.whl → 0.0.70__cp310-cp310-win32.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. dao_treasury/.grafana/provisioning/dashboards/breakdowns/Expenses.json +551 -0
  2. dao_treasury/.grafana/provisioning/dashboards/breakdowns/Revenue.json +551 -0
  3. dao_treasury/.grafana/provisioning/dashboards/dashboards.yaml +7 -7
  4. dao_treasury/.grafana/provisioning/dashboards/streams/LlamaPay.json +220 -0
  5. dao_treasury/.grafana/provisioning/dashboards/summary/Monthly.json +153 -29
  6. dao_treasury/.grafana/provisioning/dashboards/transactions/Treasury Transactions.json +181 -29
  7. dao_treasury/.grafana/provisioning/dashboards/treasury/Cashflow (Including Unsorted).json +808 -0
  8. dao_treasury/.grafana/provisioning/dashboards/treasury/Cashflow.json +602 -0
  9. dao_treasury/.grafana/provisioning/dashboards/treasury/Current Treasury Assets.json +981 -0
  10. dao_treasury/.grafana/provisioning/dashboards/treasury/Historical Treasury Balances.json +2989 -0
  11. dao_treasury/.grafana/provisioning/dashboards/treasury/Operating Cashflow.json +478 -0
  12. dao_treasury/.grafana/provisioning/datasources/datasources.yaml +17 -0
  13. dao_treasury/ENVIRONMENT_VARIABLES.py +20 -0
  14. dao_treasury/__init__.py +36 -10
  15. dao_treasury/_docker.cp310-win32.pyd +0 -0
  16. dao_treasury/_docker.py +169 -37
  17. dao_treasury/_nicknames.cp310-win32.pyd +0 -0
  18. dao_treasury/_nicknames.py +32 -0
  19. dao_treasury/_wallet.cp310-win32.pyd +0 -0
  20. dao_treasury/_wallet.py +164 -12
  21. dao_treasury/constants.cp310-win32.pyd +0 -0
  22. dao_treasury/constants.py +39 -0
  23. dao_treasury/db.py +925 -150
  24. dao_treasury/docker-compose.yaml +6 -5
  25. dao_treasury/main.py +238 -28
  26. dao_treasury/sorting/__init__.cp310-win32.pyd +0 -0
  27. dao_treasury/sorting/__init__.py +219 -115
  28. dao_treasury/sorting/_matchers.cp310-win32.pyd +0 -0
  29. dao_treasury/sorting/_matchers.py +261 -17
  30. dao_treasury/sorting/_rules.cp310-win32.pyd +0 -0
  31. dao_treasury/sorting/_rules.py +166 -21
  32. dao_treasury/sorting/factory.cp310-win32.pyd +0 -0
  33. dao_treasury/sorting/factory.py +245 -37
  34. dao_treasury/sorting/rule.cp310-win32.pyd +0 -0
  35. dao_treasury/sorting/rule.py +228 -46
  36. dao_treasury/sorting/rules/__init__.cp310-win32.pyd +0 -0
  37. dao_treasury/sorting/rules/__init__.py +1 -0
  38. dao_treasury/sorting/rules/ignore/__init__.cp310-win32.pyd +0 -0
  39. dao_treasury/sorting/rules/ignore/__init__.py +1 -0
  40. dao_treasury/sorting/rules/ignore/llamapay.cp310-win32.pyd +0 -0
  41. dao_treasury/sorting/rules/ignore/llamapay.py +20 -0
  42. dao_treasury/streams/__init__.cp310-win32.pyd +0 -0
  43. dao_treasury/streams/__init__.py +0 -0
  44. dao_treasury/streams/llamapay.cp310-win32.pyd +0 -0
  45. dao_treasury/streams/llamapay.py +388 -0
  46. dao_treasury/treasury.py +118 -25
  47. dao_treasury/types.cp310-win32.pyd +0 -0
  48. dao_treasury/types.py +104 -7
  49. dao_treasury-0.0.70.dist-info/METADATA +134 -0
  50. dao_treasury-0.0.70.dist-info/RECORD +54 -0
  51. dao_treasury-0.0.70.dist-info/top_level.txt +2 -0
  52. dao_treasury__mypyc.cp310-win32.pyd +0 -0
  53. a743a720bbc4482d330e__mypyc.cp310-win32.pyd +0 -0
  54. dao_treasury/.grafana/provisioning/datasources/sqlite.yaml +0 -10
  55. dao_treasury-0.0.10.dist-info/METADATA +0 -36
  56. dao_treasury-0.0.10.dist-info/RECORD +0 -28
  57. dao_treasury-0.0.10.dist-info/top_level.txt +0 -2
  58. {dao_treasury-0.0.10.dist-info → dao_treasury-0.0.70.dist-info}/WHEEL +0 -0
@@ -0,0 +1,602 @@
1
+ {
2
+ "annotations": {
3
+ "list": [
4
+ {
5
+ "builtIn": 1,
6
+ "datasource": {
7
+ "type": "grafana",
8
+ "uid": "-- Grafana --"
9
+ },
10
+ "enable": true,
11
+ "hide": true,
12
+ "iconColor": "rgba(0, 211, 255, 1)",
13
+ "name": "Annotations & Alerts",
14
+ "type": "dashboard"
15
+ }
16
+ ]
17
+ },
18
+ "editable": true,
19
+ "fiscalYearStartMonth": 0,
20
+ "graphTooltip": 1,
21
+ "id": 5,
22
+ "links": [],
23
+ "panels": [
24
+ {
25
+ "datasource": "SQLite",
26
+ "fieldConfig": {
27
+ "unit": "currencyUSD",
28
+ "defaults": {
29
+ "color": {
30
+ "mode": "thresholds"
31
+ },
32
+ "mappings": [],
33
+ "thresholds": {
34
+ "mode": "absolute",
35
+ "steps": [
36
+ {
37
+ "color": "green",
38
+ "value": 0
39
+ },
40
+ {
41
+ "color": "red",
42
+ "value": 80
43
+ }
44
+ ]
45
+ }
46
+ },
47
+ "overrides": []
48
+ },
49
+ "gridPos": {
50
+ "h": 4,
51
+ "w": 4,
52
+ "x": 0,
53
+ "y": 0
54
+ },
55
+ "id": 1,
56
+ "options": {
57
+ "colorMode": "value",
58
+ "graphMode": "area",
59
+ "justifyMode": "auto",
60
+ "orientation": "auto",
61
+ "percentChangeColorMode": "standard",
62
+ "reduceOptions": {
63
+ "calcs": ["lastNotNull"],
64
+ "fields": "",
65
+ "values": false
66
+ },
67
+ "showPercentChange": false,
68
+ "textMode": "auto",
69
+ "wideLayout": true
70
+ },
71
+ "pluginVersion": "12.1.1",
72
+ "targets": [
73
+ {
74
+ "datasource": "SQLite",
75
+ "queryText": "SELECT SUM(t.value_usd) AS total_revenue FROM general_ledger t JOIN txgroup_hierarchy gh USING (txgroup_id) WHERE gh.top_category = 'Revenue' AND t.timestamp >= $__from/1000 AND t.timestamp <= $__to/1000",
76
+ "queryType": "table",
77
+ "rawQueryText": "SELECT SUM(t.value_usd) AS total_revenue FROM general_ledger t JOIN txgroup_hierarchy gh USING (txgroup_id) WHERE gh.top_category = 'Revenue' AND t.timestamp >= $__from/1000 AND t.timestamp <= $__to/1000",
78
+ "refId": "A",
79
+ "timeColumns": ["time", "ts"]
80
+ }
81
+ ],
82
+ "title": "Revenue",
83
+ "type": "stat",
84
+ "description": "Displays the total value of all transactions sorted as Revenue for the selected period."
85
+ },
86
+ {
87
+ "datasource": "SQLite",
88
+ "fieldConfig": {
89
+ "unit": "currencyUSD",
90
+ "defaults": {
91
+ "color": {
92
+ "mode": "thresholds"
93
+ },
94
+ "mappings": [],
95
+ "thresholds": {
96
+ "mode": "absolute",
97
+ "steps": [
98
+ {
99
+ "color": "green",
100
+ "value": 0
101
+ },
102
+ {
103
+ "color": "red",
104
+ "value": 80
105
+ }
106
+ ]
107
+ }
108
+ },
109
+ "overrides": []
110
+ },
111
+ "gridPos": {
112
+ "h": 4,
113
+ "w": 4,
114
+ "x": 4,
115
+ "y": 0
116
+ },
117
+ "id": 2,
118
+ "options": {
119
+ "colorMode": "value",
120
+ "graphMode": "area",
121
+ "justifyMode": "auto",
122
+ "orientation": "auto",
123
+ "percentChangeColorMode": "standard",
124
+ "reduceOptions": {
125
+ "calcs": ["lastNotNull"],
126
+ "fields": "",
127
+ "values": false
128
+ },
129
+ "showPercentChange": false,
130
+ "textMode": "auto",
131
+ "wideLayout": true
132
+ },
133
+ "pluginVersion": "12.1.1",
134
+ "targets": [
135
+ {
136
+ "datasource": "SQLite",
137
+ "queryText": "SELECT SUM(t.value_usd) AS total_revenue FROM general_ledger t JOIN txgroup_hierarchy gh USING (txgroup_id) WHERE gh.top_category = 'Expenses' AND t.timestamp >= $__from/1000 AND t.timestamp <= $__to/1000",
138
+ "queryType": "table",
139
+ "rawQueryText": "SELECT SUM(t.value_usd) AS total_revenue FROM general_ledger t JOIN txgroup_hierarchy gh USING (txgroup_id) WHERE gh.top_category = 'Expenses' AND t.timestamp >= $__from/1000 AND t.timestamp <= $__to/1000",
140
+ "refId": "A",
141
+ "timeColumns": ["time", "ts"]
142
+ }
143
+ ],
144
+ "title": "Expenses",
145
+ "type": "stat",
146
+ "description": "Displays the total value of all transactions sorted as Expenses for the selected period."
147
+ },
148
+ {
149
+ "datasource": "SQLite",
150
+ "fieldConfig": {
151
+ "unit": "currencyUSD",
152
+ "defaults": {
153
+ "color": {
154
+ "mode": "thresholds"
155
+ },
156
+ "mappings": [],
157
+ "thresholds": {
158
+ "mode": "absolute",
159
+ "steps": [
160
+ {
161
+ "color": "green",
162
+ "value": 0
163
+ },
164
+ {
165
+ "color": "red",
166
+ "value": 80
167
+ }
168
+ ]
169
+ }
170
+ },
171
+ "overrides": []
172
+ },
173
+ "gridPos": {
174
+ "h": 4,
175
+ "w": 4,
176
+ "x": 8,
177
+ "y": 0
178
+ },
179
+ "id": 3,
180
+ "options": {
181
+ "colorMode": "value",
182
+ "graphMode": "area",
183
+ "justifyMode": "auto",
184
+ "orientation": "auto",
185
+ "percentChangeColorMode": "standard",
186
+ "reduceOptions": {
187
+ "calcs": ["lastNotNull"],
188
+ "fields": "",
189
+ "values": false
190
+ },
191
+ "showPercentChange": false,
192
+ "textMode": "auto",
193
+ "wideLayout": true
194
+ },
195
+ "pluginVersion": "12.1.1",
196
+ "targets": [
197
+ {
198
+ "datasource": "SQLite",
199
+ "queryText": "SELECT SUM(t.value_usd) AS total_revenue FROM general_ledger t JOIN txgroup_hierarchy gh USING (txgroup_id) WHERE gh.top_category = 'Cost of Revenue' AND t.timestamp >= $__from/1000 AND t.timestamp <= $__to/1000",
200
+ "queryType": "table",
201
+ "rawQueryText": "SELECT SUM(t.value_usd) AS total_revenue FROM general_ledger t JOIN txgroup_hierarchy gh USING (txgroup_id) WHERE gh.top_category = 'Cost of Revenue' AND t.timestamp >= $__from/1000 AND t.timestamp <= $__to/1000",
202
+ "refId": "A",
203
+ "timeColumns": ["time", "ts"]
204
+ }
205
+ ],
206
+ "title": "Cost of Revenue",
207
+ "type": "stat",
208
+ "description": "Displays the total value of all transactions sorted as Cost of Revenue for the selected period."
209
+ },
210
+ {
211
+ "datasource": "SQLite",
212
+ "fieldConfig": {
213
+ "unit": "currencyUSD",
214
+ "defaults": {
215
+ "color": {
216
+ "mode": "thresholds"
217
+ },
218
+ "mappings": [],
219
+ "thresholds": {
220
+ "mode": "absolute",
221
+ "steps": [
222
+ {
223
+ "color": "green",
224
+ "value": 0
225
+ },
226
+ {
227
+ "color": "red",
228
+ "value": 80
229
+ }
230
+ ]
231
+ }
232
+ },
233
+ "overrides": []
234
+ },
235
+ "gridPos": {
236
+ "h": 4,
237
+ "w": 4,
238
+ "x": 12,
239
+ "y": 0
240
+ },
241
+ "id": 4,
242
+ "options": {
243
+ "colorMode": "value",
244
+ "graphMode": "area",
245
+ "justifyMode": "auto",
246
+ "orientation": "auto",
247
+ "percentChangeColorMode": "standard",
248
+ "reduceOptions": {
249
+ "calcs": ["lastNotNull"],
250
+ "fields": "",
251
+ "values": false
252
+ },
253
+ "showPercentChange": false,
254
+ "textMode": "auto",
255
+ "wideLayout": true
256
+ },
257
+ "pluginVersion": "12.1.1",
258
+ "targets": [
259
+ {
260
+ "datasource": "SQLite",
261
+ "queryText": "SELECT SUM(t.value_usd) AS total_revenue FROM general_ledger t JOIN txgroup_hierarchy gh USING (txgroup_id) WHERE gh.top_category = 'Other Income' AND t.timestamp >= $__from/1000 AND t.timestamp <= $__to/1000",
262
+ "queryType": "table",
263
+ "rawQueryText": "SELECT SUM(t.value_usd) AS total_revenue FROM general_ledger t JOIN txgroup_hierarchy gh USING (txgroup_id) WHERE gh.top_category = 'Other Income' AND t.timestamp >= $__from/1000 AND t.timestamp <= $__to/1000",
264
+ "refId": "A",
265
+ "timeColumns": ["time", "ts"]
266
+ }
267
+ ],
268
+ "title": "Other Income",
269
+ "type": "stat",
270
+ "description": "Displays the total value of all transactions sorted as Other Income for the selected period."
271
+ },
272
+ {
273
+ "datasource": "SQLite",
274
+ "fieldConfig": {
275
+ "unit": "currencyUSD",
276
+ "defaults": {
277
+ "color": {
278
+ "mode": "thresholds"
279
+ },
280
+ "mappings": [],
281
+ "thresholds": {
282
+ "mode": "absolute",
283
+ "steps": [
284
+ {
285
+ "color": "green",
286
+ "value": 0
287
+ },
288
+ {
289
+ "color": "red",
290
+ "value": 80
291
+ }
292
+ ]
293
+ }
294
+ },
295
+ "overrides": []
296
+ },
297
+ "gridPos": {
298
+ "h": 4,
299
+ "w": 4,
300
+ "x": 16,
301
+ "y": 0
302
+ },
303
+ "id": 5,
304
+ "options": {
305
+ "colorMode": "value",
306
+ "graphMode": "area",
307
+ "justifyMode": "auto",
308
+ "orientation": "auto",
309
+ "percentChangeColorMode": "standard",
310
+ "reduceOptions": {
311
+ "calcs": ["lastNotNull"],
312
+ "fields": "",
313
+ "values": false
314
+ },
315
+ "showPercentChange": false,
316
+ "textMode": "auto",
317
+ "wideLayout": true
318
+ },
319
+ "pluginVersion": "12.1.1",
320
+ "targets": [
321
+ {
322
+ "datasource": "SQLite",
323
+ "queryText": "SELECT SUM(t.value_usd) AS total_revenue FROM general_ledger t JOIN txgroup_hierarchy gh USING (txgroup_id) WHERE gh.top_category = 'Other Expenses' AND t.timestamp >= $__from/1000 AND t.timestamp <= $__to/1000",
324
+ "queryType": "table",
325
+ "rawQueryText": "SELECT SUM(t.value_usd) AS total_revenue FROM general_ledger t JOIN txgroup_hierarchy gh USING (txgroup_id) WHERE gh.top_category = 'Other Expenses' AND t.timestamp >= $__from/1000 AND t.timestamp <= $__to/1000",
326
+ "refId": "A",
327
+ "timeColumns": ["time", "ts"]
328
+ }
329
+ ],
330
+ "title": "Other Expenses",
331
+ "type": "stat",
332
+ "description": "Displays the total value of all transactions sorted as Other Expenses for the selected period."
333
+ },
334
+ {
335
+ "datasource": "SQLite",
336
+ "description": "Shows the net total cashflow (all Revenue and Other Income minus all Expenses, Cost of Revenue, and Other Expenses) for the selected period.",
337
+ "fieldConfig": {
338
+ "unit": "currencyUSD",
339
+ "defaults": {
340
+ "color": {
341
+ "mode": "thresholds"
342
+ },
343
+ "mappings": [],
344
+ "thresholds": {
345
+ "mode": "absolute",
346
+ "steps": [
347
+ {
348
+ "color": "green",
349
+ "value": 0
350
+ },
351
+ {
352
+ "color": "red",
353
+ "value": 80
354
+ }
355
+ ]
356
+ }
357
+ },
358
+ "overrides": []
359
+ },
360
+ "gridPos": {
361
+ "h": 4,
362
+ "w": 4,
363
+ "x": 20,
364
+ "y": 0
365
+ },
366
+ "id": 10,
367
+ "options": {
368
+ "colorMode": "value",
369
+ "graphMode": "area",
370
+ "justifyMode": "auto",
371
+ "orientation": "auto",
372
+ "percentChangeColorMode": "standard",
373
+ "reduceOptions": {
374
+ "calcs": ["lastNotNull"],
375
+ "fields": "",
376
+ "values": false
377
+ },
378
+ "showPercentChange": false,
379
+ "textMode": "auto",
380
+ "wideLayout": true
381
+ },
382
+ "pluginVersion": "12.1.1",
383
+ "targets": [
384
+ {
385
+ "datasource": "SQLite",
386
+ "queryText": "SELECT (\n SUM(CASE WHEN gh.top_category = 'Revenue' THEN t.value_usd ELSE 0 END)\n - SUM(CASE WHEN gh.top_category = 'Cost of Revenue' THEN t.value_usd ELSE 0 END)\n - SUM(CASE WHEN gh.top_category = 'Expenses' THEN t.value_usd ELSE 0 END)\n + SUM(CASE WHEN gh.top_category = 'Other Income' THEN t.value_usd ELSE 0 END)\n - SUM(CASE WHEN gh.top_category = 'Other Expenses' THEN t.value_usd ELSE 0 END)\n) AS total_net\nFROM general_ledger t\nJOIN txgroup_hierarchy gh USING (txgroup_id)\nWHERE t.timestamp >= $__from/1000 AND t.timestamp <= $__to/1000",
387
+ "queryType": "table",
388
+ "rawQueryText": "SELECT (\n SUM(CASE WHEN gh.top_category = 'Revenue' THEN t.value_usd ELSE 0 END)\n - SUM(CASE WHEN gh.top_category = 'Cost of Revenue' THEN t.value_usd ELSE 0 END)\n - SUM(CASE WHEN gh.top_category = 'Expenses' THEN t.value_usd ELSE 0 END)\n + SUM(CASE WHEN gh.top_category = 'Other Income' THEN t.value_usd ELSE 0 END)\n - SUM(CASE WHEN gh.top_category = 'Other Expenses' THEN t.value_usd ELSE 0 END)\n) AS total_net\nFROM general_ledger t\nJOIN txgroup_hierarchy gh USING (txgroup_id)\nWHERE t.timestamp >= $__from/1000 AND t.timestamp <= $__to/1000",
389
+ "refId": "A",
390
+ "timeColumns": ["time", "ts"]
391
+ }
392
+ ],
393
+ "title": "Sorted Total",
394
+ "type": "stat"
395
+ },
396
+ {
397
+ "datasource": "SQLite",
398
+ "description": "Time series chart of all sorted cashflows, grouped by category, for the selected period. Shows Total Revenue, Total Expenses, and Net for each week, helping to analyze trends in the DAO's financial flows over time.",
399
+ "fieldConfig": {
400
+ "unit": "currencyUSD",
401
+ "defaults": {
402
+ "color": {
403
+ "mode": "palette-classic"
404
+ },
405
+ "custom": {
406
+ "axisBorderShow": false,
407
+ "axisCenteredZero": false,
408
+ "axisColorMode": "text",
409
+ "axisLabel": "",
410
+ "axisPlacement": "auto",
411
+ "barAlignment": 0,
412
+ "barWidthFactor": 0.6,
413
+ "drawStyle": "bars",
414
+ "fillOpacity": 70,
415
+ "gradientMode": "none",
416
+ "hideFrom": {
417
+ "legend": false,
418
+ "tooltip": false,
419
+ "viz": false
420
+ },
421
+ "insertNulls": false,
422
+ "lineInterpolation": "linear",
423
+ "lineWidth": 1,
424
+ "pointSize": 5,
425
+ "scaleDistribution": {
426
+ "type": "linear"
427
+ },
428
+ "showPoints": "auto",
429
+ "spanNulls": false,
430
+ "stacking": {
431
+ "group": "A",
432
+ "mode": "normal"
433
+ },
434
+ "thresholdsStyle": {
435
+ "mode": "off"
436
+ }
437
+ },
438
+ "mappings": [],
439
+ "thresholds": {
440
+ "mode": "absolute",
441
+ "steps": [
442
+ {
443
+ "color": "green",
444
+ "value": 0
445
+ },
446
+ {
447
+ "color": "red",
448
+ "value": 80
449
+ }
450
+ ]
451
+ }
452
+ },
453
+ "overrides": [
454
+ {
455
+ "matcher": {
456
+ "id": "byName",
457
+ "options": "Net (sum)"
458
+ },
459
+ "properties": [
460
+ {
461
+ "id": "custom.drawStyle",
462
+ "value": "line"
463
+ },
464
+ {
465
+ "id": "custom.stacking",
466
+ "value": {
467
+ "group": "A",
468
+ "mode": "none"
469
+ }
470
+ },
471
+ {
472
+ "id": "custom.fillOpacity",
473
+ "value": 19
474
+ }
475
+ ]
476
+ }
477
+ ]
478
+ },
479
+ "gridPos": {
480
+ "h": 12,
481
+ "w": 24,
482
+ "x": 0,
483
+ "y": 4
484
+ },
485
+ "id": 11,
486
+ "options": {
487
+ "legend": {
488
+ "calcs": [],
489
+ "displayMode": "list",
490
+ "placement": "bottom",
491
+ "showLegend": true
492
+ },
493
+ "tooltip": {
494
+ "hideZeros": false,
495
+ "mode": "single",
496
+ "sort": "none"
497
+ }
498
+ },
499
+ "pluginVersion": "12.1.1",
500
+ "targets": [
501
+ {
502
+ "datasource": "SQLite",
503
+ "queryText": "SELECT t.timestamp, SUM(CASE WHEN gh.top_category in ('Revenue', 'Other Income') THEN t.value_usd ELSE 0 END) AS \"Total Revenue\", SUM(CASE WHEN gh.top_category in ('Cost of Revenue','Expenses','Other Expenses') THEN t.value_usd ELSE 0 END) * -1 AS \"Total Expenses\", SUM(CASE WHEN gh.top_category in ('Revenue', 'Other Income') THEN t.value_usd ELSE 0 END) - SUM(CASE WHEN gh.top_category in ('Cost of Revenue','Expenses','Other Expenses') THEN t.value_usd ELSE 0 END) AS \"Net\" FROM general_ledger AS t JOIN txgroup_hierarchy gh ON t.txgroup_id = gh.txgroup_id WHERE t.timestamp >= $__from/1000 AND t.timestamp <= $__to/1000 GROUP BY timestamp ORDER BY timestamp;",
504
+ "queryType": "table",
505
+ "rawQueryText": "SELECT t.timestamp, SUM(CASE WHEN gh.top_category in ('Revenue', 'Other Income') THEN t.value_usd ELSE 0 END) AS \"Total Revenue\", SUM(CASE WHEN gh.top_category in ('Cost of Revenue','Expenses','Other Expenses') THEN t.value_usd ELSE 0 END) * -1 AS \"Total Expenses\", SUM(CASE WHEN gh.top_category in ('Revenue', 'Other Income') THEN t.value_usd ELSE 0 END) - SUM(CASE WHEN gh.top_category in ('Cost of Revenue','Expenses','Other Expenses') THEN t.value_usd ELSE 0 END) AS \"Net\" FROM general_ledger AS t JOIN txgroup_hierarchy gh ON t.txgroup_id = gh.txgroup_id WHERE t.timestamp >= $__from/1000 AND t.timestamp <= $__to/1000 GROUP BY timestamp ORDER BY timestamp;",
506
+ "refId": "A",
507
+ "timeColumns": ["timestamp"]
508
+ }
509
+ ],
510
+ "title": "Weekly Cashflow",
511
+ "transformations": [
512
+ {
513
+ "id": "formatTime",
514
+ "options": {
515
+ "outputFormat": "YYYY-WW",
516
+ "timeField": "timestamp",
517
+ "timezone": "browser",
518
+ "useTimezone": true
519
+ }
520
+ },
521
+ {
522
+ "id": "convertFieldType",
523
+ "options": {
524
+ "conversions": [
525
+ {
526
+ "dateFormat": "YYYY-WW",
527
+ "destinationType": "time",
528
+ "targetField": "timestamp"
529
+ }
530
+ ],
531
+ "fields": {}
532
+ }
533
+ },
534
+ {
535
+ "id": "groupBy",
536
+ "options": {
537
+ "fields": {
538
+ "Cost of Revenue": {
539
+ "aggregations": ["sum"],
540
+ "operation": "aggregate"
541
+ },
542
+ "Expenses": {
543
+ "aggregations": ["sum"],
544
+ "operation": "aggregate"
545
+ },
546
+ "Net": {
547
+ "aggregations": ["sum"],
548
+ "operation": "aggregate"
549
+ },
550
+ "Other Expenses": {
551
+ "aggregations": ["sum"],
552
+ "operation": "aggregate"
553
+ },
554
+ "Other Income": {
555
+ "aggregations": ["sum"],
556
+ "operation": "aggregate"
557
+ },
558
+ "Revenue": {
559
+ "aggregations": ["sum"],
560
+ "operation": "aggregate"
561
+ },
562
+ "Timestamp": {
563
+ "aggregations": [],
564
+ "operation": "groupby"
565
+ },
566
+ "Total Expenses": {
567
+ "aggregations": ["sum"],
568
+ "operation": "aggregate"
569
+ },
570
+ "Total Revenue": {
571
+ "aggregations": ["sum"],
572
+ "operation": "aggregate"
573
+ },
574
+ "timestamp": {
575
+ "aggregations": [],
576
+ "operation": "groupby"
577
+ }
578
+ }
579
+ }
580
+ }
581
+ ],
582
+ "type": "timeseries"
583
+ }
584
+ ],
585
+ "preload": false,
586
+ "refresh": "",
587
+ "schemaVersion": 41,
588
+ "tags": ["cashflow"],
589
+ "templating": {
590
+ "list": []
591
+ },
592
+ "time": {
593
+ "from": "now-6M",
594
+ "to": "now"
595
+ },
596
+ "timepicker": {},
597
+ "timezone": "",
598
+ "title": "Total Cashflow Summary",
599
+ "description": "Shows all sorted cashflows, including Revenue, Cost of Revenue, Expenses, Other Income, and Other Expense, but omits transactions pending categorization. Useful for analyzing the DAO's complete sorted financial flows.",
600
+ "uid": "7e2b1c8a-4e2d-4b7a-9c1a-2f8e6b7d9c3f",
601
+ "version": 7
602
+ }