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