From 192bcdc696946d28b628aac72c0cc9a489883eba Mon Sep 17 00:00:00 2001
From: elforjani13 <39470382+elforjani13@users.noreply.github.com>
Date: Tue, 7 Dec 2021 11:00:57 +0200
Subject: [PATCH] feat: add filterByTypes
---
.../RefundCreditNoteFloatingActions.js | 2 +-
.../RefundCreditNoteDialog/RefundCreditNoteFormFields.js | 6 ++++++
.../RefundVendorCreditFloatingActions.js | 2 +-
.../RefundVendorCreditFormFields.js | 6 ++++++
4 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/src/containers/Dialogs/RefundCreditNoteDialog/RefundCreditNoteFloatingActions.js b/src/containers/Dialogs/RefundCreditNoteDialog/RefundCreditNoteFloatingActions.js
index 13bed0a71..32cb154aa 100644
--- a/src/containers/Dialogs/RefundCreditNoteDialog/RefundCreditNoteFloatingActions.js
+++ b/src/containers/Dialogs/RefundCreditNoteDialog/RefundCreditNoteFloatingActions.js
@@ -34,7 +34,7 @@ function RefundCreditNoteFloatingActions({
}
/>
diff --git a/src/containers/Dialogs/RefundCreditNoteDialog/RefundCreditNoteFormFields.js b/src/containers/Dialogs/RefundCreditNoteDialog/RefundCreditNoteFormFields.js
index 54e7f2730..a8e9eb100 100644
--- a/src/containers/Dialogs/RefundCreditNoteDialog/RefundCreditNoteFormFields.js
+++ b/src/containers/Dialogs/RefundCreditNoteDialog/RefundCreditNoteFormFields.js
@@ -28,6 +28,7 @@ import {
compose,
} from 'utils';
import { useAutofocus } from 'hooks';
+import { ACCOUNT_TYPE } from 'common/accountTypes';
import { useRefundCreditNoteContext } from './RefundCreditNoteFormProvider';
import withSettings from 'containers/Settings/withSettings';
@@ -137,6 +138,11 @@ function RefundCreditNoteFormFields() {
inputProps={{
placeholder: intl.get('select_account'),
}}
+ filterByTypes={[
+ ACCOUNT_TYPE.BANK,
+ ACCOUNT_TYPE.CASH,
+ ACCOUNT_TYPE.FIXED_ASSET,
+ ]}
/>
)}
diff --git a/src/containers/Dialogs/RefundVendorCreditDialog/RefundVendorCreditFloatingActions.js b/src/containers/Dialogs/RefundVendorCreditDialog/RefundVendorCreditFloatingActions.js
index b0f4e8e53..7c43dabcc 100644
--- a/src/containers/Dialogs/RefundVendorCreditDialog/RefundVendorCreditFloatingActions.js
+++ b/src/containers/Dialogs/RefundVendorCreditDialog/RefundVendorCreditFloatingActions.js
@@ -33,7 +33,7 @@ function RefundVendorCreditFloatingActions({
diff --git a/src/containers/Dialogs/RefundVendorCreditDialog/RefundVendorCreditFormFields.js b/src/containers/Dialogs/RefundVendorCreditDialog/RefundVendorCreditFormFields.js
index 4b13496e3..8f59eb472 100644
--- a/src/containers/Dialogs/RefundVendorCreditDialog/RefundVendorCreditFormFields.js
+++ b/src/containers/Dialogs/RefundVendorCreditDialog/RefundVendorCreditFormFields.js
@@ -28,6 +28,7 @@ import {
compose,
} from 'utils';
import { useAutofocus } from 'hooks';
+import { ACCOUNT_TYPE } from 'common/accountTypes';
import { useRefundVendorCreditContext } from './RefundVendorCreditFormProvider';
import withSettings from 'containers/Settings/withSettings';
@@ -138,6 +139,11 @@ function RefundVendorCreditFormFields() {
inputProps={{
placeholder: intl.get('select_account'),
}}
+ filterByTypes={[
+ ACCOUNT_TYPE.BANK,
+ ACCOUNT_TYPE.CASH,
+ ACCOUNT_TYPE.FIXED_ASSET,
+ ]}
/>
)}