tracking companies by id
This commit is contained in:
@@ -19,10 +19,10 @@
|
||||
|
||||
(defn get-unpaid [company]
|
||||
(if company
|
||||
(map db->clj (j/query (get-conn) ["SELECT * FROM invoices WHERE imported=true AND company = ?" company]))
|
||||
(map db->clj (j/query (get-conn) ["SELECT * FROM invoices WHERE imported=true AND company_id = ?" (Integer/parseInt company)]))
|
||||
(map db->clj (j/query (get-conn) "SELECT * FROM invoices WHERE imported=true"))))
|
||||
|
||||
(defn get-pending [company]
|
||||
(if company
|
||||
(map db->clj (j/query (get-conn) ["SELECT * FROM invoices WHERE (imported=false or imported is null) AND company = ?" company]))
|
||||
(map db->clj (j/query (get-conn) ["SELECT * FROM invoices WHERE (imported=false or imported is null) AND company_id = ?" (Integer/parseInt company)]))
|
||||
(map db->clj (j/query (get-conn) "SELECT * FROM invoices WHERE imported=false or imported is null"))))
|
||||
|
||||
Reference in New Issue
Block a user