diff --git a/src/common/journalTypes.js b/src/common/journalTypes.js
new file mode 100644
index 000000000..4fffeb112
--- /dev/null
+++ b/src/common/journalTypes.js
@@ -0,0 +1,8 @@
+import intl from 'react-intl-universal';
+
+export const journalTypes = [
+ {
+ name: intl.get('journal'),
+ value: 'Journal',
+ },
+];
diff --git a/src/containers/Accounting/MakeJournal/MakeJournalEntriesHeaderFields.js b/src/containers/Accounting/MakeJournal/MakeJournalEntriesHeaderFields.js
index 9e5e3a783..939e834c9 100644
--- a/src/containers/Accounting/MakeJournal/MakeJournalEntriesHeaderFields.js
+++ b/src/containers/Accounting/MakeJournal/MakeJournalEntriesHeaderFields.js
@@ -4,6 +4,7 @@ import {
FormGroup,
Position,
ControlGroup,
+ Classes,
} from '@blueprintjs/core';
import { FastField, ErrorMessage } from 'formik';
import { DateInput } from '@blueprintjs/datetime';
@@ -11,6 +12,8 @@ import { FormattedMessage as T } from 'components';
import classNames from 'classnames';
import { CLASSES } from 'common/classes';
+import { journalTypes } from '../../../common/journalTypes';
+import { FFormGroup } from '../../../components';
import {
momentFormatter,
compose,
@@ -28,12 +31,13 @@ import {
} from 'components';
import withSettings from 'containers/Settings/withSettings';
import { useMakeJournalFormContext } from './MakeJournalProvider';
-import { JournalExchangeRateInputField } from './components';
+import { JournalExchangeRateInputField, JournalTypeSelect } from './components';
import withDialogActions from 'containers/Dialog/withDialogActions';
import {
currenciesFieldShouldUpdate,
useObserveJournalNoSettings,
} from './utils';
+
/**
* Make journal entries header.
*/
@@ -169,21 +173,18 @@ function MakeJournalEntriesHeader({
{/*------------ Journal type -----------*/}
-
- {({ form, field, meta: { error, touched } }) => (
- }
- className={classNames('form-group--account-type', CLASSES.FILL)}
- inline={true}
- >
-
-
- )}
-
+ }
+ inline={true}
+ className={classNames('form-group--select-list', Classes.FILL)}
+ >
+
+
{/*------------ Currency -----------*/}
);
}
+
+/**
+ *
+ * @param {*} query
+ * @param {*} journal
+ * @param {*} _index
+ * @param {*} exactMatch
+ * @returns
+ */
+const itemPredicate = (query, journal, _index, exactMatch) => {
+ const normalizedTitle = journal.name.toLowerCase();
+ const normalizedQuery = query.toLowerCase();
+
+ if (exactMatch) {
+ return normalizedTitle === normalizedQuery;
+ } else {
+ return normalizedTitle.indexOf(normalizedQuery) >= 0;
+ }
+};
+
+/**
+ *
+ * @param {*} item
+ * @param {*} param1
+ * @returns
+ */
+const itemRenderer = (item, { handleClick, modifiers, query }) => {
+ return (
+
+ );
+};
+
+const itemSelectProps = {
+ itemPredicate: itemPredicate,
+ itemRenderer: itemRenderer,
+ valueAccessor: 'name',
+ labelAccessor: 'name',
+};
+
+export function JournalTypeSelect({ items, ...rest }) {
+ return (
+
+ );
+}
+
+/**
+ * @param {*} label
+ * @returns
+ */
+function itemSelectButton({ label }) {
+ return (
+
+ );
+}
diff --git a/src/lang/ar/index.json b/src/lang/ar/index.json
index 9e069b70f..d327a32e2 100644
--- a/src/lang/ar/index.json
+++ b/src/lang/ar/index.json
@@ -1989,6 +1989,7 @@
"payment_made_form.label.total": "إجمالي",
"make_journal.label.subtotal": "المجموع",
"make_journal.label.total": "إجمالي",
+ "make_journal.label.select_journal_type":"حدد نوع القيد",
"expense.label.subtotal": "المجموع",
"expense.label.total": "إجمالي",
"expense.branch_button.label": "الفرع: {label}",
diff --git a/src/lang/en/index.json b/src/lang/en/index.json
index eb8483918..a60b75791 100644
--- a/src/lang/en/index.json
+++ b/src/lang/en/index.json
@@ -1989,6 +1989,7 @@
"payment_made.form.internal_note.placeholder": "Internal note (Not visible to the vendor).",
"make_journal.label.subtotal": "Subtotal",
"make_journal.label.total": "TOTAL",
+ "make_journal.label.select_journal_type":"Select Journal Type",
"expense.label.subtotal": "Subtotal",
"expense.label.total": "TOTAL",
"expense.branch_button.label": "Branch: {label}",