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