ezcater xls fixes
This commit is contained in:
@@ -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]
|
: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
|
:start [:journal-entry-line/client+account+location+date
|
||||||
[client]]})
|
[client]]})
|
||||||
(take 100)
|
|
||||||
(take-while (fn [jel]
|
(take-while (fn [jel]
|
||||||
(let [[c _ _ _] (:journal-entry-line/client+account+location+date jel)]
|
(let [[c _ _ _] (:journal-entry-line/client+account+location+date jel)]
|
||||||
(= c client))))
|
(= c client))))
|
||||||
(filter (fn [jel]
|
(filter (fn [jel]
|
||||||
(let [[_ _ _ d] (:journal-entry-line/client+account+location+date jel)]
|
(let [[_ _ _ d] (:journal-entry-line/client+account+location+date jel)]
|
||||||
(<= (compare (or d #inst "2000-01-01") as-of) 0))))
|
(<= (compare (or d #inst "2000-01-01") as-of) 0))))
|
||||||
(into [])
|
|
||||||
(reduce
|
(reduce
|
||||||
(fn [acc jel]
|
(fn [acc jel]
|
||||||
(update acc [(:db/id (:journal-entry-line/account jel)) (:journal-entry-line/location jel)]
|
(update acc [(:db/id (:journal-entry-line/account jel)) (:journal-entry-line/location jel)]
|
||||||
|
|||||||
@@ -79,7 +79,8 @@
|
|||||||
:external-id (str "ezcater/charge/" client-id "-" location "-" order-number "-" 0)
|
:external-id (str "ezcater/charge/" client-id "-" location "-" order-number "-" 0)
|
||||||
:processor :ccp-processor/ezcater
|
:processor :ccp-processor/ezcater
|
||||||
:total (fmt-amount (+ food-total
|
:total (fmt-amount (+ food-total
|
||||||
tax))
|
tax
|
||||||
|
tip))
|
||||||
:tip (fmt-amount tip)}]
|
:tip (fmt-amount tip)}]
|
||||||
:total (fmt-amount (+ food-total
|
:total (fmt-amount (+ food-total
|
||||||
tax
|
tax
|
||||||
|
|||||||
Reference in New Issue
Block a user