fixing percentages.
This commit is contained in:
@@ -41,6 +41,7 @@
|
||||
first
|
||||
first
|
||||
(update :user/role :db/ident))]
|
||||
(println "USER" user)
|
||||
(if user
|
||||
user
|
||||
(let [new-user-trans @(d/transact (d/connect uri) [(cond-> new-user
|
||||
|
||||
@@ -127,7 +127,7 @@
|
||||
:transaction/payment (:db/id payment)
|
||||
:transaction/vendor (:db/id (:payment/vendor payment))
|
||||
:transaction/location "A"
|
||||
:transaction/accounts [{:transaction-account/account (:db/id (a/get-account-by-numeric-code-and-sets 2110 ["default"]))
|
||||
:transaction/accounts [{:transaction-account/account (:db/id (a/get-account-by-numeric-code-and-sets 21000 ["default"]))
|
||||
:transaction-account/location "A"
|
||||
:transaction-account/amount (Math/abs (:transaction/amount transaction))}]}]
|
||||
(map (fn [x] [:db/retractEntity (:db/id x)] )
|
||||
|
||||
@@ -81,7 +81,9 @@
|
||||
valid-locations (or (:bank-account/locations bank-account) (:client/locations client))
|
||||
check (transaction->payment transaction check-number client-id bank-account-id amount id)]
|
||||
:when (and client-id
|
||||
(not (existing (sha-256 (str id)))))]
|
||||
(not (existing (sha-256 (str id))))
|
||||
(= "POSTED" status)
|
||||
)]
|
||||
(->
|
||||
#:transaction
|
||||
{:post-date (coerce/to-date (time/parse post-date "YYYY-MM-dd"))
|
||||
@@ -94,7 +96,9 @@
|
||||
:amount (double amount)
|
||||
:description-original description-original
|
||||
:description-simple description-simple
|
||||
:approval-status :transaction-approval-status/unapproved
|
||||
:approval-status (if check
|
||||
:transaction-approval-status/approved
|
||||
:transaction-approval-status/unapproved)
|
||||
:type type
|
||||
:status status
|
||||
:client client-id
|
||||
|
||||
@@ -242,8 +242,8 @@
|
||||
[]
|
||||
rows)]
|
||||
|
||||
#_txes
|
||||
@(d/transact conn txes)))
|
||||
txes
|
||||
#_@(d/transact conn txes)))
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user