supporting fixing of check numbers.
This commit is contained in:
@@ -254,7 +254,6 @@
|
||||
|
||||
(-> []
|
||||
(conj payment)
|
||||
(conj [:inc (:db/id bank-account) :bank-account/check-number 1])
|
||||
(into (invoice-payments invoices invoice-amounts)))))
|
||||
|
||||
|
||||
@@ -289,7 +288,10 @@
|
||||
checks (->> (for [[[vendor-id invoices] index] (map vector invoices-grouped-by-vendor (range))]
|
||||
(invoices->entities invoices (vendors vendor-id) client bank-account type index invoice-amounts))
|
||||
(reduce into [])
|
||||
doall)]
|
||||
doall)
|
||||
checks (if (= type :payment-type/check)
|
||||
(conj checks [:inc (:db/id bank-account) :bank-account/check-number (count invoices-grouped-by-vendor)])
|
||||
checks)]
|
||||
(when (= type :payment-type/check)
|
||||
(make-pdfs (filter #(= :payment-type/check (:payment/type %)) checks)))
|
||||
@(d/transact (d/connect uri) checks)
|
||||
|
||||
Reference in New Issue
Block a user