you can unvoid an invoice.
This commit is contained in:
@@ -188,7 +188,7 @@
|
||||
(when (and on-edit-invoice (not= ":voided" (:status i)))
|
||||
[:button.button {:on-click (fn [] (on-edit-invoice i))} [:span.icon [:i.fa.fa-pencil]]])
|
||||
(when (and on-void-invoice (= (:outstanding-balance i) (:total i)) (not= ":voided" (:status i)))
|
||||
[:button.button.is-warning.is-outlined {:on-click (fn [] (on-void-invoice i))} [:span [:span.icon [:i.fa.fa-minus-circle]]]])
|
||||
[:button.button.is-outlined {:on-click (fn [] (on-void-invoice i))} [:span.icon [:span.icon-bin-2 {:style {:font-weight "400"}}]]])
|
||||
(when (and on-unvoid-invoice (= ":voided" (:status i)))
|
||||
[:button.button.is-outlined {:on-click (fn [] (on-unvoid-invoice i))} [:span [:span.icon [:i.fa.fa-undo]]]])
|
||||
(when (seq payments)
|
||||
|
||||
@@ -12,7 +12,8 @@
|
||||
[auto-ap.events :as events]))
|
||||
|
||||
(defn invoices-side-bar [params & rest]
|
||||
(let [ap @(re-frame/subscribe [::subs/active-page])]
|
||||
(let [ap @(re-frame/subscribe [::subs/active-page])
|
||||
user @(re-frame/subscribe [::subs/user])]
|
||||
[:div
|
||||
[:div [:p.menu-label "Type"]
|
||||
[:ul.menu-list
|
||||
@@ -29,12 +30,20 @@
|
||||
|
||||
[:span {:class "name"} "Paid Invoices"]]]
|
||||
[:li.menu-item
|
||||
[:a.item {:href (bidi/path-for routes/routes :import-invoices)
|
||||
:class [(active-when ap = :import-invoices)]}
|
||||
[:a.item {:href (bidi/path-for routes/routes :voided-invoices)
|
||||
:class [(active-when ap = :voided-invoices)]}
|
||||
|
||||
[:span {:class "icon icon-accounting-document" :style {:font-size "25px"}}]
|
||||
[:span {:class "icon icon-bin-2" :style {:font-size "25px"}}]
|
||||
|
||||
[:span {:class "name"} "Import Invoices"]]]]]
|
||||
[:span {:class "name"} "Voided Invoices"]]]
|
||||
(when (= "admin" (:user/role user))
|
||||
[:li.menu-item
|
||||
[:a.item {:href (bidi/path-for routes/routes :import-invoices)
|
||||
:class [(active-when ap = :import-invoices)]}
|
||||
|
||||
[:span {:class "icon icon-accounting-document" :style {:font-size "25px"}}]
|
||||
|
||||
[:span {:class "name"} "Import Invoices"]]])]]
|
||||
[:div
|
||||
rest]
|
||||
[:div {:class "compose has-text-centered"}
|
||||
|
||||
Reference in New Issue
Block a user