mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-19 14:20:31 +00:00
feat: add convert to credit note.
This commit is contained in:
@@ -74,6 +74,11 @@ function InvoicesDataTable({
|
||||
history.push(`/invoices/${invoice.id}/edit`);
|
||||
};
|
||||
|
||||
// Handle convert to credit note.
|
||||
const handleConvertToCreitNote = ({ id }) => {
|
||||
history.push(`/credit-notes/new?from_invoice_id=${id}`, { invoiceId: id });
|
||||
};
|
||||
|
||||
// handle quick payment receive.
|
||||
const handleQuickPaymentReceive = ({ id }) => {
|
||||
openDialog('quick-payment-receive', { invoiceId: id });
|
||||
@@ -147,6 +152,7 @@ function InvoicesDataTable({
|
||||
onQuick: handleQuickPaymentReceive,
|
||||
onViewDetails: handleViewDetailInvoice,
|
||||
onPrint: handlePrintInvoice,
|
||||
onConvert: handleConvertToCreitNote,
|
||||
}}
|
||||
/>
|
||||
</DashboardContentTable>
|
||||
|
||||
@@ -124,7 +124,7 @@ export function ActionsMenu({
|
||||
onEdit,
|
||||
onDeliver,
|
||||
onDelete,
|
||||
onDrawer,
|
||||
onConvert,
|
||||
onQuick,
|
||||
onViewDetails,
|
||||
onPrint,
|
||||
@@ -145,6 +145,11 @@ export function ActionsMenu({
|
||||
text={intl.get('edit_invoice')}
|
||||
onClick={safeCallback(onEdit, original)}
|
||||
/>
|
||||
<MenuItem
|
||||
icon={<Icon icon="convert_to" />}
|
||||
text={intl.get('convert_to_credit_note')}
|
||||
onClick={safeCallback(onConvert, original)}
|
||||
/>
|
||||
|
||||
<If condition={!original.is_delivered}>
|
||||
<MenuItem
|
||||
|
||||
Reference in New Issue
Block a user