visible for payment added back
This commit is contained in:
@@ -29,19 +29,19 @@
|
||||
amount)
|
||||
date (atime/parse date "YYYY-MM-dd")]
|
||||
#:transaction
|
||||
{:post-date (coerce/to-date (atime/parse post-date "YYYY-MM-dd"))
|
||||
:id (di/sha-256 (str id))
|
||||
:db/id (random-tempid)
|
||||
:raw-id (str id)
|
||||
:account-id account-id
|
||||
:date (if use-date-instead-of-post-date?
|
||||
(coerce/to-date (atime/parse post-date "YYYY-MM-dd"))
|
||||
(coerce/to-date date))
|
||||
:amount (double amount)
|
||||
:description-original (some-> description-original (str/replace #"\s+" " "))
|
||||
:description-simple (some-> description-simple (str/replace #"\s+" " "))
|
||||
:type type
|
||||
:status status}))
|
||||
{:post-date (coerce/to-date (atime/parse post-date "YYYY-MM-dd"))
|
||||
:id (di/sha-256 (str id))
|
||||
:db/id (random-tempid)
|
||||
:raw-id (str id)
|
||||
:account-id account-id
|
||||
:date (if use-date-instead-of-post-date?
|
||||
(coerce/to-date (atime/parse post-date "YYYY-MM-dd"))
|
||||
(coerce/to-date date))
|
||||
:amount (double amount)
|
||||
:description-original (some-> description-original (str/replace #"\s+" " "))
|
||||
:description-simple (some-> description-simple (str/replace #"\s+" " "))
|
||||
:type type
|
||||
:status status}))
|
||||
|
||||
(defn import-yodlee2-int []
|
||||
(statsd/event {:title "Yodlee2 import started"
|
||||
@@ -64,6 +64,8 @@
|
||||
:let [_ (alog/info ::getting-transactions-for :code client-code)]
|
||||
transaction (wrap-integration #(client2/get-specific-transactions client-code yodlee-account)
|
||||
bank-account)]
|
||||
|
||||
(alog/info ::importing-single-transaction)
|
||||
(t/import-transaction! import-batch (assoc (yodlee->transaction transaction use-date-instead-of-post-date?)
|
||||
:transaction/bank-account bank-account
|
||||
:transaction/client [:client/code client-code])))
|
||||
@@ -88,4 +90,3 @@
|
||||
|
||||
|
||||
(def import-yodlee2 (allow-once import-yodlee2-int))
|
||||
|
||||
|
||||
@@ -92,6 +92,7 @@
|
||||
:bank-account/numeric-code
|
||||
:bank-account/name
|
||||
:bank-account/include-in-reports
|
||||
:bank-account/visible
|
||||
:bank-account/number
|
||||
:bank-account/bank-code
|
||||
:bank-account/sort-order
|
||||
@@ -264,6 +265,10 @@
|
||||
[:boolean {:decode/string {:enter #(if (= % "on") true
|
||||
|
||||
(boolean %))}}]]
|
||||
[:bank-account/visible {:default false}
|
||||
[:boolean {:decode/string {:enter #(if (= % "on") true
|
||||
|
||||
(boolean %))}}]]
|
||||
[:bank-account/use-date-instead-of-post-date? {:default false}
|
||||
[:boolean {:decode/string {:enter #(if (= % "on") true
|
||||
|
||||
@@ -335,6 +340,10 @@
|
||||
[:boolean {:decode/string {:enter #(if (= % "on") true
|
||||
|
||||
(boolean %))}}]]
|
||||
[:bank-account/visible {:default false}
|
||||
[:boolean {:decode/string {:enter #(if (= % "on") true
|
||||
|
||||
(boolean %))}}]]
|
||||
[:bank-account/use-date-instead-of-post-date? {:default false}
|
||||
[:boolean {:decode/string {:enter #(if (= % "on") true
|
||||
|
||||
@@ -803,7 +812,13 @@
|
||||
(com/checkbox {:name (fc/field-name)
|
||||
:value (boolean (fc/field-value))
|
||||
:checked (fc/field-value)}
|
||||
"Include in reports"))])
|
||||
"Include in reports"))
|
||||
[:div
|
||||
(fc/with-field :bank-account/visible
|
||||
(com/checkbox {:name (fc/field-name)
|
||||
:value (boolean (fc/field-value))
|
||||
:checked (fc/field-value)}
|
||||
"Visible for payment"))]])
|
||||
|
||||
|
||||
|
||||
@@ -941,6 +956,13 @@
|
||||
:checked (fc/field-value)}
|
||||
"Include in reports"))
|
||||
|
||||
[:div
|
||||
(fc/with-field :bank-account/visible
|
||||
(com/checkbox {:name (fc/field-name)
|
||||
:value (boolean (fc/field-value))
|
||||
:checked (fc/field-value)}
|
||||
"Visible for payment"))]
|
||||
|
||||
[:h2.text-lg "Bank details"]
|
||||
(fc/with-field :bank-account/bank-name
|
||||
(com/validated-field {:errors (fc/field-errors)
|
||||
@@ -1034,6 +1056,13 @@
|
||||
:checked (fc/field-value)}
|
||||
"Include in reports"))
|
||||
|
||||
[:div
|
||||
(fc/with-field :bank-account/visible
|
||||
(com/checkbox {:name (fc/field-name)
|
||||
:value (boolean (fc/field-value))
|
||||
:checked (fc/field-value)}
|
||||
"Visible for payment"))]
|
||||
|
||||
[:h2.text-lg "Bank details"]
|
||||
(fc/with-field :bank-account/bank-name
|
||||
(com/validated-field {:errors (fc/field-errors)
|
||||
@@ -1292,7 +1321,8 @@
|
||||
{:db/id (str (java.util.UUID/randomUUID))
|
||||
:new? true}
|
||||
|
||||
bank-account-type (assoc :bank-account/type (keyword "bank-account-type" bank-account-type)))))
|
||||
bank-account-type (assoc :bank-account/type (keyword "bank-account-type" bank-account-type)
|
||||
:bank-account/visible true))))
|
||||
|
||||
mm/Discardable
|
||||
(can-discard? [_ step-params]
|
||||
|
||||
Reference in New Issue
Block a user