minor fixes.
This commit is contained in:
@@ -518,8 +518,8 @@
|
|||||||
{:filters {:client_id client-id
|
{:filters {:client_id client-id
|
||||||
:location location
|
:location location
|
||||||
:date_range (:date_range input)
|
:date_range (:date_range input)
|
||||||
:from_numeric_code (get-in l-reports/ranges [category 0])
|
:from_numeric_code (l-reports/min-numeric-code category )
|
||||||
:to_numeric_code (get-in l-reports/ranges [category 1])
|
:to_numeric_code (l-reports/max-numeric-code category )
|
||||||
:per_page Integer/MAX_VALUE}}
|
:per_page Integer/MAX_VALUE}}
|
||||||
nil)
|
nil)
|
||||||
:journal_entries
|
:journal_entries
|
||||||
@@ -528,9 +528,7 @@
|
|||||||
(filter (fn [jel]
|
(filter (fn [jel]
|
||||||
(when-let [account (account-lookup (:id (:account jel)))]
|
(when-let [account (account-lookup (:id (:account jel)))]
|
||||||
(and
|
(and
|
||||||
(<= (get-in l-reports/ranges [category 0])
|
(l-reports/account-belongs-in-category? (:numeric-code account) category)
|
||||||
(:numeric_code account)
|
|
||||||
(get-in l-reports/ranges [category 1]))
|
|
||||||
(= location (:location jel)))))
|
(= location (:location jel)))))
|
||||||
)
|
)
|
||||||
(map (fn [jel ]
|
(map (fn [jel ]
|
||||||
|
|||||||
@@ -82,6 +82,16 @@
|
|||||||
["35000-40000 Other" 35000 39999]]
|
["35000-40000 Other" 35000 39999]]
|
||||||
:bottom-line [["11000-12000 Bottom Line" 11000 11999]]})
|
:bottom-line [["11000-12000 Bottom Line" 11000 11999]]})
|
||||||
|
|
||||||
|
(defn min-numeric-code [category]
|
||||||
|
(->> (groupings category)
|
||||||
|
(map second)
|
||||||
|
(apply min)))
|
||||||
|
|
||||||
|
(defn max-numeric-code [category]
|
||||||
|
(->> (groupings category)
|
||||||
|
(map second)
|
||||||
|
(apply max)))
|
||||||
|
|
||||||
|
|
||||||
(def flat-categories
|
(def flat-categories
|
||||||
(for [[category groups] groupings
|
(for [[category groups] groupings
|
||||||
|
|||||||
Reference in New Issue
Block a user