Fixes check width to be wider, fixes 1099 page

This commit is contained in:
2023-05-01 15:48:29 -07:00
parent 1fdbd72a50
commit a292ee485c
5 changed files with 154 additions and 15 deletions

View File

@@ -76,9 +76,9 @@
amount (str "--" (.format df amount) "--")]
[:table {:num-cols 12 :border false :leading 11 :widths (distribute [2 3 3 3 3 3 3 3 3 2 2 2])}
[(let [{:keys [:client/name] {:keys [:address/street1 :address/city :address/state :address/zip]} :client/address} client]
[:cell {:colspan 4 } [:paragraph {:leading 14} name "\n" street1 "\n" (str city ", " state " " zip)] ])
[:cell {:colspan 5 } [:paragraph {:leading 14} name "\n" street1 "\n" (str city ", " state " " zip)] ])
(let [{:keys [:bank-account/bank-name :bank-account/bank-code] } bank-account]
[:cell {:colspan 6 :align :center} [:paragraph {:style :bold} bank-name] [:paragraph {:size 8 :leading 8} bank-code]])
[:cell {:colspan 5 :align :center} [:paragraph {:style :bold} bank-name] [:paragraph {:size 8 :leading 8} bank-code]])
[:cell {:colspan 2 :size 13}
check]]

View File

@@ -193,9 +193,14 @@
(defn form-data->map [form-data]
(reduce-kv
(fn [acc k v]
(assoc-in acc (->> (str/split k #"_")
(mapv #(apply keyword (str/split % #"/"))))
v))
(cond (and (string? v)
(empty? v))
acc
:else
(assoc-in acc (->> (str/split k #"_")
(mapv #(apply keyword (str/split % #"/"))))
v)))
{}
form-data))
@@ -212,8 +217,8 @@
@(d/transact conn [(remove-nils
(-> (form-data->map form-params)
(assoc :db/id (Long/parseLong (:vendor-id route-params)))
(update :vendor/legal-entity-1099-type #(some->> % (keyword "legal-entity-1099-type")))
(update :vendor/legal-entity-tin-type #(some->> % (keyword "legal-entity-tin-type")))))]))
(update :vendor/legal-entity-1099-type #(some->> % not-empty (keyword "legal-entity-1099-type")))
(update :vendor/legal-entity-tin-type #(some->> % not-empty (keyword "legal-entity-tin-type")))))]))
(html-response
(table request :flash-id (Long/parseLong (:vendor-id route-params)))))