Fix receipt/invoice numbers
This commit is contained in:
parent
ebb3cefeb7
commit
a1b59bc609
2 changed files with 12 additions and 13 deletions
|
@ -56,10 +56,9 @@
|
|||
(str/join \newline errors)))
|
||||
(System/exit 1))
|
||||
(let [data (import/read-csv (:csv options))
|
||||
;; TODO: Renamed receipt meta to invoice
|
||||
imported (concat (import/net-pay date period pay-receipt-no project data)
|
||||
(import/individual-taxes date period pay-receipt-no retirement-invoice-no project data)
|
||||
(import/employer-taxes date period pay-receipt-no project data)
|
||||
imported (concat (import/net-pay date period pay-invoice-no project data)
|
||||
(import/individual-taxes date period pay-invoice-no retirement-invoice-no project data)
|
||||
(import/employer-taxes date period pay-invoice-no project data)
|
||||
(import/net-pay-ach-debit date period pay-receipt-no pay-invoice-no {} data)
|
||||
(import/taxes-ach-debit date period pay-receipt-no pay-invoice-no {} data)
|
||||
(import/fees date period fees-receipt-no fees-invoice-no total-fees project data)
|
||||
|
|
|
@ -134,11 +134,11 @@
|
|||
|
||||
(defn net-pay
|
||||
"Return a net pay transaction."
|
||||
[date period receipt-no projects records]
|
||||
[date period invoice-no projects records]
|
||||
(let [template {:date date :desc (format "Monthly Payroll - %s - Net Pay" period)
|
||||
:meta {:program "Conservancy:Payroll"
|
||||
:project "Conservancy"
|
||||
:invoice receipt-no
|
||||
:invoice invoice-no
|
||||
:approval "Financial/Employment-Records/memo-re-board-approval-of-payroll.txt"
|
||||
:tax-implication "W2"
|
||||
:payroll-type "US:General"}
|
||||
|
@ -164,7 +164,7 @@
|
|||
|
||||
(defn individual-taxes
|
||||
"Return a transaction of expenses/witholding for each employee."
|
||||
[date period receipt-no invoice-no projects records]
|
||||
[date period pay-invoice-no retirement-invoice-no projects records]
|
||||
(for [[name employee-records] (group-by :name records)]
|
||||
(let [template {:date date :desc (format "Monthly Payroll - %s - TAXES - %s" period name)
|
||||
:meta (assoc-project
|
||||
|
@ -172,7 +172,7 @@
|
|||
{:project "Conservancy"
|
||||
:program "Conservancy:Payroll"
|
||||
:entity name
|
||||
:invoice receipt-no
|
||||
:invoice pay-invoice-no
|
||||
:approval "Financial/Employment-Records/memo-re-board-approval-of-payroll.txt"})
|
||||
:postings []}
|
||||
retirement-records (filter #(= (:type %) "Retirement") employee-records)
|
||||
|
@ -188,14 +188,14 @@
|
|||
{:account "Expenses:Payroll:Salary"
|
||||
:amount amount :currency "USD"
|
||||
:meta {:payroll-type "US:403b:Match"
|
||||
:invoice invoice-no}}
|
||||
:invoice retirement-invoice-no}}
|
||||
{:account "Expenses:Payroll:Salary"
|
||||
:amount amount :currency "USD"
|
||||
:meta {:payroll-type "US:403b:Employee"
|
||||
:invoice invoice-no}}))
|
||||
:invoice retirement-invoice-no}}))
|
||||
liability-postings [{:account "Liabilities:Payable:Accounts"
|
||||
:amount (- total-retirement) :currency "USD"
|
||||
:meta {:invoice invoice-no}}]
|
||||
:meta {:invoice retirement-invoice-no}}]
|
||||
withholding-postings (for [{:keys [category amount]} witholding-records]
|
||||
{:account "Expenses:Payroll:Salary"
|
||||
:amount amount :currency "USD"
|
||||
|
@ -220,11 +220,11 @@
|
|||
|
||||
(defn employer-taxes
|
||||
"Return an employer taxes transaction."
|
||||
[date period receipt-no projects records]
|
||||
[date period invoice-no projects records]
|
||||
(let [template {:date date :desc (format "Monthly Payroll - %s - TAXES - Employer" period)
|
||||
:meta {:program "Conservancy:Payroll"
|
||||
:project "Conservancy"
|
||||
:invoice receipt-no
|
||||
:invoice invoice-no
|
||||
:approval "Financial/Employment-Records/memo-re-board-approval-of-payroll.txt"}
|
||||
:postings []}
|
||||
liability-records (filter (fn [{:keys [category type]}]
|
||||
|
|
Loading…
Reference in a new issue