working on UI.

This commit is contained in:
Bryce Covert
2021-01-09 00:09:52 -08:00
parent c6dd929c86
commit d3232c70b2
8 changed files with 242 additions and 117 deletions

View File

@@ -81,6 +81,11 @@
(- amount))]
consideration)]
(log/info "Found " (count considerations) "considerations for transaction of" amount)
considerations
))
(defn match-transaction-to-single-unfulfilled-autopayments [amount client-id]
(let [considerations (match-transaction-to-unfulfilled-autopayments amount client-id)]
(if (= 1 (count considerations))
(first considerations)
[])))
@@ -159,7 +164,7 @@
)]
(let [existing-check (transaction->existing-payment transaction check-number client-id bank-account-id amount id)
invoices-matches (when-not existing-check
(match-transaction-to-unfulfilled-autopayments amount client-id ))]
(match-transaction-to-single-unfulfilled-autopayments amount client-id ))]
(cond->
[#:transaction
{:post-date (coerce/to-date (time/parse post-date "YYYY-MM-dd"))