Sales orders works correctly now.
This commit is contained in:
@@ -117,6 +117,13 @@
|
||||
|
||||
(re-frame/reg-event-fx
|
||||
::authenticated
|
||||
(fn [{:keys [db]} [_ authentication]]
|
||||
{:db (-> db
|
||||
(assoc-in [::yodlee :authentication] authentication)
|
||||
(assoc-in [::yodlee :loading?] false))}))
|
||||
|
||||
(re-frame/reg-event-fx
|
||||
::authenticated-mfa
|
||||
(fn [{:keys [db]} [_ provider-account-id authentication]]
|
||||
{:db (-> db
|
||||
(assoc-in [::yodlee :authentication] authentication)
|
||||
@@ -221,7 +228,7 @@
|
||||
"value" v})
|
||||
(:mfa (:data (get-in db [::forms/forms [::mfa-form provider-account-id]]))))}
|
||||
|
||||
:on-success [::authenticated provider-account-id]
|
||||
:on-success [::authenticated-mfa provider-account-id]
|
||||
:on-error [::forms/save-error [::mfa-form provider-account-id] ]}}))
|
||||
|
||||
(re-frame/reg-event-fx
|
||||
|
||||
@@ -26,9 +26,9 @@
|
||||
:total-lte (:amount-lte (:total-range params))
|
||||
:date-range (:date-range params)
|
||||
:client-id (:id @(re-frame/subscribe [::subs/client]))}
|
||||
[[:sales-orders [:id :total :tax :tip :date
|
||||
[[:sales-orders [:id :total :tax :tip :discount :service-charge :returns :date
|
||||
[:charges [:type-name :total]]
|
||||
[:line-items [:item-name :total]]
|
||||
[:line-items [:item-name :total :category]]
|
||||
[:client [:name :id]]]]
|
||||
:total
|
||||
:start
|
||||
|
||||
@@ -63,6 +63,21 @@
|
||||
[money-field {:type "money"
|
||||
:field [:tax]
|
||||
:disabled true}])
|
||||
(field "Discount"
|
||||
[money-field {:type "money"
|
||||
:field [:discount]
|
||||
:disabled true}])
|
||||
|
||||
(field "Returns"
|
||||
[money-field {:type "money"
|
||||
:field [:returns]
|
||||
:disabled true}])
|
||||
|
||||
(field "Service Charge"
|
||||
[money-field {:type "money"
|
||||
:field [:service-charge]
|
||||
:disabled true}])
|
||||
|
||||
(field "Tip"
|
||||
[money-field {:type "money"
|
||||
:field [:tip]
|
||||
@@ -76,6 +91,6 @@
|
||||
[:h1.subtitle.is-4 "Line Items"]
|
||||
[:ul
|
||||
(for [line-item (:line-items data)]
|
||||
[:li (:item-name line-item) ": " (:total line-item)])]])
|
||||
[:li (:item-name line-item) ": " (:total line-item) [:span.tag (:category line-item)]])]])
|
||||
{:key (:id data)}))])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user