diff --git a/src/clj/auto_ap/graphql/ledger.clj b/src/clj/auto_ap/graphql/ledger.clj index 91614864..4ed26a13 100644 --- a/src/clj/auto_ap/graphql/ledger.clj +++ b/src/clj/auto_ap/graphql/ledger.clj @@ -177,8 +177,8 @@ (mapv (fn [li ] (-> li - (update :debit #(Double/parseDouble %)) - (update :credit #(Double/parseDouble %)))) + (update :debit #(Double/parseDouble (if (str/blank? %) "0" %))) + (update :credit #(Double/parseDouble (if (str/blank? %) "0" %))))) lis))))] (let [vendor (all-vendors (:vendor_name entry))] (when-not (all-clients (:client_code entry)) @@ -236,3 +236,4 @@ :existing [] :errors (map (fn [x] {:external_id (:external_id x) :error (:error x)}) errors)})) +