a number of small bug fixes.
This commit is contained in:
@@ -413,8 +413,8 @@
|
||||
(map ->graphql ))
|
||||
:total checks-count
|
||||
:count (count payments)
|
||||
:start (:start args 0)
|
||||
:end (+ (:start args 0) (count payments))}]))
|
||||
:start (-> args :filters (:start 0) )
|
||||
:end (+ (-> args :filters (:start 0) ) (count payments))}]))
|
||||
|
||||
(defn get-potential-payments [context args _]
|
||||
(let [transaction (d-transactions/get-by-id (:transaction_id args))
|
||||
|
||||
@@ -42,8 +42,8 @@
|
||||
:total_amount total-amount
|
||||
:total invoice-count
|
||||
:count (count invoices)
|
||||
:start (:start args 0)
|
||||
:end (+ (:start args 0) (count invoices))}]))
|
||||
:start (-> args :filters (:start 0))
|
||||
:end (+ (-> args :filters (:start 0)) (count invoices))}]))
|
||||
|
||||
(defn get-all-invoices [context args _]
|
||||
(assert-admin (:id context))
|
||||
|
||||
@@ -348,8 +348,7 @@
|
||||
[:table.table.compact.balance-sheet
|
||||
[:tr
|
||||
[:td.has-text-right "Period ending"]
|
||||
(when (:include-comparison params)
|
||||
[:td.has-text-right (date->str (str->date (:date params) standard))])
|
||||
[:td.has-text-right (date->str (str->date (:date params) standard))]
|
||||
(when (:include-comparison params)
|
||||
[:td.has-text-right (when (:date params)
|
||||
(date->str (str->date (:comparison-date params) standard)))])
|
||||
|
||||
@@ -812,6 +812,16 @@
|
||||
(local-today)])
|
||||
[:selected-period] "Year to date"])}
|
||||
"Year to date"]]
|
||||
[:div.control
|
||||
[:a.button
|
||||
{:class (when (= selected-period "Full year") "is-active")
|
||||
:on-click (dispatch-event
|
||||
[::forms/change ::form
|
||||
[:periods]
|
||||
[[(t/local-date (dec (t/year (local-today))) 1 1)
|
||||
(t/local-date (dec (t/year (local-today))) 12 31)]]
|
||||
[:selected-period] "Last Calendar year"])}
|
||||
"Last calendar year"]]
|
||||
[:div.control
|
||||
[:a.button
|
||||
{:class (when (= selected-period "Full year") "is-active")
|
||||
@@ -864,8 +874,7 @@
|
||||
|
||||
|
||||
(defn profit-and-loss-content []
|
||||
(let [user @(re-frame/subscribe [::subs/user])
|
||||
status @(re-frame/subscribe [::status/single ::page])
|
||||
(let [status @(re-frame/subscribe [::status/single ::page])
|
||||
unresolved-accounts @(re-frame/subscribe [::uncategorized-accounts])
|
||||
{:keys [data report active? error id]} @(re-frame/subscribe [::forms/form ::form])
|
||||
{:keys [form-inline field raw-field error-notification submit-button ]} pnl-form
|
||||
|
||||
@@ -34,14 +34,14 @@
|
||||
|
||||
(re-frame/reg-event-db
|
||||
::payment-voided
|
||||
(fn [db [_ {:keys [void-payment]}]]
|
||||
(fn [db [_ _]]
|
||||
db))
|
||||
|
||||
(defn row [{check :check
|
||||
selected-client :selected-client
|
||||
states :states
|
||||
}]
|
||||
(let [{:keys [client s3-url bank-account payments type check-number date amount id vendor status invoices transaction] :as check} check]
|
||||
(let [{:keys [client s3-url bank-account type check-number date amount id vendor status invoices transaction] :as check} check]
|
||||
[grid/row {:class (:class check) :id id :entity check}
|
||||
(when-not selected-client
|
||||
[grid/cell {} (:name client)])
|
||||
|
||||
Reference in New Issue
Block a user