From 15283f267966ac595e43176b7ed409665526ea04 Mon Sep 17 00:00:00 2001 From: Bryce Covert Date: Sat, 12 Jun 2021 07:51:49 -0700 Subject: [PATCH] only include adjustments --- hours.txt | 3 +++ src/clj/auto_ap/square/core.clj | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/hours.txt b/hours.txt index b8191082..056760b8 100644 --- a/hours.txt +++ b/hours.txt @@ -2,3 +2,6 @@ 5/25/2021 3 hours 6/1/2021 0.5 hours +6/5/2021 2 hours +6/6/2021 2 hours +6/11/2021 2 hours diff --git a/src/clj/auto_ap/square/core.clj b/src/clj/auto_ap/square/core.clj index 31239e9c..9bab40b9 100644 --- a/src/clj/auto_ap/square/core.clj +++ b/src/clj/auto_ap/square/core.clj @@ -257,7 +257,9 @@ #:sales-refund {:external-id (str "square/refund/" (:id r)) :total (amount->money (:amount_money r)) :fee (transduce - (comp (map :amount_money) (map amount->money)) + (comp (filter #(= "ADJUSTMENT" (:type %))) + (map :amount_money) + (map amount->money)) + 0.0 (:processing_fee r))