diff --git a/src/clj/auto_ap/routes/exports.clj b/src/clj/auto_ap/routes/exports.clj index 61a9178a..309fe274 100644 --- a/src/clj/auto_ap/routes/exports.clj +++ b/src/clj/auto_ap/routes/exports.clj @@ -463,7 +463,11 @@ (into (list) (apply dc/q (read-string (get query-params "query" )) (into [(dc/db conn)] (read-string (get query-params "args" "[]")))))})) (defn export-ntg-account-snapshot [_] - (let [clients (pull-many (dc/db conn) '[:db/id :client/code :client/locations] [[:client/code "NGAK"] [:client/code "NGOP"] [:client/code "NGRV"] [:client/code "NGE1"]]) + (let [clients (->> (dc/q '[:find (pull ?e [:db/id :client/code :client/locations]) + :in $ + :where [?e :client/feature-flags "include-in-ntg-corp-reports"]] + (dc/db conn)) + (map first)) account->numeric-code (into {} (seq (dc/q '[:find ?i ?n :in $ [?a ...] :where [?i ?a ?n]] diff --git a/src/cljs/auto_ap/views/pages/admin/clients/form.cljs b/src/cljs/auto_ap/views/pages/admin/clients/form.cljs index 180c4afd..6e3c11c2 100644 --- a/src/cljs/auto_ap/views/pages/admin/clients/form.cljs +++ b/src/cljs/auto_ap/views/pages/admin/clients/form.cljs @@ -551,7 +551,8 @@ :template [[form-builder/raw-field-v2 {:field :feature-flag} [com/select-field {:options [[nil nil] ["new-square" "New Square+Ezcater"] - ["manually-pay-cintas" "Manually Pay Cintas"]] + ["manually-pay-cintas" "Manually Pay Cintas"] + ["include-in-ntg-corp-reports" "Include in NTG Corporate reports"]] :allow-nil? false :style {:width "18em"}}]]] :key-fn :id @@ -563,13 +564,13 @@ [com/multi-field-v2 {:allow-change? false :template [[form-builder/raw-field-v2 {:field :location} [:input.input {:max-length 2 - :style { :width "4em"}}]]] + :style {:width "4em"}}]]] :disable-remove? true :key-fn :id :schema [:sequential location-schema] :next-key (random-uuid)}]] - [form-builder/vertical-control + [form-builder/vertical-control "Signature" [signature {:signature-file (:signature-file new-client) :signature-data (:signature-data new-client)