fixes client bug when investigating
This commit is contained in:
@@ -658,6 +658,7 @@
|
|||||||
invoice (d/entity db invoice-id)
|
invoice (d/entity db invoice-id)
|
||||||
current-total (:invoice/total invoice)
|
current-total (:invoice/total invoice)
|
||||||
target-total (invoice-totals invoice-id) ;; TODO should include expense accounts not visible
|
target-total (invoice-totals invoice-id) ;; TODO should include expense accounts not visible
|
||||||
|
_ (println current-total target-total)
|
||||||
new-account? (not (boolean (or (some-> invoice-expense-account-id not-empty Long/parseLong)
|
new-account? (not (boolean (or (some-> invoice-expense-account-id not-empty Long/parseLong)
|
||||||
(:db/id (first (:invoice/expense-accounts invoice))))))
|
(:db/id (first (:invoice/expense-accounts invoice))))))
|
||||||
|
|
||||||
@@ -685,7 +686,8 @@
|
|||||||
[?ip :invoice-payment/amount ?a]
|
[?ip :invoice-payment/amount ?a]
|
||||||
[?ip :invoice-payment/payment ?p]
|
[?ip :invoice-payment/payment ?p]
|
||||||
]
|
]
|
||||||
db invoice-id))]]
|
db invoice-id))]
|
||||||
|
:when current-total]
|
||||||
|
|
||||||
[
|
[
|
||||||
(when (not (auto-ap.utils/dollars= current-total target-total))
|
(when (not (auto-ap.utils/dollars= current-total target-total))
|
||||||
|
|||||||
@@ -231,13 +231,13 @@
|
|||||||
)))
|
)))
|
||||||
|
|
||||||
|
|
||||||
(defn data-params->query-params [params]
|
(defn data-params->query-params [params client-id]
|
||||||
(when params
|
(when params
|
||||||
{:start (:start params 0)
|
{:start (:start params 0)
|
||||||
:sort (:sort params)
|
:sort (:sort params)
|
||||||
:per-page (:per-page params)
|
:per-page (:per-page params)
|
||||||
:vendor-id (:id (:vendor params))
|
:vendor-id (:id (:vendor params))
|
||||||
:client-id (:client-id params )
|
:client-id client-id
|
||||||
:from-numeric-code (:from-numeric-code params)
|
:from-numeric-code (:from-numeric-code params)
|
||||||
:to-numeric-code (:to-numeric-code params)
|
:to-numeric-code (:to-numeric-code params)
|
||||||
:location (:location params)
|
:location (:location params)
|
||||||
@@ -252,7 +252,11 @@
|
|||||||
{:graphql {:token user
|
{:graphql {:token user
|
||||||
:owns-state {:single [::data-page/page ::ledger]}
|
:owns-state {:single [::data-page/page ::ledger]}
|
||||||
:query-obj {:venia/queries [[:ledger-page
|
:query-obj {:venia/queries [[:ledger-page
|
||||||
{:filters (data-params->query-params ledger-params)}
|
{:filters (data-params->query-params ledger-params
|
||||||
|
(->> (get-in db [::forms/forms ::form :data])
|
||||||
|
:clients
|
||||||
|
first
|
||||||
|
:id ))}
|
||||||
[[:journal-entries [:id
|
[[:journal-entries [:id
|
||||||
:source
|
:source
|
||||||
:original-entity
|
:original-entity
|
||||||
|
|||||||
Reference in New Issue
Block a user