32 lines
705 B
Plaintext
32 lines
705 B
Plaintext
;; This buffer is for Clojure experiments and evaluation.
|
|
|
|
;; Press C-j to evaluate the last expression.
|
|
|
|
;; You can also press C-u C-j to evaluate the expression and pretty-print its result.
|
|
|
|
(user/init-repl)
|
|
|
|
(dc/q '[:find ?nc
|
|
:in $ ?c
|
|
:where
|
|
[?je :journal-entry/client ?c]
|
|
]
|
|
[:client/code "NGOP"])
|
|
|
|
|
|
|
|
|
|
|
|
(->>
|
|
(:line-items (first (:line-item-groups (first p))))
|
|
(map (fn [li]
|
|
(->> (:line-item-expense-fields li)
|
|
(map
|
|
(fn [field]
|
|
[(:text (:label-detection field)) (:text (:value-detection field))])
|
|
)
|
|
(filter first)
|
|
(into {}))))
|
|
(clojure.data.json/pprint))
|
|
|