sales fixes.
This commit is contained in:
@@ -78,12 +78,14 @@
|
||||
(coerce/to-string (coerce/to-local-date-time (time/to-time-zone (coerce/to-date-time d) (time/time-zone-for-id "America/Los_Angeles"))))))
|
||||
(update :total parsedouble)
|
||||
(update :tax parsedouble)
|
||||
(update :discount parsedouble)
|
||||
(update :tip parsedouble)
|
||||
(update :line-items (fn [lis]
|
||||
(map
|
||||
(fn [li]
|
||||
(-> li
|
||||
(update :tax parsedouble)
|
||||
(update :discount parsedouble)
|
||||
(update :total parsedouble)))
|
||||
lis)))
|
||||
(update :charges (fn [charges]
|
||||
|
||||
@@ -140,10 +140,13 @@
|
||||
:client [:client/code client]
|
||||
:location loc
|
||||
:external-id (str "square/order/" client "-" loc "-" (:id order))
|
||||
:total (-> order :net_amounts :total_money amount->money)
|
||||
:tax (-> order :net_amounts :tax_money amount->money)
|
||||
:tip (-> order :net_amounts :tip_money amount->money)
|
||||
:discount (-> order :net_amounts :discount_money amount->money)
|
||||
:total (- (-> order :total_money amount->money)
|
||||
(or (some-> order :return_amounts :total_money amount->money) 0.0))
|
||||
:tax (- (-> order :total_tax_money amount->money)
|
||||
(or (some-> order :return_amounts :tax_money amount->money) 0.0))
|
||||
:tip (- (-> order :net_amounts :tip_money amount->money)
|
||||
(or (some-> order :return_amounts :tip_money amount->money) 0.0))
|
||||
:discount (-> order :total_discount_money amount->money)
|
||||
:charges (->> (:tenders order)
|
||||
(map (fn [t]
|
||||
(remove-nils
|
||||
|
||||
Reference in New Issue
Block a user