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"))))))
|
(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 :total parsedouble)
|
||||||
(update :tax parsedouble)
|
(update :tax parsedouble)
|
||||||
|
(update :discount parsedouble)
|
||||||
(update :tip parsedouble)
|
(update :tip parsedouble)
|
||||||
(update :line-items (fn [lis]
|
(update :line-items (fn [lis]
|
||||||
(map
|
(map
|
||||||
(fn [li]
|
(fn [li]
|
||||||
(-> li
|
(-> li
|
||||||
(update :tax parsedouble)
|
(update :tax parsedouble)
|
||||||
|
(update :discount parsedouble)
|
||||||
(update :total parsedouble)))
|
(update :total parsedouble)))
|
||||||
lis)))
|
lis)))
|
||||||
(update :charges (fn [charges]
|
(update :charges (fn [charges]
|
||||||
|
|||||||
@@ -140,10 +140,13 @@
|
|||||||
:client [:client/code client]
|
:client [:client/code client]
|
||||||
:location loc
|
:location loc
|
||||||
:external-id (str "square/order/" client "-" loc "-" (:id order))
|
:external-id (str "square/order/" client "-" loc "-" (:id order))
|
||||||
:total (-> order :net_amounts :total_money amount->money)
|
:total (- (-> order :total_money amount->money)
|
||||||
:tax (-> order :net_amounts :tax_money amount->money)
|
(or (some-> order :return_amounts :total_money amount->money) 0.0))
|
||||||
:tip (-> order :net_amounts :tip_money amount->money)
|
:tax (- (-> order :total_tax_money amount->money)
|
||||||
:discount (-> order :net_amounts :discount_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)
|
:charges (->> (:tenders order)
|
||||||
(map (fn [t]
|
(map (fn [t]
|
||||||
(remove-nils
|
(remove-nils
|
||||||
|
|||||||
Reference in New Issue
Block a user