Add vendor pre-population for bulk code and individual edit forms

- Add vendor-changed HTMX handlers for both bulk code and individual edit
- Pre-populate default account at 100% when vendor is selected and no accounts exist
- Fix render-accounts-section to render from step-params correctly
- Change bulk code vendor-changed from hx-get to hx-post to include form data
- Add routes for vendor-changed endpoints
- Update e2e tests to cover vendor pre-population
- Run lein cljfmt fix across codebase
This commit is contained in:
2026-05-21 14:45:19 -07:00
parent 8bd0cee1b1
commit ba87805d4c
210 changed files with 8694 additions and 9627 deletions

View File

@@ -12,12 +12,11 @@
(defn line->id [{:keys [source id client-code]}]
(str client-code "-" source "-" id))
(defn csv->graphql-rows [lines]
(for [lines (partition-by line->id (drop 1 lines))
:let [{:keys [source client-code date vendor-name note cleared-against] :as line} (first lines)]]
:let [{:keys [source client-code date vendor-name note cleared-against] :as line} (first lines)]]
{:source source
:external_id (line->id line)
:external_id (line->id line)
:client_code client-code
:date date
:note note
@@ -33,8 +32,8 @@
{:account_identifier account-identifier
:location (some-> location str/trim)
:debit (if (str/blank? debit)
0.0
(Double/parseDouble debit))
0.0
(Double/parseDouble debit))
:credit (if (str/blank? credit)
0.0
(Double/parseDouble credit))})