mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-18 13:50:31 +00:00
feat: add reconcile credit note.
This commit is contained in:
@@ -3,7 +3,7 @@ import { useHistory } from 'react-router-dom';
|
||||
import { Formik, Form } from 'formik';
|
||||
import { Intent } from '@blueprintjs/core';
|
||||
import intl from 'react-intl-universal';
|
||||
import { sumBy, omit, isEmpty } from 'lodash';
|
||||
import { isEmpty } from 'lodash';
|
||||
import classNames from 'classnames';
|
||||
import { CLASSES } from 'common/classes';
|
||||
import {
|
||||
|
||||
@@ -105,6 +105,11 @@ function CreditNotesDataTable({
|
||||
openAlert('credit-note-open', { creditNoteId: id });
|
||||
};
|
||||
|
||||
// Handle reconcile credit note.
|
||||
const handleReconcileCreditNote = ({ id }) => {
|
||||
openDialog('reconcile-credit-note', { creditNoteId: id });
|
||||
};
|
||||
|
||||
return (
|
||||
<DashboardContentTable>
|
||||
<DataTable
|
||||
@@ -132,6 +137,7 @@ function CreditNotesDataTable({
|
||||
onEdit: hanldeEditCreditNote,
|
||||
onRefund: handleRefundCreditNote,
|
||||
onOpen: handleOpenCreditNote,
|
||||
onReconcile: handleReconcileCreditNote,
|
||||
}}
|
||||
/>
|
||||
</DashboardContentTable>
|
||||
|
||||
@@ -14,7 +14,7 @@ import {
|
||||
import { safeCallback } from 'utils';
|
||||
|
||||
export function ActionsMenu({
|
||||
payload: { onEdit, onDelete, onRefund, onOpen, onViewDetails },
|
||||
payload: { onEdit, onDelete, onRefund, onOpen, onReconcile, onViewDetails },
|
||||
row: { original },
|
||||
}) {
|
||||
return (
|
||||
@@ -44,7 +44,12 @@ export function ActionsMenu({
|
||||
onClick={safeCallback(onOpen, original)}
|
||||
/>
|
||||
</If>
|
||||
|
||||
<MenuItem
|
||||
text={'Reconcile Credit Note With Invoice'}
|
||||
// icon={<Icon icon="quick-payment-16" />}
|
||||
// text={intl.get('credit_note.action.refund_credit_note')}
|
||||
onClick={safeCallback(onReconcile, original)}
|
||||
/>
|
||||
<MenuItem
|
||||
text={intl.get('credit_note.action.delete_credit_note')}
|
||||
intent={Intent.DANGER}
|
||||
|
||||
Reference in New Issue
Block a user