Hovering fix
This commit is contained in:
@@ -3,7 +3,8 @@
|
||||
[auto-ap.graphql.utils :refer [->graphql limited-clients]]
|
||||
[auto-ap.datomic :refer [merge-query apply-sort-2 apply-sort apply-pagination add-sorter-field]]
|
||||
[auto-ap.datomic :refer [uri]]
|
||||
[clj-time.coerce :as c]))
|
||||
[clj-time.coerce :as c]
|
||||
[clj-time.core :as time]))
|
||||
|
||||
(defn sort-fn [sort-by]
|
||||
(cond
|
||||
@@ -50,7 +51,7 @@
|
||||
(merge-query {:query {:in ['?from-date]
|
||||
:where ['[?e :journal-entry/date ?d]
|
||||
'[(>= ?d ?from-date)]]}
|
||||
:args [(c/to-date (:from-date args))]})
|
||||
:args [(c/to-date (time/minus (:from-date args) (time/days 1)))]})
|
||||
|
||||
(:from-numeric-code args)
|
||||
(merge-query {:query {:in ['?from-numeric-code]
|
||||
|
||||
@@ -103,6 +103,7 @@
|
||||
(defn get-profit-and-loss [context args value]
|
||||
(let [args (assoc args :id (:id context))
|
||||
pnl (fn [from-date to-date]
|
||||
(println from-date to-date)
|
||||
(let [[starting-results] (l/get-graphql {:client-id (:client_id args)
|
||||
:to-date from-date
|
||||
:count Integer/MAX_VALUE})
|
||||
@@ -119,7 +120,7 @@
|
||||
[]
|
||||
ending-accounts)))]
|
||||
(->graphql
|
||||
{:balance-sheet-accounts (pnl (coerce/to-date (:from_date args))
|
||||
{:balance-sheet-accounts (pnl (coerce/to-date (time/minus (:from_date args) (time/days 1)))
|
||||
(coerce/to-date (:to_date args)))
|
||||
:comparable-balance-sheet-accounts (pnl (coerce/to-date (coerce/to-date (time/minus (coerce/to-date-time (:from_date args)) (time/years 1))))
|
||||
(coerce/to-date (coerce/to-date (time/minus (coerce/to-date-time (:to_date args)) (time/years 1)))))})))
|
||||
|
||||
@@ -160,7 +160,8 @@
|
||||
|
||||
|
||||
(not include-coded?)
|
||||
(merge-query {:query {:where ['[?e :transaction/approval-status :transaction-approval-status/unapproved]]}})
|
||||
(merge-query {:query {:where ['[or [?e :transaction/approval-status :transaction-approval-status/unapproved]
|
||||
[(missing? $ ?e :transaction/approval-status)]]]}})
|
||||
|
||||
true
|
||||
(merge-query {:query {:where ['[?e :transaction/id]]}})))
|
||||
|
||||
Reference in New Issue
Block a user