lots of new fixes.

This commit is contained in:
Bryce Covert
2020-06-19 10:05:55 -07:00
parent ef843ac9a2
commit d4559a7c2d
23 changed files with 451 additions and 56 deletions

View File

@@ -77,7 +77,7 @@
[:bank-accounts [:id :code :number :bank-name :bank-code :check-number :name :routing :type :sort-order :visible :yodlee-account-id :locations :include-in-reports] ]
[:forecasted-transactions [:id :amount :identifier :day-of-month]]]]
[:vendor
[:id :name :hidden [:default-account [:name :id :location]] [:primary-contact [:name :phone :email :id]] [:secondary-contact [:id :name :phone :email]] :print-as :invoice-reminder-schedule :code]]
vendor-query]
[:accounts [:numeric-code :name :location :type :account_set :applicability :id [:client-overrides [:name [:client [:name :id]]]]]]]}
:on-success [::received-initial]}

View File

@@ -118,6 +118,11 @@
(fn [db [_ client]]
(:locations (get (:clients db) (or client (:client db))))))
(re-frame/reg-sub
::forecasted-transactions-for-client
(fn [db [_ client]]
(:forecasted-transactions (get (:clients db) (or client (:client db))))))
(re-frame/reg-sub
::locations-for-client-or-bank-account
(fn [db [_ client-id bank-account-id]]
@@ -180,7 +185,7 @@
::vendor-default-account
(fn [db [_ v client]]
(let [accounts (accounts-by-id (:accounts db) client)
vendor (if (:default-account v)
vendor (if (map? v)
v
(-> (:vendors db) (get v)))
client-override (->> (:account-overrides vendor)

View File

@@ -203,7 +203,7 @@
[sort-by-list {:sort sort
:on-change opc}]]
[:div.level-item
"Outstanding" (nf outstanding)]]]
"Outstanding " (nf outstanding)]]]
(doall
(for [invoices invoice-groups]
^{:key (:id (first invoices))}

View File

@@ -11,6 +11,7 @@
:date
[:yodlee_merchant [:name :yodlee-id :id]]
:post_date
[:forecast-match [:id :identifier]]
:status
:description_original
[:payment [:check_number :s3_url]]

View File

@@ -15,7 +15,7 @@
(re-frame/reg-sub
::submit-query
:<- [::forms/form ::form]
(fn [{{:keys [id vendor accounts approval-status]} :data}]
(fn [{{:keys [id vendor accounts approval-status forecast-match]} :data}]
{:venia/operation {:operation/type :mutation
:operation/name "EditTransaction"}
:venia/queries [{:query/data
@@ -23,6 +23,7 @@
{:transaction {:id id
:vendor-id (:id vendor)
:approval-status approval-status
:forecast-match (:id forecast-match)
:accounts (map
(fn [{:keys [id account amount location]}]
{:id (when-not (str/starts-with? id "new-")
@@ -51,6 +52,7 @@
(-> which
(select-keys [:vendor :amount :payment :client :description-original
:yodlee-merchant :id :potential-payment-matches
:forecast-match
:location :accounts :approval-status
:matched-rule])
(assoc :original-status (:approval-status which))
@@ -262,6 +264,12 @@
[:excluded "Excluded from Ledger"]]
:disabled should-disable-for-client?}]]
[field "Forecasted-transaction"
[typeahead-entity {:matches (doto @(re-frame/subscribe [::subs/forecasted-transactions-for-client (:id (:client data))]) println)
:match->text :identifier
:type "typeahead-entity"
:field [:forecast-match]}]]
[:hr]
[error-notification]