fixes for some issues found

This commit is contained in:
Bryce Covert
2021-01-04 18:57:52 -08:00
parent 65db253593
commit 0f7a5c1f00
5 changed files with 115 additions and 113 deletions

View File

@@ -41,11 +41,14 @@
:iso_date {:parse #(time/parse % time/iso-date)
:serialize #(time/unparse % time/iso-date)}
:money {:parse #(do
(log/info "parsing money...")
(cond (and (string? %)
(not (str/blank? %)))
(Double/parseDouble %)
(and (string? %)
(str/blank? %))
0.0
(int? %)
(double %)
@@ -681,14 +684,14 @@
:import_ledger_line_item {:fields {:account_identifier {:type 'String}
:location {:type 'String}
:debit {:type 'String}
:credit {:type 'String}}}
:debit {:type :money}
:credit {:type :money}}}
:import_ledger_entry {:fields {:source {:type 'String}
:external_id {:type 'String}
:client_code {:type 'String}
:date {:type 'String}
:vendor_name {:type 'String}
:amount {:type 'String}
:amount {:type :money}
:note {:type 'String}
:cleared_against {:type 'String}
:line_items {:type '(list :import_ledger_line_item)}}}