Adds the ability to do a column per location
This commit is contained in:
@@ -192,6 +192,9 @@
|
||||
(throw (ex-info "Please select a client." {:validation-error "Please select a client."})))
|
||||
_ (doseq [client-id client-ids]
|
||||
(assert-can-see-client (:id context) client-id))
|
||||
_ (when (and (:include_deltas args)
|
||||
(:column_per_location args))
|
||||
(throw (ex-info "Please select one of 'Include deltas' or 'Column per location'" {:validation-error "Please select one of 'Include deltas' or 'Column per location'"})))
|
||||
all-ledger-entries (->> client-ids
|
||||
(map (fn [client-id]
|
||||
[client-id (full-ledger-for-client client-id)]))
|
||||
@@ -584,14 +587,16 @@
|
||||
:args {:client_id {:type :id}
|
||||
:client_ids {:type '(list :id)}
|
||||
:periods {:type '(list :date_range)}
|
||||
:include_deltas {:type 'Boolean}}
|
||||
:include_deltas {:type 'Boolean}
|
||||
:column_per_location {:type 'Boolean}}
|
||||
:resolve :get-profit-and-loss}
|
||||
|
||||
:profit_and_loss_pdf {:type :report_pdf
|
||||
:args {:client_id {:type :id}
|
||||
:client_ids {:type '(list :id)}
|
||||
:periods {:type '(list :date_range)}
|
||||
:include_deltas {:type 'Boolean}}
|
||||
:include_deltas {:type 'Boolean}
|
||||
:column_per_location {:type 'Boolean}}
|
||||
:resolve :profit-and-loss-pdf}
|
||||
|
||||
:balance_sheet_pdf {:type :report_pdf
|
||||
|
||||
Reference in New Issue
Block a user