several fixes for invoices.

This commit is contained in:
Bryce Covert
2020-05-26 07:39:33 -07:00
parent 4429fa384a
commit f78133cbea
4 changed files with 101 additions and 57 deletions

View File

@@ -207,7 +207,7 @@
(= (:db/id c) (Long/parseLong client)))
clients))))
_ (when-not matching-client
(throw (ex-info (str "No client found in file. Select a client first.")
(throw (ex-info (str "Searched clients for '" customer-identifier "'. No client found in file. Select a client first.")
{:invoice-number invoice-number
:customer-identifier customer-identifier
:vendor-code vendor-code})))
@@ -237,7 +237,9 @@
(throw (ex-info (str "Failed to find potential matching invoice with"
" invoice " invoice-number
" vendor " matching-vendor
" client " (:client/name matching-client))
" client " (:client/name matching-client)
". "
(.toString e))
{:args [ invoice-number matching-vendor (:db/id matching-client)]})))
))]
@@ -270,7 +272,7 @@
imports)]
(when-not (seq transactions)
(throw (ex-info "No invoices found."
{:imports imports})))
{:imports (str imports)})))
@(d/transact (d/connect uri) (vec (set transactions)))))