idea for cash flow linkage. makes invoices use uri parameters.
This commit is contained in:
@@ -394,6 +394,7 @@
|
||||
:invoice_page {:type '(list :invoice_page)
|
||||
:args {:import_status {:type 'String}
|
||||
:date_range {:type :date_range}
|
||||
:due_range {:type :date_range}
|
||||
:status {:type :invoice_status}
|
||||
:client_id {:type :id}
|
||||
:vendor_id {:type :id}
|
||||
@@ -871,11 +872,10 @@
|
||||
true (merge-query {:query {:where ['[?i :invoice/client ?c]
|
||||
'[?i :invoice/outstanding-balance ?outstanding-balance]
|
||||
'[?i :invoice/total ?total]
|
||||
'[?i :invoice/date ?date]
|
||||
'[?i :invoice/due ?date]
|
||||
'[(.toInstant ^java.util.Date ?date) ?d2]
|
||||
'[(.between java.time.temporal.ChronoUnit/DAYS (java.time.Instant/now) ?d2 ) ?d3]
|
||||
'[(+ 30 ?d3) ?d4]
|
||||
'[(auto-ap.graphql/categorize ?d4) ?name]]}})
|
||||
'[(auto-ap.graphql/categorize ?d3) ?name]]}})
|
||||
|
||||
true (d/query ))
|
||||
result (group-by first result)]
|
||||
|
||||
Reference in New Issue
Block a user