Fixed UI bug with transactions unable to autochoose accounts, added new locations

This commit is contained in:
2021-08-18 20:51:22 -07:00
parent 85df01e4bc
commit cbe0e77434
2 changed files with 53 additions and 39 deletions

View File

@@ -80,7 +80,7 @@
value
(expense-accounts-field/can-replace-with-default? (:accounts data)))
[[:accounts] (expense-accounts-field/default-account (:accounts data)
@(re-frame/subscribe [::subs/vendor-default-account value (:client data)])
@(re-frame/subscribe [::subs/vendor-default-account (:id value) (:client data)])
(:amount data)
locations)]
[])))))
@@ -414,15 +414,20 @@
:field [:vendor]
:disabled (or (boolean (:payment data))
should-disable-for-client?)}])
(field nil
[expense-accounts-field
{:type "expense-accounts"
:field [:accounts]
:max (Math/abs (js/parseFloat (:amount data)))
:descriptor "credit account"
:disabled (or (boolean (:payment data))
should-disable-for-client?)
:locations locations}])
(with-meta
(field nil
[expense-accounts-field
{:type "expense-accounts"
:field [:accounts]
:max (Math/abs (js/parseFloat (:amount data)))
:descriptor "credit account"
:disabled (or (boolean (:payment data))
should-disable-for-client?)
:locations locations}])
{:key (str (:id (:vendor data)))})