More test coverage, also found a bug where bulk voided invoices were not unvoidable
This commit is contained in:
@@ -319,7 +319,8 @@
|
||||
}]
|
||||
(map
|
||||
(fn [iea]
|
||||
[:db/retract (:db/id i) :invoice/expense-accounts (:db/id iea)])
|
||||
{:db/id (:db/id iea)
|
||||
:invoice-expense-account/amount 0.0})
|
||||
(:invoice/expense-accounts i))))))
|
||||
(:id context))
|
||||
{:message (str "Succesfully voided " (count all-ids))}))
|
||||
@@ -339,6 +340,8 @@
|
||||
:in ['$ '?e]}
|
||||
:args [history id]})
|
||||
[last-transaction] (->> txs (sort-by first) (last))]
|
||||
(mu/log ::here
|
||||
:txes txs)
|
||||
(transact-with-ledger [(->> txs
|
||||
(filter (fn [[tx]] (= tx last-transaction)))
|
||||
(reduce (fn [new-transaction [_ entity original-status original-outstanding total expense-account expense-account-amount]]
|
||||
|
||||
Reference in New Issue
Block a user