only inserting transactions if company found
This commit is contained in:
@@ -68,23 +68,24 @@
|
|||||||
|
|
||||||
|
|
||||||
(try
|
(try
|
||||||
(transactions/upsert!
|
(when company-id
|
||||||
{:post-date (time/parse post-date "YYYY-MM-dd")
|
(transactions/upsert!
|
||||||
:id (sha-256 (str id))
|
{:post-date (time/parse post-date "YYYY-MM-dd")
|
||||||
:account-id account-id
|
:id (sha-256 (str id))
|
||||||
:date (time/parse date "YYYY-MM-dd")
|
:account-id account-id
|
||||||
:amount amount
|
:date (time/parse date "YYYY-MM-dd")
|
||||||
:description-original description-original
|
:amount amount
|
||||||
:description-simple description-simple
|
:description-original description-original
|
||||||
:type type
|
:description-simple description-simple
|
||||||
:status status
|
:type type
|
||||||
:company-id company-id
|
:status status
|
||||||
:check-number check-number
|
:company-id company-id
|
||||||
:bank-account-id (transaction->bank-account-id transaction)
|
:check-number check-number
|
||||||
:check-id check-id
|
:bank-account-id (transaction->bank-account-id transaction)
|
||||||
})
|
:check-id check-id
|
||||||
(when check-id
|
})
|
||||||
(checks/update! {:id check-id :status "cleared"}))
|
(when check-id
|
||||||
|
(checks/update! {:id check-id :status "cleared"})))
|
||||||
|
|
||||||
(catch Exception e
|
(catch Exception e
|
||||||
(println e)))))
|
(println e)))))
|
||||||
|
|||||||
Reference in New Issue
Block a user