From 312b365e6514de34750ee1278a69c8d8d3f619b8 Mon Sep 17 00:00:00 2001 From: Bryce Date: Mon, 21 Aug 2023 10:36:48 -0700 Subject: [PATCH] ezcater xls fixes --- src/clj/auto_ap/routes/exports.clj | 2 -- src/clj/auto_ap/routes/ezcater_xls.clj | 3 ++- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/clj/auto_ap/routes/exports.clj b/src/clj/auto_ap/routes/exports.clj index 4474713d..02e34c85 100644 --- a/src/clj/auto_ap/routes/exports.clj +++ b/src/clj/auto_ap/routes/exports.clj @@ -428,14 +428,12 @@ :selector [:db/id :journal-entry-line/debit :journal-entry-line/location :journal-entry-line/credit {:journal-entry-line/account [:db/id {:account/type [:db/ident]}]} :journal-entry-line/client+account+location+date] :start [:journal-entry-line/client+account+location+date [client]]}) - (take 100) (take-while (fn [jel] (let [[c _ _ _] (:journal-entry-line/client+account+location+date jel)] (= c client)))) (filter (fn [jel] (let [[_ _ _ d] (:journal-entry-line/client+account+location+date jel)] (<= (compare (or d #inst "2000-01-01") as-of) 0)))) - (into []) (reduce (fn [acc jel] (update acc [(:db/id (:journal-entry-line/account jel)) (:journal-entry-line/location jel)] diff --git a/src/clj/auto_ap/routes/ezcater_xls.clj b/src/clj/auto_ap/routes/ezcater_xls.clj index bc15a96e..fc2253da 100644 --- a/src/clj/auto_ap/routes/ezcater_xls.clj +++ b/src/clj/auto_ap/routes/ezcater_xls.clj @@ -79,7 +79,8 @@ :external-id (str "ezcater/charge/" client-id "-" location "-" order-number "-" 0) :processor :ccp-processor/ezcater :total (fmt-amount (+ food-total - tax)) + tax + tip)) :tip (fmt-amount tip)}] :total (fmt-amount (+ food-total tax