Fix entitity name

This commit is contained in:
Ben Sturmfels 2024-02-22 14:18:21 +11:00
parent 90adaf3de0
commit 72f2c60ca0
Signed by: bsturmfels
GPG key ID: 023C05E2C9C068F0

View file

@ -224,7 +224,7 @@
(let [ungrouped (apply concat (vals groups)) ; Grouping by employee not useful here (let [ungrouped (apply concat (vals groups)) ; Grouping by employee not useful here
liability-lines (filter #(and (= (:type %) "Liability") liability-lines (filter #(and (= (:type %) "Liability")
(not (str/includes? (:category %) "Unemploy"))) ungrouped) (not (str/includes? (:category %) "Unemploy"))) ungrouped)
liability-postings (for [{:keys [name category amount]} liability-lines] liability-postings (for [{:keys [amount name category]} liability-lines]
{:account "Expenses:Payroll:Tax" {:account "Expenses:Payroll:Tax"
:amount amount :amount amount
:currency "USD" :currency "USD"
@ -236,7 +236,7 @@
total-liabilities (->> liability-postings (map :amount) (reduce +)) total-liabilities (->> liability-postings (map :amount) (reduce +))
unemploy-lines (filter #(and (= (:type %) "Liability") unemploy-lines (filter #(and (= (:type %) "Liability")
(str/includes? (:category %) "Unemploy")) ungrouped) (str/includes? (:category %) "Unemploy")) ungrouped)
unemploy-postings (for [{:keys [amount category]} unemploy-lines] unemploy-postings (for [{:keys [amount name category]} unemploy-lines]
{:account "Expenses:Payroll:Tax" {:account "Expenses:Payroll:Tax"
:amount amount :amount amount
:currency "USD" :currency "USD"