cash flows

This commit is contained in:
2024-10-26 00:20:10 -07:00
parent 864ecec1b2
commit 7ee99b3542
11 changed files with 200 additions and 243 deletions

View File

@@ -89,7 +89,7 @@
(let [selected (cond
(#{::invoice-route/all-page ::invoice-route/unpaid-page ::invoice-route/voided-page ::invoice-route/paid-page ::oi-routes/new ::invoice-route/import-page :invoice-glimpse :invoice-glimpse-textract-invoice} (:matched-route request))
"invoices"
(#{:pos-sales :pos-expected-deposits :pos-tenders :pos-refunds :pos-cash-drawer-shifts} (:matched-route request))
"sales"
(#{::payment-routes/all-page ::payment-routes/pending-page ::payment-routes/cleared-page ::payment-routes/voided-page} (:matched-route request))
@@ -152,15 +152,15 @@
#_(when (can? (:identity request)
{:subject :invoice
:activity :import})
(menu-button- {:href (hu/url (bidi/path-for ssr-routes/only-routes
:invoice-glimpse))
:active? (= :invoice-glimpse (:matched-route request))
:hx-boost "true"}
[:div.flex.gap-2
"Glimpse"
(tags/pill- {:color :secondary} "Beta")]))
{:subject :invoice
:activity :import})
(menu-button- {:href (hu/url (bidi/path-for ssr-routes/only-routes
:invoice-glimpse))
:active? (= :invoice-glimpse (:matched-route request))
:hx-boost "true"}
[:div.flex.gap-2
"Glimpse"
(tags/pill- {:color :secondary} "Beta")]))
(when (can? (:identity request)
@@ -303,8 +303,20 @@
:profit-and-loss-detail)} "Profit & Loss Detail")
(menu-button- {:href (bidi/path-for client-routes/routes
:cash-flows)} "Cash Flows")
(if (is-admin? (:identity request))
(if (is-admin? (:identity request))
(menu-button- {:href (hu/url (bidi/path-for ssr-routes/only-routes
::ledger-routes/cash-flows))
:active? (= ::ledger-routes/balance-sheet (:matched-route request))
:hx-boost "true"}
[:div.flex.gap-2
"Cash flows"
(tags/pill- {:color :secondary} "WIP")])
(menu-button- {:href (bidi/path-for client-routes/routes
:cash-flows)} "Cash flows"))
(when (is-admin? (:identity request))
(menu-button- {:href (bidi/path-for client-routes/routes
:cash-flows)} "Old Cash flows"))
(if (is-admin? (:identity request))
(menu-button- {:href (hu/url (bidi/path-for ssr-routes/only-routes
::ledger-routes/balance-sheet))
:active? (= ::ledger-routes/balance-sheet (:matched-route request))
@@ -313,16 +325,15 @@
"Balance Sheet"
(tags/pill- {:color :secondary} "WIP")])
(menu-button- {:href (bidi/path-for client-routes/routes
:balance-sheet)} "Balance Sheet"))
(when (is-admin? (:identity request))
:balance-sheet)} "Balance Sheet"))
(when (is-admin? (:identity request))
(menu-button- {:href (bidi/path-for client-routes/routes
:balance-sheet)} "Old Balance Sheet"))
:balance-sheet)} "Old Balance Sheet"))
(when (can? (:identity request)
{:subject :ledger
:activity :import})
(menu-button- {:href (bidi/path-for client-routes/routes
:external-import-ledger)} "External Ledger Import"))
(when (is-admin? (:identity request))
(menu-button- {:href (hu/url (bidi/path-for ssr-routes/only-routes
::ledger-routes/external-import-page)