mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-20 06:40:31 +00:00
Merge branch 'develop' of https://github.com/bigcapitalhq/client into develop
This commit is contained in:
@@ -89,11 +89,14 @@ export const useAllocateLandedCostEntriesTableColumns = () => {
|
|||||||
accessor: 'rate',
|
accessor: 'rate',
|
||||||
disableSortBy: true,
|
disableSortBy: true,
|
||||||
width: '100',
|
width: '100',
|
||||||
|
align: 'right',
|
||||||
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Header: intl.get('amount'),
|
Header: intl.get('amount'),
|
||||||
accessor: 'amount',
|
accessor: 'amount',
|
||||||
disableSortBy: true,
|
disableSortBy: true,
|
||||||
|
align: 'right',
|
||||||
width: '100',
|
width: '100',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -69,6 +69,11 @@ function BillDetailActionsBar({
|
|||||||
openDialog('quick-payment-made', { billId });
|
openDialog('quick-payment-made', { billId });
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Handle allocate landed cost button click.
|
||||||
|
const handleAllocateCostClick = () => {
|
||||||
|
openDialog('allocate-landed-cost', { billId });
|
||||||
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<DrawerActionsBar>
|
<DrawerActionsBar>
|
||||||
<NavbarGroup>
|
<NavbarGroup>
|
||||||
@@ -106,6 +111,7 @@ function BillDetailActionsBar({
|
|||||||
<BillMenuItem
|
<BillMenuItem
|
||||||
payload={{
|
payload={{
|
||||||
onConvert: handleConvertToVendorCredit,
|
onConvert: handleConvertToVendorCredit,
|
||||||
|
onAllocateLandedCost: handleAllocateCostClick,
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</Can>
|
</Can>
|
||||||
|
|||||||
@@ -40,15 +40,15 @@ function BillPaymentTransactionTable({
|
|||||||
});
|
});
|
||||||
|
|
||||||
// Handles delete bill payment transactions.
|
// Handles delete bill payment transactions.
|
||||||
const handleDeleteBillPaymentTransactons = ({ bill_id }) => {
|
const handleDeleteBillPaymentTransactons = ({ bill_payment_id }) => {
|
||||||
openAlert('bill-delete', {
|
openAlert('payment-made-delete', {
|
||||||
billId: bill_id,
|
paymentMadeId: bill_payment_id,
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
// Handles edit bill payment transactions.
|
// Handles edit bill payment transactions.
|
||||||
const handleEditBillPaymentTransactions = ({ bill_id }) => {
|
const handleEditBillPaymentTransactions = ({ bill_payment_id }) => {
|
||||||
history.push(`/bills/${bill_id}/edit`);
|
history.push(`/payment-mades/${bill_payment_id}/edit`);
|
||||||
closeDrawer('bill-drawer');
|
closeDrawer('bill-drawer');
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { DataTable, Card, FormattedMessage as T } from 'components';
|
import { DataTable, Card, FormattedMessage as T } from 'components';
|
||||||
import { Button, Classes, NavbarGroup } from '@blueprintjs/core';
|
|
||||||
|
|
||||||
import { useLocatedLandedCostColumns, ActionsMenu } from './components';
|
import { useLocatedLandedCostColumns, ActionsMenu } from './components';
|
||||||
import { useBillDrawerContext } from './BillDrawerProvider';
|
import { useBillDrawerContext } from './BillDrawerProvider';
|
||||||
@@ -13,8 +12,7 @@ import { TableStyle } from '../../../common';
|
|||||||
import TableSkeletonRows from 'components/Datatable/TableSkeletonRows';
|
import TableSkeletonRows from 'components/Datatable/TableSkeletonRows';
|
||||||
|
|
||||||
import { compose } from 'utils';
|
import { compose } from 'utils';
|
||||||
import DashboardActionsBar from 'components/Dashboard/DashboardActionsBar';
|
|
||||||
import Icon from 'components/Icon';
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Located landed cost table.
|
* Located landed cost table.
|
||||||
@@ -32,10 +30,7 @@ function LocatedLandedCostTable({
|
|||||||
const columns = useLocatedLandedCostColumns();
|
const columns = useLocatedLandedCostColumns();
|
||||||
const { transactions, billId } = useBillDrawerContext();
|
const { transactions, billId } = useBillDrawerContext();
|
||||||
|
|
||||||
// Handle allocate landed cost button click.
|
|
||||||
const handleAllocateCostClick = () => {
|
|
||||||
openDialog('allocate-landed-cost', { billId });
|
|
||||||
};
|
|
||||||
|
|
||||||
// Handle the transaction delete action.
|
// Handle the transaction delete action.
|
||||||
const handleDeleteTransaction = ({ id }) => {
|
const handleDeleteTransaction = ({ id }) => {
|
||||||
@@ -60,17 +55,6 @@ function LocatedLandedCostTable({
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<DashboardActionsBar>
|
|
||||||
<NavbarGroup>
|
|
||||||
<Button
|
|
||||||
className={Classes.MINIMAL}
|
|
||||||
icon={<Icon icon="receipt-24" />}
|
|
||||||
text={<T id={'allocate_landed_coast'} />}
|
|
||||||
onClick={handleAllocateCostClick}
|
|
||||||
/>
|
|
||||||
</NavbarGroup>
|
|
||||||
</DashboardActionsBar>
|
|
||||||
|
|
||||||
<Card>
|
<Card>
|
||||||
<DataTable
|
<DataTable
|
||||||
columns={columns}
|
columns={columns}
|
||||||
|
|||||||
@@ -101,7 +101,9 @@ export function BillDetailsStatus({ bill }) {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
export const BillMenuItem = ({ payload: { onConvert } }) => {
|
export const BillMenuItem = ({
|
||||||
|
payload: { onConvert, onAllocateLandedCost },
|
||||||
|
}) => {
|
||||||
return (
|
return (
|
||||||
<Popover
|
<Popover
|
||||||
minimal={true}
|
minimal={true}
|
||||||
@@ -112,6 +114,10 @@ export const BillMenuItem = ({ payload: { onConvert } }) => {
|
|||||||
}}
|
}}
|
||||||
content={
|
content={
|
||||||
<Menu>
|
<Menu>
|
||||||
|
<MenuItem
|
||||||
|
onClick={onAllocateLandedCost}
|
||||||
|
text={<T id={'bill.allocate_landed_coast'} />}
|
||||||
|
/>
|
||||||
<MenuItem
|
<MenuItem
|
||||||
onClick={onConvert}
|
onClick={onConvert}
|
||||||
text={<T id={'bill.convert_to_credit_note'} />}
|
text={<T id={'bill.convert_to_credit_note'} />}
|
||||||
|
|||||||
@@ -31,6 +31,10 @@ const commonInvalidateQueries = (queryClient) => {
|
|||||||
queryClient.invalidateQueries(t.RECONCILE_CREDIT_NOTE);
|
queryClient.invalidateQueries(t.RECONCILE_CREDIT_NOTE);
|
||||||
queryClient.invalidateQueries(t.RECONCILE_CREDIT_NOTES);
|
queryClient.invalidateQueries(t.RECONCILE_CREDIT_NOTES);
|
||||||
|
|
||||||
|
// Invalidate invoices.
|
||||||
|
queryClient.invalidateQueries(t.SALE_INVOICES);
|
||||||
|
queryClient.invalidateQueries(t.SALE_INVOICE);
|
||||||
|
|
||||||
// Invalidate financial reports.
|
// Invalidate financial reports.
|
||||||
queryClient.invalidateQueries(t.FINANCIAL_REPORT);
|
queryClient.invalidateQueries(t.FINANCIAL_REPORT);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -31,6 +31,10 @@ const commonInvalidateQueries = (queryClient) => {
|
|||||||
queryClient.invalidateQueries(t.RECONCILE_VENDOR_CREDIT);
|
queryClient.invalidateQueries(t.RECONCILE_VENDOR_CREDIT);
|
||||||
queryClient.invalidateQueries(t.RECONCILE_VENDOR_CREDITS);
|
queryClient.invalidateQueries(t.RECONCILE_VENDOR_CREDITS);
|
||||||
|
|
||||||
|
// Invalidate bills.
|
||||||
|
queryClient.invalidateQueries(t.BILL);
|
||||||
|
queryClient.invalidateQueries(t.BILLS);
|
||||||
|
|
||||||
// Invalidate financial reports.
|
// Invalidate financial reports.
|
||||||
queryClient.invalidateQueries(t.FINANCIAL_REPORT);
|
queryClient.invalidateQueries(t.FINANCIAL_REPORT);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1682,6 +1682,7 @@
|
|||||||
"inventory_adjustment.column.product":"المنتج",
|
"inventory_adjustment.column.product":"المنتج",
|
||||||
"invoice.convert_to_credit_note":"تحويل إلى إشعار دائن",
|
"invoice.convert_to_credit_note":"تحويل إلى إشعار دائن",
|
||||||
"bill.convert_to_credit_note":"تحويل إلى إشعار مدين",
|
"bill.convert_to_credit_note":"تحويل إلى إشعار مدين",
|
||||||
|
"bill.allocate_landed_coast":"تحميل تكلفة اضافية",
|
||||||
"overdue":"متأخرّة",
|
"overdue":"متأخرّة",
|
||||||
"invite_user.label.role_name":"دور المستخدم",
|
"invite_user.label.role_name":"دور المستخدم",
|
||||||
"permissions.column.view": "عرض",
|
"permissions.column.view": "عرض",
|
||||||
|
|||||||
@@ -1670,6 +1670,7 @@
|
|||||||
"inventory_adjustment.column.product":"Product",
|
"inventory_adjustment.column.product":"Product",
|
||||||
"invoice.convert_to_credit_note":"Convert to Credit Note",
|
"invoice.convert_to_credit_note":"Convert to Credit Note",
|
||||||
"bill.convert_to_credit_note":"Convert to Vendor Credit",
|
"bill.convert_to_credit_note":"Convert to Vendor Credit",
|
||||||
|
"bill.allocate_landed_coast":"Allocate Landed Cost",
|
||||||
"overdue":"Overdue",
|
"overdue":"Overdue",
|
||||||
"permissions.column.view": "View",
|
"permissions.column.view": "View",
|
||||||
"permissions.column.full_access": "Full Access",
|
"permissions.column.full_access": "Full Access",
|
||||||
|
|||||||
Reference in New Issue
Block a user