Commit 1425fade authored by phil's avatar phil

add deferral feature to expenses

parent 778d2c0d
......@@ -79,6 +79,14 @@
(assoc* evt :description-with-addendum)))
(defn add-deferral [evt]
(assoc* evt :deferral
(if-let [invoice-date (-> evt :invoice-date)]
(not= (-> evt :date .getFullYear)
(-> invoice-date .getFullYear))
false)))
(defmethod transform :expense [_ evt]
(-> evt
(common/validate! ::event)
......@@ -86,6 +94,7 @@
add-respect-tax-rate
add-respect-tax-amount
tax/add-period
add-deferral
add-description-with-addendum
(assoc* :ledger-template
(get-in @config [:templates :ledger :expense]))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment