Adds memo field
This commit is contained in:
@@ -303,6 +303,7 @@ args
|
||||
(def default-read
|
||||
'[:journal-entry/amount
|
||||
:journal-entry/alternate-description
|
||||
:journal-entry/memo
|
||||
:journal-entry/source
|
||||
:journal-entry/external-id
|
||||
:db/id
|
||||
@@ -583,7 +584,10 @@ args
|
||||
:transactions)
|
||||
{:exact-match-id (:db/id (:journal-entry/original-entity i))})
|
||||
:color :primary
|
||||
:content (format "Transaction '%s'" (-> i :journal-entry/original-entity :transaction/description-original))}))))
|
||||
:content (format "Transaction '%s'" (-> i :journal-entry/original-entity :transaction/description-original))})
|
||||
(-> i :journal-entry/memo)
|
||||
(conj {:color :secondary
|
||||
:content (str "Memo: " (:journal-entry/memo i))}))))
|
||||
:render-for #{:html}}]}))
|
||||
|
||||
(def row* (partial helper/row* grid-page))
|
||||
@@ -17,16 +17,15 @@
|
||||
[auto-ap.ssr.svg :as svg]
|
||||
[auto-ap.ssr.utils :refer [apply-middleware-to-all-handlers check-allowance
|
||||
check-location-belongs clj-date-schema entity-id
|
||||
html-response main-transformer modal-response
|
||||
money wrap-form-4xx-2 wrap-schema-enforce]]
|
||||
html-response modal-response money strip
|
||||
wrap-form-4xx-2 wrap-schema-enforce]]
|
||||
[auto-ap.time :as atime]
|
||||
[bidi.bidi :as bidi]
|
||||
[clj-time.coerce :as coerce]
|
||||
[clojure.string :as str]
|
||||
[datomic.api :as dc]
|
||||
[iol-ion.query :refer [dollars=]]
|
||||
[iol-ion.utils :refer [remove-nils]]
|
||||
[malli.core :as m])
|
||||
[iol-ion.utils :refer [remove-nils]])
|
||||
(:import
|
||||
[java.util UUID]))
|
||||
|
||||
@@ -36,6 +35,7 @@
|
||||
[:db/id {:optional true} [:maybe entity-id]]
|
||||
[:journal-entry/client {:optional false} [:entity-map {:pull [:db/id :client/name :client/locations] }]]
|
||||
[:journal-entry/date clj-date-schema]
|
||||
[:journal-entry/memo {:optional true} [:maybe [ :string {:decode/string strip}]]]
|
||||
[:journal-entry/vendor {:optional false :default nil}
|
||||
[:entity-map {:pull [:db/id :vendor/name] }]]
|
||||
[:journal-entry/amount {:min 0.01}
|
||||
@@ -245,6 +245,18 @@
|
||||
:class "w-24"
|
||||
:error? (fc/field-errors)
|
||||
:placeholder "212.44"})]))
|
||||
(fc/with-field :journal-entry/memo
|
||||
[:div.w-96
|
||||
(com/validated-field
|
||||
{:label "Memo"
|
||||
:errors (fc/field-errors)}
|
||||
[:div.w-96
|
||||
(com/text-input {:name (fc/field-name)
|
||||
:error? (fc/error?)
|
||||
:class "w-96"
|
||||
:placeholder "A custom note"
|
||||
:url (bidi/path-for ssr-routes/only-routes :company-search)
|
||||
:value (fc/field-value) })])])
|
||||
(fc/with-field :journal-entry/line-items
|
||||
(com/validated-field
|
||||
{:errors (fc/field-errors)}
|
||||
|
||||
Reference in New Issue
Block a user