fixes for some issues found
This commit is contained in:
@@ -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)}}}
|
||||
|
||||
Reference in New Issue
Block a user