big ui improvemet
This commit is contained in:
31
src/cljc/auto_ap/extract-line-items-from-invoice.repl
Normal file
31
src/cljc/auto_ap/extract-line-items-from-invoice.repl
Normal file
@@ -0,0 +1,31 @@
|
||||
;; 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))
|
||||
|
||||
Reference in New Issue
Block a user