feat: add reconcile vendor credit.

This commit is contained in:
elforjani13
2021-12-08 14:33:33 +02:00
parent 80b8083059
commit 5963d14fdd
19 changed files with 628 additions and 4 deletions

View File

@@ -104,6 +104,12 @@ function VendorsCreditNoteDataTable({
const handleOpenCreditNote = ({ id }) => {
openAlert('vendor-credit-open', { vendorCreditId: id });
};
// Handle reconcile credit note.
const handleReconcileVendorCredit = ({ id }) => {
openDialog('reconcile-vendor-credit', { vendorCreditId: id });
};
return (
<DashboardContentTable>
<DataTable
@@ -132,6 +138,7 @@ function VendorsCreditNoteDataTable({
onEdit: hanldeEditVendorCreditNote,
onRefund: handleRefundCreditVendor,
onOpen: handleOpenCreditNote,
onReconcile: handleReconcileVendorCredit,
}}
/>
</DashboardContentTable>

View File

@@ -17,7 +17,7 @@ import { safeCallback } from 'utils';
* Actions menu.
*/
export function ActionsMenu({
payload: { onEdit, onDelete, onOpen, onRefund, onViewDetails },
payload: { onEdit, onDelete, onOpen, onRefund, onReconcile, onViewDetails },
row: { original },
}) {
return (
@@ -47,6 +47,12 @@ export function ActionsMenu({
onClick={safeCallback(onOpen, original)}
/>
</If>
<MenuItem
text={'Reconcile Credit Note With bills'}
// icon={<Icon icon="quick-payment-16" />}
// text={intl.get('credit_note.action.refund_credit_note')}
onClick={safeCallback(onReconcile, original)}
/>
<MenuItem
text={intl.get('vendor_credits.action.delete_vendor_credit')}
intent={Intent.DANGER}