Added Notes and cleared against fields.

This commit is contained in:
Bryce Covert
2019-09-30 22:01:09 -07:00
parent c7c63f6a02
commit 70e5c84716
5 changed files with 29 additions and 12 deletions

View File

@@ -200,6 +200,8 @@
:journal-entry/external-id (:external_id entry)
:journal-entry/vendor (all-vendors (:vendor_name entry))
:journal-entry/amount (:amount entry)
:journal-entry/note (:note entry)
:journal-entry/cleared-against (:cleared_against entry)
:journal-entry/line-items
(mapv (fn [ea]
@@ -207,12 +209,10 @@
(get all-client-locations (:client_code entry))
(:location ea))
(throw (Exception. (str "Location '" (:location ea) "' not found."))))
(when (and (not (all-accounts (:account_identifier ea)))
(not (get
(get all-client-bank-accounts (:client_code entry))
(:account_identifier ea))))
(throw (Exception. (str "Account '" (:account_identifier ea) "' not found."))))
(remove-nils {:journal-entry-line/account
(if (re-matches #"^[0-9]+$" (:account_identifier ea))