more check tweaks, adding real cbc accounts, export supports all transactions, fixed date parsing.
This commit is contained in:
@@ -36,7 +36,7 @@
|
||||
(defn make-check-pdf [check]
|
||||
(let [output-stream (ByteArrayOutputStream.)]
|
||||
(pdf/pdf
|
||||
[{:left-margin 17 :right-margin 0 :top-margin 0 :bottom-margin 0 :size :letter}
|
||||
[{:left-margin 25 :right-margin 0 :top-margin 0 :bottom-margin 0 :size :letter}
|
||||
(let [{:keys [paid-to company check date amount memo] {print-as :print-as vendor-name :name :as vendor} :vendor} check
|
||||
df (DecimalFormat. "#,###.00")
|
||||
word-amount (num->words amount)
|
||||
@@ -74,7 +74,7 @@
|
||||
|
||||
[[:cell {:colspan 12 :leading 50} [:spacer]]]
|
||||
|
||||
[[:cell "MEMO"]
|
||||
[[:cell {:size 9 } "MEMO"]
|
||||
[:cell {:colspan 5} memo [:line {:line-width 0.15 :color [50 50 50]}]]
|
||||
[:cell {:colspan 6}]]
|
||||
|
||||
@@ -82,7 +82,7 @@
|
||||
[:cell {:colspan 10 :leading 30}
|
||||
[:phrase {:size 18 :ttf-name "public/micrenc.ttf"} (str "c" check "c a" (:acct-number (:bank company)) "a 10302c")]]]
|
||||
|
||||
[[:cell {:colspan 12 :leading 42} [:spacer]]]
|
||||
[[:cell {:colspan 12 :leading 18} [:spacer]]]
|
||||
|
||||
[[:cell]
|
||||
(into
|
||||
@@ -97,7 +97,7 @@
|
||||
[:cell {:colspan 2 :size 13}
|
||||
check]]
|
||||
|
||||
[[:cell {:colspan 12 :leading 62} [:spacer]]]
|
||||
[[:cell {:colspan 12 :leading 74} [:spacer]]]
|
||||
|
||||
[[:cell]
|
||||
[:cell {:colspan 5} [:paragraph
|
||||
@@ -120,6 +120,7 @@
|
||||
[[:cell {:colspan 12} [:spacer]]]
|
||||
[[:cell {:colspan 12} [:spacer]]]
|
||||
[[:cell {:colspan 12} [:spacer]]]
|
||||
[[:cell {:colspan 12} [:spacer]]]
|
||||
|
||||
[[:cell {:colspan 5}]
|
||||
[:cell {:align :right :colspan 2}
|
||||
|
||||
@@ -56,7 +56,8 @@
|
||||
(vendors/get-all))
|
||||
(GET "/transactions/export" {:keys [query-params identity]}
|
||||
(assert-admin identity)
|
||||
(let [transactions (transactions/get-graphql {:company (query-params "company")})]
|
||||
(let [transactions (transactions/get-graphql {:company (query-params "company")
|
||||
:limit Integer/MAX_VALUE})]
|
||||
(map (fn [i]
|
||||
(-> i
|
||||
(update :date to-date)
|
||||
|
||||
@@ -96,8 +96,9 @@
|
||||
|
||||
raw-transactions (vec (->> rows
|
||||
(filter #(not (seq (:errors %))) )
|
||||
(map (fn [{:keys [description-original status high-level-category amount account-id]}]
|
||||
(map (fn [{:keys [description-original status high-level-category amount account-id date]}]
|
||||
{:description-original description-original
|
||||
:date date
|
||||
:status status
|
||||
:high-level-category high-level-category
|
||||
:amount amount
|
||||
|
||||
Reference in New Issue
Block a user