remove excluded from ledger.
This commit is contained in:
3376
resources/IconFont.json
Normal file
3376
resources/IconFont.json
Normal file
File diff suppressed because one or more lines are too long
Binary file not shown.
File diff suppressed because one or more lines are too long
|
Before Width: | Height: | Size: 266 KiB After Width: | Height: | Size: 215 KiB |
Binary file not shown.
Binary file not shown.
@@ -1,10 +1,10 @@
|
|||||||
@font-face {
|
@font-face {
|
||||||
font-family: 'icomoon';
|
font-family: 'icomoon';
|
||||||
src: url('fonts/icomoon.eot?wfctkz');
|
src: url('fonts/icomoon.eot?z8rl1o');
|
||||||
src: url('fonts/icomoon.eot?wfctkz#iefix') format('embedded-opentype'),
|
src: url('fonts/icomoon.eot?z8rl1o#iefix') format('embedded-opentype'),
|
||||||
url('fonts/icomoon.ttf?wfctkz') format('truetype'),
|
url('fonts/icomoon.ttf?z8rl1o') format('truetype'),
|
||||||
url('fonts/icomoon.woff?wfctkz') format('woff'),
|
url('fonts/icomoon.woff?z8rl1o') format('woff'),
|
||||||
url('fonts/icomoon.svg?wfctkz#icomoon') format('svg');
|
url('fonts/icomoon.svg?z8rl1o#icomoon') format('svg');
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
}
|
}
|
||||||
@@ -24,6 +24,18 @@
|
|||||||
-moz-osx-font-smoothing: grayscale;
|
-moz-osx-font-smoothing: grayscale;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.icon-task-list-check-1:before {
|
||||||
|
content: "\e90b";
|
||||||
|
}
|
||||||
|
.icon-task-list-disable:before {
|
||||||
|
content: "\e91c";
|
||||||
|
}
|
||||||
|
.icon-task-list-text-1:before {
|
||||||
|
content: "\e922";
|
||||||
|
}
|
||||||
|
.icon-task-list-question:before {
|
||||||
|
content: "\e92a";
|
||||||
|
}
|
||||||
.icon-list-bullets:before {
|
.icon-list-bullets:before {
|
||||||
content: "\e967";
|
content: "\e967";
|
||||||
}
|
}
|
||||||
@@ -96,18 +108,12 @@
|
|||||||
.icon-cash-payment-coin-1:before {
|
.icon-cash-payment-coin-1:before {
|
||||||
content: "\e90a";
|
content: "\e90a";
|
||||||
}
|
}
|
||||||
.icon-cash-payment-coin-stash:before {
|
|
||||||
content: "\e90b";
|
|
||||||
}
|
|
||||||
.icon-cash-payment-coin:before {
|
.icon-cash-payment-coin:before {
|
||||||
content: "\e90c";
|
content: "\e90c";
|
||||||
}
|
}
|
||||||
.icon-cash-payment-coins:before {
|
.icon-cash-payment-coins:before {
|
||||||
content: "\e90d";
|
content: "\e90d";
|
||||||
}
|
}
|
||||||
.icon-cash-payment-person:before {
|
|
||||||
content: "\e90e";
|
|
||||||
}
|
|
||||||
.icon-cash-payment-wallet:before {
|
.icon-cash-payment-wallet:before {
|
||||||
content: "\e90f";
|
content: "\e90f";
|
||||||
}
|
}
|
||||||
@@ -129,27 +135,9 @@
|
|||||||
.icon-credit-card-amex:before {
|
.icon-credit-card-amex:before {
|
||||||
content: "\e915";
|
content: "\e915";
|
||||||
}
|
}
|
||||||
.icon-credit-card-check:before {
|
|
||||||
content: "\e916";
|
|
||||||
}
|
|
||||||
.icon-credit-card-disable:before {
|
|
||||||
content: "\e917";
|
|
||||||
}
|
|
||||||
.icon-credit-card-dollar-1:before {
|
|
||||||
content: "\e918";
|
|
||||||
}
|
|
||||||
.icon-credit-card-dollar:before {
|
|
||||||
content: "\e919";
|
|
||||||
}
|
|
||||||
.icon-credit-card-flag:before {
|
|
||||||
content: "\e91a";
|
|
||||||
}
|
|
||||||
.icon-credit-card-give:before {
|
.icon-credit-card-give:before {
|
||||||
content: "\e91b";
|
content: "\e91b";
|
||||||
}
|
}
|
||||||
.icon-credit-card-laptop-payment:before {
|
|
||||||
content: "\e91c";
|
|
||||||
}
|
|
||||||
.icon-credit-card-lock:before {
|
.icon-credit-card-lock:before {
|
||||||
content: "\e91d";
|
content: "\e91d";
|
||||||
}
|
}
|
||||||
@@ -165,9 +153,6 @@
|
|||||||
.icon-credit-card-payment:before {
|
.icon-credit-card-payment:before {
|
||||||
content: "\e921";
|
content: "\e921";
|
||||||
}
|
}
|
||||||
.icon-credit-card-phone-call:before {
|
|
||||||
content: "\e922";
|
|
||||||
}
|
|
||||||
.icon-credit-card-remove:before {
|
.icon-credit-card-remove:before {
|
||||||
content: "\e923";
|
content: "\e923";
|
||||||
}
|
}
|
||||||
@@ -189,9 +174,6 @@
|
|||||||
.icon-credit-card:before {
|
.icon-credit-card:before {
|
||||||
content: "\e929";
|
content: "\e929";
|
||||||
}
|
}
|
||||||
.icon-saving-bag-increase:before {
|
|
||||||
content: "\e92a";
|
|
||||||
}
|
|
||||||
.icon-saving-bank-1:before {
|
.icon-saving-bank-1:before {
|
||||||
content: "\e92b";
|
content: "\e92b";
|
||||||
}
|
}
|
||||||
@@ -210,33 +192,6 @@
|
|||||||
.icon-saving-bear:before {
|
.icon-saving-bear:before {
|
||||||
content: "\e930";
|
content: "\e930";
|
||||||
}
|
}
|
||||||
.icon-saving-bull-decrease:before {
|
|
||||||
content: "\e931";
|
|
||||||
}
|
|
||||||
.icon-saving-bull-increase:before {
|
|
||||||
content: "\e932";
|
|
||||||
}
|
|
||||||
.icon-saving-bull:before {
|
|
||||||
content: "\e933";
|
|
||||||
}
|
|
||||||
.icon-saving-dog-guard-decrease:before {
|
|
||||||
content: "\e934";
|
|
||||||
}
|
|
||||||
.icon-saving-dog-guard-increase:before {
|
|
||||||
content: "\e935";
|
|
||||||
}
|
|
||||||
.icon-saving-money-egg:before {
|
|
||||||
content: "\e936";
|
|
||||||
}
|
|
||||||
.icon-saving-money-flower:before {
|
|
||||||
content: "\e937";
|
|
||||||
}
|
|
||||||
.icon-saving-money-seedling:before {
|
|
||||||
content: "\e938";
|
|
||||||
}
|
|
||||||
.icon-saving-money-tree:before {
|
|
||||||
content: "\e939";
|
|
||||||
}
|
|
||||||
.icon-saving-piggy-bank:before {
|
.icon-saving-piggy-bank:before {
|
||||||
content: "\e93a";
|
content: "\e93a";
|
||||||
}
|
}
|
||||||
@@ -276,12 +231,6 @@
|
|||||||
.icon-accounting-coins-bill:before {
|
.icon-accounting-coins-bill:before {
|
||||||
content: "\e946";
|
content: "\e946";
|
||||||
}
|
}
|
||||||
.icon-accounting-coins-stack-1:before {
|
|
||||||
content: "\e947";
|
|
||||||
}
|
|
||||||
.icon-accounting-coins-stack:before {
|
|
||||||
content: "\e948";
|
|
||||||
}
|
|
||||||
.icon-accounting-withdraw:before {
|
.icon-accounting-withdraw:before {
|
||||||
content: "\e949";
|
content: "\e949";
|
||||||
}
|
}
|
||||||
@@ -315,9 +264,6 @@
|
|||||||
.icon-accounting-abacus:before {
|
.icon-accounting-abacus:before {
|
||||||
content: "\e953";
|
content: "\e953";
|
||||||
}
|
}
|
||||||
.icon-accounting-calculator-1:before {
|
|
||||||
content: "\e954";
|
|
||||||
}
|
|
||||||
.icon-accounting-calculator-2:before {
|
.icon-accounting-calculator-2:before {
|
||||||
content: "\e955";
|
content: "\e955";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -397,6 +397,7 @@
|
|||||||
{:db/ident :transaction-approval-status/approved}
|
{:db/ident :transaction-approval-status/approved}
|
||||||
{:db/ident :transaction-approval-status/unapproved}
|
{:db/ident :transaction-approval-status/unapproved}
|
||||||
{:db/ident :transaction-approval-status/requires-feedback}
|
{:db/ident :transaction-approval-status/requires-feedback}
|
||||||
|
{:db/ident :transaction-approval-status/excluded}
|
||||||
]])
|
]])
|
||||||
|
|
||||||
(def add-credit-bank-account
|
(def add-credit-bank-account
|
||||||
|
|||||||
@@ -66,6 +66,11 @@
|
|||||||
'[(<= ?date ?end-date)]]}
|
'[(<= ?date ?end-date)]]}
|
||||||
:args [(coerce/to-date (:end (:date-range args)))]})
|
:args [(coerce/to-date (:end (:date-range args)))]})
|
||||||
|
|
||||||
|
(:approval-status args)
|
||||||
|
(merge-query {:query {:in ['?approval-status]
|
||||||
|
:where ['[?e :transaction/approval-status ?approval-status]]}
|
||||||
|
:args [(:approval-status args)]})
|
||||||
|
|
||||||
(:client-code args)
|
(:client-code args)
|
||||||
(merge-query {:query {:in ['?client-code]
|
(merge-query {:query {:in ['?client-code]
|
||||||
:where ['[?e :transaction/client ?client-id]
|
:where ['[?e :transaction/client ?client-id]
|
||||||
|
|||||||
@@ -180,7 +180,6 @@
|
|||||||
:description_original {:type 'String}
|
:description_original {:type 'String}
|
||||||
:description_simple {:type 'String}
|
:description_simple {:type 'String}
|
||||||
:location {:type 'String}
|
:location {:type 'String}
|
||||||
:exclude_from_ledger {:type 'Boolean}
|
|
||||||
:status {:type 'String}
|
:status {:type 'String}
|
||||||
:yodlee_merchant {:type :yodlee_merchant}
|
:yodlee_merchant {:type :yodlee_merchant}
|
||||||
:client {:type :client}
|
:client {:type :client}
|
||||||
@@ -387,7 +386,8 @@
|
|||||||
:date_range {:type :date_range}
|
:date_range {:type :date_range}
|
||||||
:start {:type 'Int}
|
:start {:type 'Int}
|
||||||
:sort_by {:type 'String}
|
:sort_by {:type 'String}
|
||||||
:asc {:type 'Boolean}}
|
:asc {:type 'Boolean}
|
||||||
|
:approval_status {:type :transaction_approval_status}}
|
||||||
|
|
||||||
:resolve :get-transaction-page}
|
:resolve :get-transaction-page}
|
||||||
|
|
||||||
@@ -528,7 +528,6 @@
|
|||||||
:total {:type 'Float}}}
|
:total {:type 'Float}}}
|
||||||
:edit_transaction
|
:edit_transaction
|
||||||
{:fields {:id {:type :id}
|
{:fields {:id {:type :id}
|
||||||
:exclude_from_ledger {:type 'Boolean}
|
|
||||||
:vendor_id {:type :id}
|
:vendor_id {:type :id}
|
||||||
:approval_status {:type :transaction_approval_status}
|
:approval_status {:type :transaction_approval_status}
|
||||||
:accounts {:type '(list :edit_expense_account)}}}
|
:accounts {:type '(list :edit_expense_account)}}}
|
||||||
@@ -576,7 +575,8 @@
|
|||||||
{:enum-value :revenue}]}
|
{:enum-value :revenue}]}
|
||||||
:transaction_approval_status {:values [{:enum-value :approved}
|
:transaction_approval_status {:values [{:enum-value :approved}
|
||||||
{:enum-value :unapproved}
|
{:enum-value :unapproved}
|
||||||
{:enum-value :requires_feedback}]}}
|
{:enum-value :requires_feedback}
|
||||||
|
{:enum-value :excluded}]}}
|
||||||
:mutations
|
:mutations
|
||||||
{:reject_invoices {:type '(list :id)
|
{:reject_invoices {:type '(list :id)
|
||||||
:args {:invoices {:type '(list :id)}}
|
:args {:invoices {:type '(list :id)}}
|
||||||
|
|||||||
@@ -26,7 +26,11 @@
|
|||||||
|
|
||||||
(defn get-transaction-page [context args value]
|
(defn get-transaction-page [context args value]
|
||||||
(let [args (assoc args :id (:id context))
|
(let [args (assoc args :id (:id context))
|
||||||
[transactions transactions-count] (d-transactions/get-graphql (<-graphql args))
|
[transactions transactions-count] (d-transactions/get-graphql (update (<-graphql args) :approval-status
|
||||||
|
#(some->> %
|
||||||
|
name
|
||||||
|
snake->kebab
|
||||||
|
(keyword "transaction-approval-status"))))
|
||||||
transactions (map ->graphql (map approval-status->graphql transactions))]
|
transactions (map ->graphql (map approval-status->graphql transactions))]
|
||||||
[{:transactions transactions
|
[{:transactions transactions
|
||||||
:total transactions-count
|
:total transactions-count
|
||||||
@@ -51,7 +55,7 @@
|
|||||||
set)]
|
set)]
|
||||||
(set/difference existing-ids specified-ids)))
|
(set/difference existing-ids specified-ids)))
|
||||||
|
|
||||||
(defn edit-transaction [context {{:keys [id exclude_from_ledger accounts vendor_id approval_status] :as transaction} :transaction} value]
|
(defn edit-transaction [context {{:keys [id accounts vendor_id approval_status] :as transaction} :transaction} value]
|
||||||
(let [existing-transaction (d-transactions/get-by-id id)
|
(let [existing-transaction (d-transactions/get-by-id id)
|
||||||
_ (assert-can-see-client (:id context) (:transaction/client existing-transaction) )
|
_ (assert-can-see-client (:id context) (:transaction/client existing-transaction) )
|
||||||
deleted (deleted-accounts existing-transaction accounts)
|
deleted (deleted-accounts existing-transaction accounts)
|
||||||
@@ -79,7 +83,6 @@
|
|||||||
name
|
name
|
||||||
snake->kebab
|
snake->kebab
|
||||||
(keyword "transaction-approval-status"))
|
(keyword "transaction-approval-status"))
|
||||||
:transaction/exclude-from-ledger exclude_from_ledger
|
|
||||||
:transaction/accounts (map transaction-account->entity accounts)
|
:transaction/accounts (map transaction-account->entity accounts)
|
||||||
})]
|
})]
|
||||||
(map (fn [d]
|
(map (fn [d]
|
||||||
|
|||||||
@@ -58,6 +58,7 @@
|
|||||||
[db [type id]]
|
[db [type id]]
|
||||||
(let [entity (d/pull db ['* {:transaction/vendor '[*]
|
(let [entity (d/pull db ['* {:transaction/vendor '[*]
|
||||||
:transaction/client '[*]
|
:transaction/client '[*]
|
||||||
|
:transaction/approval-status '[*]
|
||||||
:transaction/bank-account '[* {:bank-account/type [:db/ident]}]
|
:transaction/bank-account '[* {:bank-account/type [:db/ident]}]
|
||||||
:transaction/accounts '[*
|
:transaction/accounts '[*
|
||||||
{:transaction-account/account [*]}] }] id)
|
{:transaction-account/account [*]}] }] id)
|
||||||
@@ -65,7 +66,7 @@
|
|||||||
decreasing? (< (:transaction/amount entity) 0.0)
|
decreasing? (< (:transaction/amount entity) 0.0)
|
||||||
credit-from-bank? decreasing?
|
credit-from-bank? decreasing?
|
||||||
debit-from-bank? (not decreasing?)]
|
debit-from-bank? (not decreasing?)]
|
||||||
(when-not (:transaction/exclude-from-ledger entity)
|
(when-not (= :transaction-approval-status/excluded (:db/ident (:transaction/approval-status entity)))
|
||||||
(remove-nils
|
(remove-nils
|
||||||
{:journal-entry/source "transaction"
|
{:journal-entry/source "transaction"
|
||||||
:journal-entry/client (:db/id (:transaction/client entity))
|
:journal-entry/client (:db/id (:transaction/client entity))
|
||||||
|
|||||||
@@ -93,7 +93,7 @@
|
|||||||
:amount (double amount)
|
:amount (double amount)
|
||||||
:description-original description-original
|
:description-original description-original
|
||||||
:description-simple description-simple
|
:description-simple description-simple
|
||||||
:exclude-from-ledger false
|
:approval-status :transaction-approval-status/unapproved
|
||||||
:type type
|
:type type
|
||||||
:status status
|
:status status
|
||||||
:client client-id
|
:client client-id
|
||||||
|
|||||||
@@ -21,7 +21,12 @@
|
|||||||
"paid" :paid-invoices
|
"paid" :paid-invoices
|
||||||
"voided" :voided-invoices
|
"voided" :voided-invoices
|
||||||
"new" :new-invoice}
|
"new" :new-invoice}
|
||||||
"transactions/" {"" :transactions}
|
"transactions/" {"" :transactions
|
||||||
|
"unapproved" :unapproved-transactions
|
||||||
|
"approved" :approved-transactions
|
||||||
|
"requires-feedback" :requires-feedback-transactions
|
||||||
|
|
||||||
|
"excluded" :excluded-transactions}
|
||||||
"ledger/" {"" :ledger
|
"ledger/" {"" :ledger
|
||||||
"profit-and-loss" :profit-and-loss
|
"profit-and-loss" :profit-and-loss
|
||||||
"balance-sheet" :balance-sheet
|
"balance-sheet" :balance-sheet
|
||||||
|
|||||||
@@ -49,7 +49,20 @@
|
|||||||
(checks-page))
|
(checks-page))
|
||||||
|
|
||||||
(defmethod page :transactions [_]
|
(defmethod page :transactions [_]
|
||||||
(transactions-page))
|
(transactions-page {}))
|
||||||
|
|
||||||
|
(defmethod page :unapproved-transactions [_]
|
||||||
|
[transactions-page {:approval-status :unapproved}])
|
||||||
|
|
||||||
|
(defmethod page :approved-transactions [_]
|
||||||
|
[transactions-page {:approval-status :approved}])
|
||||||
|
|
||||||
|
(defmethod page :requires-feedback-transactions [_]
|
||||||
|
[transactions-page {:approval-status :requires-feedback}])
|
||||||
|
|
||||||
|
(defmethod page :excluded-transactions [_]
|
||||||
|
[transactions-page {:approval-status :excluded}])
|
||||||
|
|
||||||
|
|
||||||
(defmethod page :ledger [_]
|
(defmethod page :ledger [_]
|
||||||
(ledger-page))
|
(ledger-page))
|
||||||
|
|||||||
@@ -299,7 +299,8 @@
|
|||||||
:field [:transaction-approval-status]
|
:field [:transaction-approval-status]
|
||||||
:options [[:unapproved "Unapproved"]
|
:options [[:unapproved "Unapproved"]
|
||||||
[:requires-feedback "Client Review"]
|
[:requires-feedback "Client Review"]
|
||||||
[:approved "Approved"]]}]]
|
[:approved "Approved"]
|
||||||
|
[:excluded "Excluded from Ledger"]]}]]
|
||||||
|
|
||||||
|
|
||||||
[:div.is-divider]
|
[:div.is-divider]
|
||||||
|
|||||||
@@ -2,6 +2,8 @@
|
|||||||
(:require [auto-ap.events :as events]
|
(:require [auto-ap.events :as events]
|
||||||
[auto-ap.forms :as forms]
|
[auto-ap.forms :as forms]
|
||||||
[auto-ap.subs :as subs]
|
[auto-ap.subs :as subs]
|
||||||
|
[bidi.bidi :as bidi]
|
||||||
|
[auto-ap.routes :as routes]
|
||||||
[auto-ap.views.components.bank-account-filter :refer [bank-account-filter]]
|
[auto-ap.views.components.bank-account-filter :refer [bank-account-filter]]
|
||||||
[auto-ap.views.components.date-range-filter :refer [date-range-filter]]
|
[auto-ap.views.components.date-range-filter :refer [date-range-filter]]
|
||||||
[auto-ap.views.components.layouts :refer [appearing-side-bar side-bar-layout]]
|
[auto-ap.views.components.layouts :refer [appearing-side-bar side-bar-layout]]
|
||||||
@@ -13,7 +15,7 @@
|
|||||||
[auto-ap.views.pages.transactions.common :refer [transaction-read]]
|
[auto-ap.views.pages.transactions.common :refer [transaction-read]]
|
||||||
[auto-ap.utils :refer [replace-by]]
|
[auto-ap.utils :refer [replace-by]]
|
||||||
[auto-ap.views.pages.transactions.manual :as manual]
|
[auto-ap.views.pages.transactions.manual :as manual]
|
||||||
[auto-ap.views.utils :refer [bind-field date->str dispatch-event nf date-picker]]
|
[auto-ap.views.utils :refer [bind-field date->str dispatch-event nf date-picker active-when]]
|
||||||
[goog.string :as gstring]
|
[goog.string :as gstring]
|
||||||
[re-frame.core :as re-frame]))
|
[re-frame.core :as re-frame]))
|
||||||
|
|
||||||
@@ -95,7 +97,7 @@
|
|||||||
(fn [db]
|
(fn [db]
|
||||||
(-> db ::notification)))
|
(-> db ::notification)))
|
||||||
|
|
||||||
(def transactions-content
|
(defn content [{:keys [approval-status]}]
|
||||||
(with-meta
|
(with-meta
|
||||||
(fn []
|
(fn []
|
||||||
(let [notification (re-frame/subscribe [::notification])
|
(let [notification (re-frame/subscribe [::notification])
|
||||||
@@ -127,24 +129,68 @@
|
|||||||
:on-params-change (fn [params]
|
:on-params-change (fn [params]
|
||||||
(re-frame/dispatch [::params-change params]))}]
|
(re-frame/dispatch [::params-change params]))}]
|
||||||
]))
|
]))
|
||||||
{:component-will-mount #(re-frame/dispatch-sync [::params-change {}]) }))
|
{:component-will-mount #(re-frame/dispatch-sync [::params-change {:approval-status approval-status}]) }))
|
||||||
|
|
||||||
(defn transactions-page []
|
(def main-content {nil (content {:approval-status nil})
|
||||||
(let [{transaction-bar-active? :active?} @(re-frame/subscribe [::forms/form ::edit/form])]
|
:unapproved (content {:approval-status :unapproved})
|
||||||
|
:requires-feedback (content {:approval-status :requires-feedback})
|
||||||
|
:approved (content {:approval-status :approved})
|
||||||
|
:excluded (content {:approval-status :excluded})})
|
||||||
|
|
||||||
|
|
||||||
|
(defn transactions-page [{:keys [approval-status]}]
|
||||||
|
(let [{transaction-bar-active? :active?} @(re-frame/subscribe [::forms/form ::edit/form])
|
||||||
|
ap @(re-frame/subscribe [::subs/active-page])]
|
||||||
[side-bar-layout
|
[side-bar-layout
|
||||||
{:side-bar [:div
|
{:side-bar
|
||||||
[:p.menu-label "Bank Account"]
|
|
||||||
[:div
|
[:div
|
||||||
[bank-account-filter
|
[:div [:p.menu-label "Type"]
|
||||||
{:on-change-event [::change-selected-bank-account]
|
[:ul.menu-list
|
||||||
:value (:bank-acount-filter @(re-frame/subscribe [::transaction-page]))
|
[:li.menu-item
|
||||||
:bank-accounts @(re-frame/subscribe [::subs/bank-accounts])}]]
|
[:a.item {:href (bidi/path-for routes/routes :transactions)
|
||||||
[:p.menu-label "Date Range"]
|
:class [(active-when ap = :transactions)]}
|
||||||
[:div
|
[:span {:class "icon" :style {:font-size "25px"}}]
|
||||||
[date-range-filter
|
[:span {:class "name"} "All"]]]
|
||||||
{:on-change-event [::change-selected-date-range]
|
[:li.menu-item
|
||||||
:value (:date-range-filter @(re-frame/subscribe [::transaction-page]))}]]]
|
[:a.item {:href (bidi/path-for routes/routes :unapproved-transactions)
|
||||||
:main [transactions-content]
|
:class [(active-when ap = :unapproved-transactions)]}
|
||||||
|
[:span {:class "icon icon-task-list-text-1" :style {:font-size "25px"}}]
|
||||||
|
[:span {:class "name"} "Unapproved"]]]
|
||||||
|
[:li.menu-item
|
||||||
|
[:a.item {:href (bidi/path-for routes/routes :requires-feedback-transactions)
|
||||||
|
:class [(active-when ap = :requires-feedback-transactions)]}
|
||||||
|
|
||||||
|
[:span {:class "icon icon-task-list-question" :style {:font-size "25px"}}]
|
||||||
|
|
||||||
|
[:span {:class "name"} "Client Review"]]]
|
||||||
|
[:li.menu-item
|
||||||
|
[:a.item {:href (bidi/path-for routes/routes :approved-transactions)
|
||||||
|
:class [(active-when ap = :approved-transactions)]}
|
||||||
|
|
||||||
|
[:span {:class "icon icon-task-list-check-1" :style {:font-size "25px"}}]
|
||||||
|
|
||||||
|
[:span {:class "name"} "Approved"]]]
|
||||||
|
[:li.menu-item
|
||||||
|
[:a.item {:href (bidi/path-for routes/routes :excluded-transactions)
|
||||||
|
:class [(active-when ap = :excluded-transactions)]}
|
||||||
|
|
||||||
|
[:span {:class "icon icon-task-list-disable" :style {:font-size "25px"}}]
|
||||||
|
|
||||||
|
[:span {:class "name"} "Excluded"]]]
|
||||||
|
]]
|
||||||
|
[:p.menu-label "Bank Account"]
|
||||||
|
[:div
|
||||||
|
[bank-account-filter
|
||||||
|
{:on-change-event [::change-selected-bank-account]
|
||||||
|
:value (:bank-acount-filter @(re-frame/subscribe [::transaction-page]))
|
||||||
|
:bank-accounts @(re-frame/subscribe [::subs/bank-accounts])}]]
|
||||||
|
[:p.menu-label "Date Range"]
|
||||||
|
[:div
|
||||||
|
[date-range-filter
|
||||||
|
{:on-change-event [::change-selected-date-range]
|
||||||
|
:value (:date-range-filter @(re-frame/subscribe [::transaction-page]))}]]]
|
||||||
|
:main [(get main-content approval-status)]
|
||||||
|
|
||||||
:bottom [:div
|
:bottom [:div
|
||||||
[manual/modal {:import-completed [::manual-import-completed ]}]]
|
[manual/modal {:import-completed [::manual-import-completed ]}]]
|
||||||
|
|||||||
@@ -4,7 +4,6 @@
|
|||||||
[:id
|
[:id
|
||||||
:amount
|
:amount
|
||||||
:location
|
:location
|
||||||
:exclude-from-ledger
|
|
||||||
:approval-status
|
:approval-status
|
||||||
[:matched-rule [:note :id]]
|
[:matched-rule [:note :id]]
|
||||||
[:vendor [:name :id]]
|
[:vendor [:name :id]]
|
||||||
|
|||||||
@@ -15,14 +15,13 @@
|
|||||||
(re-frame/reg-sub
|
(re-frame/reg-sub
|
||||||
::submit-query
|
::submit-query
|
||||||
:<- [::forms/form ::form]
|
:<- [::forms/form ::form]
|
||||||
(fn [{{:keys [id vendor accounts exclude-from-ledger approval-status]} :data}]
|
(fn [{{:keys [id vendor accounts approval-status]} :data}]
|
||||||
{:venia/operation {:operation/type :mutation
|
{:venia/operation {:operation/type :mutation
|
||||||
:operation/name "EditTransaction"}
|
:operation/name "EditTransaction"}
|
||||||
:venia/queries [{:query/data
|
:venia/queries [{:query/data
|
||||||
[:edit-transaction
|
[:edit-transaction
|
||||||
{:transaction {:id id
|
{:transaction {:id id
|
||||||
:vendor-id (:id vendor)
|
:vendor-id (:id vendor)
|
||||||
:exclude-from-ledger exclude-from-ledger
|
|
||||||
:approval-status approval-status
|
:approval-status approval-status
|
||||||
:accounts (map
|
:accounts (map
|
||||||
(fn [{:keys [id account amount location]}]
|
(fn [{:keys [id account amount location]}]
|
||||||
@@ -51,7 +50,7 @@
|
|||||||
(-> which
|
(-> which
|
||||||
(select-keys [:vendor :amount :payment :client :description-original
|
(select-keys [:vendor :amount :payment :client :description-original
|
||||||
:yodlee-merchant :id :potential-payment-matches
|
:yodlee-merchant :id :potential-payment-matches
|
||||||
:exclude-from-ledger :location :accounts :approval-status
|
:location :accounts :approval-status
|
||||||
:matched-rule])
|
:matched-rule])
|
||||||
(assoc :potential-payment-matches (if (:matched-rule which)
|
(assoc :potential-payment-matches (if (:matched-rule which)
|
||||||
nil
|
nil
|
||||||
@@ -243,21 +242,7 @@
|
|||||||
:locations locations}]]
|
:locations locations}]]
|
||||||
|
|
||||||
|
|
||||||
[:div.field
|
|
||||||
[:label.checkbox
|
|
||||||
[raw-field
|
|
||||||
[:input
|
|
||||||
{:type "checkbox"
|
|
||||||
:field [:exclude-from-ledger]}]]
|
|
||||||
" Exclude from ledger"]]
|
|
||||||
|
|
||||||
[field "Include in ledger"
|
|
||||||
[button-radio
|
|
||||||
{:type "button-radio"
|
|
||||||
:field [:exclude-from-ledger]
|
|
||||||
:options [[true "Exclude from Ledger"]
|
|
||||||
[false "Include in Ledger"]
|
|
||||||
]}]]
|
|
||||||
|
|
||||||
[field "Approval Status"
|
[field "Approval Status"
|
||||||
[button-radio
|
[button-radio
|
||||||
@@ -265,7 +250,8 @@
|
|||||||
:field [:approval-status]
|
:field [:approval-status]
|
||||||
:options [[:unapproved "Unapproved"]
|
:options [[:unapproved "Unapproved"]
|
||||||
[:requires-feedback "Client Review"]
|
[:requires-feedback "Client Review"]
|
||||||
[:approved "Approved"]]}]]
|
[:approved "Approved"]
|
||||||
|
[:excluded "Excluded from Ledger"]]}]]
|
||||||
|
|
||||||
[:hr]
|
[:hr]
|
||||||
|
|
||||||
|
|||||||
@@ -53,7 +53,7 @@
|
|||||||
:name "456"}
|
:name "456"}
|
||||||
:status "PENDING"
|
:status "PENDING"
|
||||||
:id "6b86b273ff34fce19d6b804eff5a3f5747ada4eaa22f1d49c01e52ddb7875b4b"
|
:id "6b86b273ff34fce19d6b804eff5a3f5747ada4eaa22f1d49c01e52ddb7875b4b"
|
||||||
:exclude-from-ledger false
|
:approval-status :transaction-approval-status/unapproved
|
||||||
:description-simple "simple-description"}]
|
:description-simple "simple-description"}]
|
||||||
result))))
|
result))))
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user