payments should load again.
This commit is contained in:
@@ -84,8 +84,7 @@
|
|||||||
|
|
||||||
[[:cell {:colspan 9}]
|
[[:cell {:colspan 9}]
|
||||||
[:cell {:colspan 3 :leading -10} date]]
|
[:cell {:colspan 3 :leading -10} date]]
|
||||||
[[:cell {:colspan 12 :size 14}]
|
[[:cell {:colspan 12 :size 14}]]
|
||||||
]
|
|
||||||
|
|
||||||
[[:cell {:size 13 :leading 13} "PAY"]
|
[[:cell {:size 13 :leading 13} "PAY"]
|
||||||
[:cell {:size 8 :leading 8} "TO THE ORDER OF"]
|
[:cell {:size 8 :leading 8} "TO THE ORDER OF"]
|
||||||
@@ -113,8 +112,7 @@
|
|||||||
(:client/signature-file client)]
|
(:client/signature-file client)]
|
||||||
[:spacer])]]
|
[:spacer])]]
|
||||||
|
|
||||||
#_[
|
#_[#_[:cell {:colspan 5} #_memo]
|
||||||
#_[:cell {:colspan 5} #_memo ]
|
|
||||||
#_[:cell {:colspan 6}]]
|
#_[:cell {:colspan 6}]]
|
||||||
|
|
||||||
[[:cell {:colspan 2}]
|
[[:cell {:colspan 2}]
|
||||||
@@ -143,8 +141,7 @@
|
|||||||
" " vendor-name "\n"
|
" " vendor-name "\n"
|
||||||
" " (:address/street1 (:vendor/address vendor)) "\n"
|
" " (:address/street1 (:vendor/address vendor)) "\n"
|
||||||
(when (not (str/blank? (:address/street2 (:vendor/address vendor))))
|
(when (not (str/blank? (:address/street2 (:vendor/address vendor))))
|
||||||
(str " " (:address/street2 (:vendor/address vendor)) "\n")
|
(str " " (:address/street2 (:vendor/address vendor)) "\n"))
|
||||||
)
|
|
||||||
" " (:address/city (:vendor/address vendor)) ", " (:address/state (:vendor/address vendor)) " " (:address/zip (:vendor/address vendor))]]
|
" " (:address/city (:vendor/address vendor)) ", " (:address/state (:vendor/address vendor)) " " (:address/zip (:vendor/address vendor))]]
|
||||||
[:cell {:align :right}
|
[:cell {:align :right}
|
||||||
"Paid to:\n"
|
"Paid to:\n"
|
||||||
@@ -183,8 +180,7 @@
|
|||||||
[:paragraph amount]
|
[:paragraph amount]
|
||||||
[:paragraph date]]]
|
[:paragraph date]]]
|
||||||
[[:cell {:colspan 3} "Memo:"]
|
[[:cell {:colspan 3} "Memo:"]
|
||||||
[:cell {:colspan 9} memo]]
|
[:cell {:colspan 9} memo]]])]
|
||||||
])]
|
|
||||||
output-stream)
|
output-stream)
|
||||||
(.toByteArray output-stream)))
|
(.toByteArray output-stream)))
|
||||||
|
|
||||||
@@ -197,8 +193,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
make-check-pdf
|
make-check-pdf)]
|
||||||
)]
|
|
||||||
(s3/put-object :bucket-name (:data-bucket env)
|
(s3/put-object :bucket-name (:data-bucket env)
|
||||||
:key (:payment/s3-key check)
|
:key (:payment/s3-key check)
|
||||||
:input-stream (io/make-input-stream check-bytes {})
|
:input-stream (io/make-input-stream check-bytes {})
|
||||||
@@ -313,8 +308,7 @@
|
|||||||
(reduce + 0.0))
|
(reduce + 0.0))
|
||||||
0.001)
|
0.001)
|
||||||
(throw (ex-info "The selected invoices do not have an outstanding balance."
|
(throw (ex-info "The selected invoices do not have an outstanding balance."
|
||||||
{:validation-error "The selected invoices do not have an outstanding balance."})))
|
{:validation-error "The selected invoices do not have an outstanding balance."}))))
|
||||||
)
|
|
||||||
|
|
||||||
(defmethod invoices->entities :payment-type/credit [invoices vendor client bank-account type index invoice-amounts]
|
(defmethod invoices->entities :payment-type/credit [invoices vendor client bank-account type index invoice-amounts]
|
||||||
(when (>= (->> invoices
|
(when (>= (->> invoices
|
||||||
@@ -380,8 +374,7 @@
|
|||||||
(throw (ex-info "You can't pay for that invoice from this bank account."
|
(throw (ex-info "You can't pay for that invoice from this bank account."
|
||||||
{:validation-error "You can't pay for that invoice from this bank account."
|
{:validation-error "You can't pay for that invoice from this bank account."
|
||||||
:client-id client-id
|
:client-id client-id
|
||||||
:invoices (map :invoice/invoice-number invoices)}))
|
:invoices (map :invoice/invoice-number invoices)})))
|
||||||
)
|
|
||||||
(when-not (= client-id (:db/id (:client/_bank-accounts bank-account)))
|
(when-not (= client-id (:db/id (:client/_bank-accounts bank-account)))
|
||||||
(throw (ex-info "The selected bank doesn't belong to this client"
|
(throw (ex-info "The selected bank doesn't belong to this client"
|
||||||
{:validation-error "The selected bank doesn't belong to this client"
|
{:validation-error "The selected bank doesn't belong to this client"
|
||||||
@@ -534,8 +527,7 @@
|
|||||||
[?p :payment/client ?c]
|
[?p :payment/client ?c]
|
||||||
[(get-else $ ?c :client/locked-until #inst "2000-01-01") ?lu]
|
[(get-else $ ?c :client/locked-until #inst "2000-01-01") ?lu]
|
||||||
[?p :payment/date ?d]
|
[?p :payment/date ?d]
|
||||||
[(>= ?d ?lu)]
|
[(>= ?d ?lu)]]
|
||||||
]
|
|
||||||
(dc/db conn))
|
(dc/db conn))
|
||||||
(map first)
|
(map first)
|
||||||
(mapcat (fn [{:keys [:db/id]
|
(mapcat (fn [{:keys [:db/id]
|
||||||
@@ -580,7 +572,8 @@
|
|||||||
(assert-admin (:id context))
|
(assert-admin (:id context))
|
||||||
(map
|
(map
|
||||||
->graphql
|
->graphql
|
||||||
(first (d-checks/get-graphql (assoc (<-graphql args) :count Integer/MAX_VALUE)))))
|
(first (d-checks/get-graphql (assoc (<-graphql (assoc args :clients (:clients context))) :count Integer/MAX_VALUE)))))
|
||||||
|
|
||||||
|
|
||||||
(defn print-checks [context args _]
|
(defn print-checks [context args _]
|
||||||
(assert-can-see-client (:id context) (:client_id args))
|
(assert-can-see-client (:id context) (:client_id args))
|
||||||
|
|||||||
12
src/clj/auto_ap/routes/exports.fiddle
Normal file
12
src/clj/auto_ap/routes/exports.fiddle
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
|
||||||
|
(let [query [[:all_payments
|
||||||
|
{:client-code "VS"
|
||||||
|
:original-id nil}
|
||||||
|
[:id :check-number :amount :memo :date :status :type :original-id
|
||||||
|
[:invoices [[:invoice [:id :original-id]] :amount]]
|
||||||
|
[:bank-account [:number :code :bank-name :bank-code :id]]
|
||||||
|
[:vendor [:name :id [:primary-contact [:name :email :phone]] [:default-account [:name :numeric-code :id]] [:address [:street1 :city :state :zip]]]]
|
||||||
|
[:client [:id :name :code]]]]]
|
||||||
|
payments (auto-ap.graphql/query {:user/role "admin"} (venia/graphql-query {:venia/queries (->graphql query)}))]
|
||||||
|
{:body
|
||||||
|
(list (:all-payments (:data payments)))})
|
||||||
Reference in New Issue
Block a user