Merge branch 'main' into develop
This commit is contained in:
@@ -3,7 +3,7 @@ import React, { useMemo, useCallback } from 'react';
|
|||||||
import moment from 'moment';
|
import moment from 'moment';
|
||||||
import intl from 'react-intl-universal';
|
import intl from 'react-intl-universal';
|
||||||
|
|
||||||
import { If, FormattedMessage as T } from '@/components';
|
import { FormattedMessage as T } from '@/components';
|
||||||
import {
|
import {
|
||||||
FinancialSheetRoot,
|
FinancialSheetRoot,
|
||||||
FinancialSheetFooterCurrentTime,
|
FinancialSheetFooterCurrentTime,
|
||||||
@@ -23,9 +23,7 @@ import {
|
|||||||
export function FinancialSheet({
|
export function FinancialSheet({
|
||||||
companyName,
|
companyName,
|
||||||
sheetType,
|
sheetType,
|
||||||
fromDate,
|
dateText,
|
||||||
toDate,
|
|
||||||
asDate,
|
|
||||||
children,
|
children,
|
||||||
accountingBasis,
|
accountingBasis,
|
||||||
basis,
|
basis,
|
||||||
@@ -34,19 +32,6 @@ export function FinancialSheet({
|
|||||||
currentDate = true,
|
currentDate = true,
|
||||||
className,
|
className,
|
||||||
}) {
|
}) {
|
||||||
const format = 'DD MMMM YYYY';
|
|
||||||
const formattedFromDate = useMemo(
|
|
||||||
() => moment(fromDate).format(format),
|
|
||||||
[fromDate],
|
|
||||||
);
|
|
||||||
const formattedToDate = useMemo(
|
|
||||||
() => moment(toDate).format(format),
|
|
||||||
[toDate],
|
|
||||||
);
|
|
||||||
const formattedAsDate = useMemo(
|
|
||||||
() => moment(asDate).format(format),
|
|
||||||
[asDate],
|
|
||||||
);
|
|
||||||
const methodsLabels = useMemo(
|
const methodsLabels = useMemo(
|
||||||
() => ({
|
() => ({
|
||||||
cash: intl.get('cash'),
|
cash: intl.get('cash'),
|
||||||
@@ -69,15 +54,7 @@ export function FinancialSheet({
|
|||||||
{companyName && <FinancialSheetTitle>{companyName}</FinancialSheetTitle>}
|
{companyName && <FinancialSheetTitle>{companyName}</FinancialSheetTitle>}
|
||||||
{sheetType && <FinancialSheetType>{sheetType}</FinancialSheetType>}
|
{sheetType && <FinancialSheetType>{sheetType}</FinancialSheetType>}
|
||||||
|
|
||||||
<FinancialSheetDate>
|
{dateText && <FinancialSheetDate>{dateText}</FinancialSheetDate>}
|
||||||
<If condition={asDate}>
|
|
||||||
<T id={'as'} /> {formattedAsDate}
|
|
||||||
</If>
|
|
||||||
<If condition={fromDate && toDate}>
|
|
||||||
<T id={'from'} /> {formattedFromDate} | <T id={'to'} />{' '}
|
|
||||||
{formattedToDate}
|
|
||||||
</If>
|
|
||||||
</FinancialSheetDate>
|
|
||||||
|
|
||||||
<FinancialSheetTable>{children}</FinancialSheetTable>
|
<FinancialSheetTable>{children}</FinancialSheetTable>
|
||||||
<FinancialSheetAccountingBasis>
|
<FinancialSheetAccountingBasis>
|
||||||
|
|||||||
+2
-2
@@ -20,7 +20,7 @@ export default function APAgingSummaryTable({
|
|||||||
}) {
|
}) {
|
||||||
// AP aging summary report content.
|
// AP aging summary report content.
|
||||||
const {
|
const {
|
||||||
APAgingSummary: { table, query },
|
APAgingSummary: { table, query, meta },
|
||||||
isAPAgingLoading,
|
isAPAgingLoading,
|
||||||
} = useAPAgingSummaryContext();
|
} = useAPAgingSummaryContext();
|
||||||
|
|
||||||
@@ -31,7 +31,7 @@ export default function APAgingSummaryTable({
|
|||||||
<FinancialSheet
|
<FinancialSheet
|
||||||
companyName={organizationName}
|
companyName={organizationName}
|
||||||
sheetType={intl.get('payable_aging_summary')}
|
sheetType={intl.get('payable_aging_summary')}
|
||||||
asDate={query.as_date}
|
dateText={meta?.formatted_date_range ?? meta?.formatted_as_date}
|
||||||
loading={isAPAgingLoading}
|
loading={isAPAgingLoading}
|
||||||
>
|
>
|
||||||
<APAgingSummaryDataTable
|
<APAgingSummaryDataTable
|
||||||
|
|||||||
+2
-2
@@ -20,7 +20,7 @@ export default function ReceivableAgingSummaryTable({
|
|||||||
}) {
|
}) {
|
||||||
// AR aging summary report context.
|
// AR aging summary report context.
|
||||||
const {
|
const {
|
||||||
ARAgingSummary: { table, query },
|
ARAgingSummary: { table, query, meta },
|
||||||
isARAgingLoading,
|
isARAgingLoading,
|
||||||
} = useARAgingSummaryContext();
|
} = useARAgingSummaryContext();
|
||||||
|
|
||||||
@@ -31,7 +31,7 @@ export default function ReceivableAgingSummaryTable({
|
|||||||
<FinancialSheet
|
<FinancialSheet
|
||||||
companyName={organizationName}
|
companyName={organizationName}
|
||||||
sheetType={intl.get('receivable_aging_summary')}
|
sheetType={intl.get('receivable_aging_summary')}
|
||||||
asDate={query.as_date}
|
dateText={meta?.formatted_date_range ?? meta?.formatted_as_date}
|
||||||
loading={isARAgingLoading}
|
loading={isARAgingLoading}
|
||||||
>
|
>
|
||||||
<ARAgingSummaryDataTable
|
<ARAgingSummaryDataTable
|
||||||
|
|||||||
+2
-2
@@ -18,7 +18,7 @@ export default function BalanceSheetTable({
|
|||||||
}) {
|
}) {
|
||||||
// Balance sheet context.
|
// Balance sheet context.
|
||||||
const {
|
const {
|
||||||
balanceSheet: { table, query },
|
balanceSheet: { table, query, meta },
|
||||||
} = useBalanceSheetContext();
|
} = useBalanceSheetContext();
|
||||||
|
|
||||||
// Retrieve the database columns.
|
// Retrieve the database columns.
|
||||||
@@ -34,7 +34,7 @@ export default function BalanceSheetTable({
|
|||||||
<FinancialSheet
|
<FinancialSheet
|
||||||
companyName={companyName}
|
companyName={companyName}
|
||||||
sheetType={intl.get('balance_sheet')}
|
sheetType={intl.get('balance_sheet')}
|
||||||
asDate={query.to_date}
|
dateText={meta?.formatted_date_range ?? meta?.formatted_as_date}
|
||||||
basis={query.basis}
|
basis={query.basis}
|
||||||
>
|
>
|
||||||
<BalanceSheetDataTable
|
<BalanceSheetDataTable
|
||||||
|
|||||||
+2
-3
@@ -18,7 +18,7 @@ export default function CashFlowStatementTable({
|
|||||||
companyName,
|
companyName,
|
||||||
}) {
|
}) {
|
||||||
const {
|
const {
|
||||||
cashFlowStatement: { tableRows },
|
cashFlowStatement: { tableRows, meta },
|
||||||
query,
|
query,
|
||||||
} = useCashFlowStatementContext();
|
} = useCashFlowStatementContext();
|
||||||
|
|
||||||
@@ -32,8 +32,7 @@ export default function CashFlowStatementTable({
|
|||||||
<FinancialSheet
|
<FinancialSheet
|
||||||
companyName={companyName}
|
companyName={companyName}
|
||||||
sheetType={intl.get('statement_of_cash_flow')}
|
sheetType={intl.get('statement_of_cash_flow')}
|
||||||
fromDate={query.from_date}
|
dateText={meta?.formatted_date_range ?? meta?.formatted_as_date}
|
||||||
toDate={query.to_date}
|
|
||||||
basis={query.basis}
|
basis={query.basis}
|
||||||
>
|
>
|
||||||
<CashflowStatementDataTable
|
<CashflowStatementDataTable
|
||||||
|
|||||||
+2
-2
@@ -18,7 +18,7 @@ export default function CustomersBalanceSummaryTable({
|
|||||||
companyName,
|
companyName,
|
||||||
}) {
|
}) {
|
||||||
const {
|
const {
|
||||||
CustomerBalanceSummary: { table, query },
|
CustomerBalanceSummary: { table, query, meta },
|
||||||
} = useCustomersBalanceSummaryContext();
|
} = useCustomersBalanceSummaryContext();
|
||||||
|
|
||||||
// Retrieves the customers summary columns.
|
// Retrieves the customers summary columns.
|
||||||
@@ -28,7 +28,7 @@ export default function CustomersBalanceSummaryTable({
|
|||||||
<FinancialSheet
|
<FinancialSheet
|
||||||
companyName={companyName}
|
companyName={companyName}
|
||||||
sheetType={intl.get('customers_balance_summary')}
|
sheetType={intl.get('customers_balance_summary')}
|
||||||
asDate={query.as_date}
|
dateText={meta?.formatted_date_range ?? meta?.formatted_as_date}
|
||||||
>
|
>
|
||||||
<CustomerBalanceDataTable
|
<CustomerBalanceDataTable
|
||||||
columns={columns}
|
columns={columns}
|
||||||
|
|||||||
+2
-3
@@ -20,7 +20,7 @@ export default function CustomersTransactionsTable({
|
|||||||
}) {
|
}) {
|
||||||
// Customers transactions context.
|
// Customers transactions context.
|
||||||
const {
|
const {
|
||||||
customersTransactions: { tableRows },
|
customersTransactions: { tableRows, meta },
|
||||||
query,
|
query,
|
||||||
} = useCustomersTransactionsContext();
|
} = useCustomersTransactionsContext();
|
||||||
|
|
||||||
@@ -36,8 +36,7 @@ export default function CustomersTransactionsTable({
|
|||||||
<FinancialSheet
|
<FinancialSheet
|
||||||
companyName={companyName}
|
companyName={companyName}
|
||||||
sheetType={intl.get('customers_transactions')}
|
sheetType={intl.get('customers_transactions')}
|
||||||
fromDate={query.from_date}
|
dateText={meta?.formatted_date_range ?? meta?.formatted_as_date}
|
||||||
toDate={query.to_date}
|
|
||||||
fullWidth={true}
|
fullWidth={true}
|
||||||
>
|
>
|
||||||
<CustomersTransactionsDataTable
|
<CustomersTransactionsDataTable
|
||||||
|
|||||||
+2
-3
@@ -21,7 +21,7 @@ import { useGeneralLedgerTableColumns } from './dynamicColumns';
|
|||||||
export default function GeneralLedgerTable({ companyName }) {
|
export default function GeneralLedgerTable({ companyName }) {
|
||||||
// General ledger context.
|
// General ledger context.
|
||||||
const {
|
const {
|
||||||
generalLedger: { query, table },
|
generalLedger: { query, table, meta },
|
||||||
isLoading,
|
isLoading,
|
||||||
} = useGeneralLedgerContext();
|
} = useGeneralLedgerContext();
|
||||||
|
|
||||||
@@ -38,8 +38,7 @@ export default function GeneralLedgerTable({ companyName }) {
|
|||||||
<FinancialSheet
|
<FinancialSheet
|
||||||
companyName={companyName}
|
companyName={companyName}
|
||||||
sheetType={intl.get('general_ledger_sheet')}
|
sheetType={intl.get('general_ledger_sheet')}
|
||||||
fromDate={query.from_date}
|
dateText={meta?.formatted_date_range ?? meta?.formatted_as_date}
|
||||||
toDate={query.to_date}
|
|
||||||
loading={isLoading}
|
loading={isLoading}
|
||||||
fullWidth={true}
|
fullWidth={true}
|
||||||
>
|
>
|
||||||
|
|||||||
+2
-3
@@ -18,7 +18,7 @@ export function InventoryItemDetailsTable({
|
|||||||
companyName,
|
companyName,
|
||||||
}) {
|
}) {
|
||||||
const {
|
const {
|
||||||
inventoryItemDetails: { tableRows },
|
inventoryItemDetails: { tableRows, meta },
|
||||||
isInventoryItemDetailsLoading,
|
isInventoryItemDetailsLoading,
|
||||||
query,
|
query,
|
||||||
} = useInventoryItemDetailsContext();
|
} = useInventoryItemDetailsContext();
|
||||||
@@ -35,8 +35,7 @@ export function InventoryItemDetailsTable({
|
|||||||
companyName={companyName}
|
companyName={companyName}
|
||||||
sheetType={intl.get('inventory_item_details')}
|
sheetType={intl.get('inventory_item_details')}
|
||||||
loading={isInventoryItemDetailsLoading}
|
loading={isInventoryItemDetailsLoading}
|
||||||
fromDate={query.fromDate}
|
dateText={meta?.formatted_date_range ?? meta?.formatted_as_date}
|
||||||
toDate={query.toDate}
|
|
||||||
fullWidth={true}
|
fullWidth={true}
|
||||||
>
|
>
|
||||||
<InventoryItemDetailsDataTable
|
<InventoryItemDetailsDataTable
|
||||||
|
|||||||
+2
-2
@@ -19,7 +19,7 @@ export default function InventoryValuationTable({
|
|||||||
}) {
|
}) {
|
||||||
// Inventory valuation context.
|
// Inventory valuation context.
|
||||||
const {
|
const {
|
||||||
inventoryValuation: { table, query },
|
inventoryValuation: { table, query, meta },
|
||||||
isLoading,
|
isLoading,
|
||||||
} = useInventoryValuationContext();
|
} = useInventoryValuationContext();
|
||||||
|
|
||||||
@@ -30,7 +30,7 @@ export default function InventoryValuationTable({
|
|||||||
<InventoryValuationSheet
|
<InventoryValuationSheet
|
||||||
companyName={companyName}
|
companyName={companyName}
|
||||||
sheetType={intl.get('inventory_valuation')}
|
sheetType={intl.get('inventory_valuation')}
|
||||||
asDate={query.as_date}
|
dateText={meta?.formatted_date_range ?? meta?.formatted_as_date}
|
||||||
loading={isLoading}
|
loading={isLoading}
|
||||||
>
|
>
|
||||||
<InventoryValuationDataTable
|
<InventoryValuationDataTable
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ import { useJournalSheetColumns } from './dynamicColumns';
|
|||||||
export function JournalTable({ companyName }) {
|
export function JournalTable({ companyName }) {
|
||||||
// Journal sheet context.
|
// Journal sheet context.
|
||||||
const {
|
const {
|
||||||
journalSheet: { table, query },
|
journalSheet: { table, query, meta },
|
||||||
isLoading,
|
isLoading,
|
||||||
} = useJournalSheetContext();
|
} = useJournalSheetContext();
|
||||||
|
|
||||||
@@ -37,8 +37,7 @@ export function JournalTable({ companyName }) {
|
|||||||
<FinancialSheet
|
<FinancialSheet
|
||||||
companyName={companyName}
|
companyName={companyName}
|
||||||
sheetType={intl.get('journal_sheet')}
|
sheetType={intl.get('journal_sheet')}
|
||||||
fromDate={query.from_date}
|
dateText={meta?.formatted_date_range ?? meta?.formatted_as_date}
|
||||||
toDate={query.to_date}
|
|
||||||
loading={isLoading}
|
loading={isLoading}
|
||||||
fullWidth={true}
|
fullWidth={true}
|
||||||
name="journal"
|
name="journal"
|
||||||
|
|||||||
+2
-3
@@ -19,7 +19,7 @@ export default function ProfitLossSheetTable({
|
|||||||
}) {
|
}) {
|
||||||
// Profit/Loss sheet context.
|
// Profit/Loss sheet context.
|
||||||
const {
|
const {
|
||||||
profitLossSheet: { table, query },
|
profitLossSheet: { table, query, meta },
|
||||||
} = useProfitLossSheetContext();
|
} = useProfitLossSheetContext();
|
||||||
|
|
||||||
// Retrieves the profit/loss table columns.
|
// Retrieves the profit/loss table columns.
|
||||||
@@ -35,8 +35,7 @@ export default function ProfitLossSheetTable({
|
|||||||
<FinancialSheet
|
<FinancialSheet
|
||||||
companyName={companyName}
|
companyName={companyName}
|
||||||
sheetType={<T id={'profit_loss_sheet'} />}
|
sheetType={<T id={'profit_loss_sheet'} />}
|
||||||
fromDate={query.from_date}
|
dateText={meta?.formatted_date_range ?? meta?.formatted_as_date}
|
||||||
toDate={query.to_date}
|
|
||||||
basis={query.basis}
|
basis={query.basis}
|
||||||
>
|
>
|
||||||
<ProfitLossDataTable
|
<ProfitLossDataTable
|
||||||
|
|||||||
+2
-3
@@ -18,7 +18,7 @@ export default function ProjectProfitabilitySummaryTable({
|
|||||||
}) {
|
}) {
|
||||||
// Project profitability summary context.
|
// Project profitability summary context.
|
||||||
const {
|
const {
|
||||||
projectProfitabilitySummary: { tableRows },
|
projectProfitabilitySummary: { tableRows, meta },
|
||||||
query,
|
query,
|
||||||
} = useProjectProfitabilitySummaryContext();
|
} = useProjectProfitabilitySummaryContext();
|
||||||
|
|
||||||
@@ -29,8 +29,7 @@ export default function ProjectProfitabilitySummaryTable({
|
|||||||
<FinancialSheet
|
<FinancialSheet
|
||||||
companyName={companyName}
|
companyName={companyName}
|
||||||
sheetType={intl.get('project_profitability_summary')}
|
sheetType={intl.get('project_profitability_summary')}
|
||||||
fromDate={query.from_date}
|
dateText={meta?.formatted_date_range ?? meta?.formatted_as_date}
|
||||||
toDate={query.to_date}
|
|
||||||
basis={query.basis}
|
basis={query.basis}
|
||||||
name="project-profitability-summary"
|
name="project-profitability-summary"
|
||||||
>
|
>
|
||||||
|
|||||||
+2
-3
@@ -17,7 +17,7 @@ import { usePurchasesByItemsTableColumns } from './dynamicColumns';
|
|||||||
export default function PurchasesByItemsTable({ companyName }) {
|
export default function PurchasesByItemsTable({ companyName }) {
|
||||||
// Purchases by items context.
|
// Purchases by items context.
|
||||||
const {
|
const {
|
||||||
purchaseByItems: { table, query },
|
purchaseByItems: { table, query, meta },
|
||||||
} = usePurchaseByItemsContext();
|
} = usePurchaseByItemsContext();
|
||||||
|
|
||||||
// Purchases by items table columns.
|
// Purchases by items table columns.
|
||||||
@@ -27,8 +27,7 @@ export default function PurchasesByItemsTable({ companyName }) {
|
|||||||
<PurchasesByItemsSheet
|
<PurchasesByItemsSheet
|
||||||
companyName={companyName}
|
companyName={companyName}
|
||||||
sheetType={intl.get('purchases_by_items')}
|
sheetType={intl.get('purchases_by_items')}
|
||||||
fromDate={query.from_date}
|
dateText={meta?.formatted_date_range ?? meta?.formatted_as_date}
|
||||||
toDate={query.to_date}
|
|
||||||
>
|
>
|
||||||
<PurchasesByItemsDataTable
|
<PurchasesByItemsDataTable
|
||||||
columns={columns}
|
columns={columns}
|
||||||
|
|||||||
+2
-3
@@ -15,7 +15,7 @@ import { TableStyle } from '@/constants';
|
|||||||
export default function SalesByItemsTable({ companyName }) {
|
export default function SalesByItemsTable({ companyName }) {
|
||||||
// Sales by items context.
|
// Sales by items context.
|
||||||
const {
|
const {
|
||||||
salesByItems: { table, query },
|
salesByItems: { table, query, meta },
|
||||||
isLoading,
|
isLoading,
|
||||||
} = useSalesByItemsContext();
|
} = useSalesByItemsContext();
|
||||||
|
|
||||||
@@ -26,8 +26,7 @@ export default function SalesByItemsTable({ companyName }) {
|
|||||||
<SalesByItemsSheet
|
<SalesByItemsSheet
|
||||||
companyName={companyName}
|
companyName={companyName}
|
||||||
sheetType={intl.get('sales_by_items')}
|
sheetType={intl.get('sales_by_items')}
|
||||||
fromDate={query.from_date}
|
dateText={meta?.formatted_date_range ?? meta?.formatted_as_date}
|
||||||
toDate={query.to_date}
|
|
||||||
loading={isLoading}
|
loading={isLoading}
|
||||||
>
|
>
|
||||||
<SalesByItemsDataTable
|
<SalesByItemsDataTable
|
||||||
|
|||||||
+2
-3
@@ -19,7 +19,7 @@ function SalesTaxLiabilitySummaryTableRoot({
|
|||||||
}) {
|
}) {
|
||||||
// Balance sheet context.
|
// Balance sheet context.
|
||||||
const {
|
const {
|
||||||
salesTaxLiabilitySummary: { table, query },
|
salesTaxLiabilitySummary: { table, query, meta },
|
||||||
} = useSalesTaxLiabilitySummaryContext();
|
} = useSalesTaxLiabilitySummaryContext();
|
||||||
|
|
||||||
// Retrieve the database columns.
|
// Retrieve the database columns.
|
||||||
@@ -35,8 +35,7 @@ function SalesTaxLiabilitySummaryTableRoot({
|
|||||||
<FinancialSheet
|
<FinancialSheet
|
||||||
companyName={organizationName}
|
companyName={organizationName}
|
||||||
sheetType={'Sales Tax Liability Summary'}
|
sheetType={'Sales Tax Liability Summary'}
|
||||||
fromDate={query.from_date}
|
dateText={meta?.formatted_date_range ?? meta?.formatted_as_date}
|
||||||
toDate={query.to_date}
|
|
||||||
basis={''}
|
basis={''}
|
||||||
>
|
>
|
||||||
<SalesTaxLiabilitySummaryDataTable
|
<SalesTaxLiabilitySummaryDataTable
|
||||||
|
|||||||
+2
-3
@@ -16,7 +16,7 @@ import { useTrialBalanceSheetTableColumns } from './hooks';
|
|||||||
export default function TrialBalanceSheetTable({ companyName }) {
|
export default function TrialBalanceSheetTable({ companyName }) {
|
||||||
// Trial balance sheet context.
|
// Trial balance sheet context.
|
||||||
const {
|
const {
|
||||||
trialBalanceSheet: { table, query },
|
trialBalanceSheet: { table, query, meta },
|
||||||
isLoading,
|
isLoading,
|
||||||
} = useTrialBalanceSheetContext();
|
} = useTrialBalanceSheetContext();
|
||||||
|
|
||||||
@@ -27,8 +27,7 @@ export default function TrialBalanceSheetTable({ companyName }) {
|
|||||||
<FinancialSheet
|
<FinancialSheet
|
||||||
companyName={companyName}
|
companyName={companyName}
|
||||||
sheetType={intl.get('trial_balance_sheet')}
|
sheetType={intl.get('trial_balance_sheet')}
|
||||||
fromDate={query.from_date}
|
dateText={meta?.formatted_date_range ?? meta?.formatted_as_date}
|
||||||
toDate={query.to_date}
|
|
||||||
name="trial-balance"
|
name="trial-balance"
|
||||||
loading={isLoading}
|
loading={isLoading}
|
||||||
basis={'cash'}
|
basis={'cash'}
|
||||||
|
|||||||
+2
-2
@@ -17,7 +17,7 @@ export default function VendorsBalanceSummaryTable({
|
|||||||
organizationName,
|
organizationName,
|
||||||
}) {
|
}) {
|
||||||
const {
|
const {
|
||||||
VendorBalanceSummary: { table, query },
|
VendorBalanceSummary: { table, query, meta },
|
||||||
} = useVendorsBalanceSummaryContext();
|
} = useVendorsBalanceSummaryContext();
|
||||||
|
|
||||||
// vendors balance summary columns.
|
// vendors balance summary columns.
|
||||||
@@ -27,7 +27,7 @@ export default function VendorsBalanceSummaryTable({
|
|||||||
<VendorBalanceFinancialSheet
|
<VendorBalanceFinancialSheet
|
||||||
companyName={organizationName}
|
companyName={organizationName}
|
||||||
sheetType={intl.get('vendors_balance_summary')}
|
sheetType={intl.get('vendors_balance_summary')}
|
||||||
asDate={query.as_date}
|
dateText={meta?.formatted_date_range ?? meta?.formatted_as_date}
|
||||||
>
|
>
|
||||||
<VendorBalanceDataTable
|
<VendorBalanceDataTable
|
||||||
columns={columns}
|
columns={columns}
|
||||||
|
|||||||
+2
-3
@@ -23,7 +23,7 @@ export default function VendorsTransactionsTable({
|
|||||||
const { vendorsTransactions, isVendorsTransactionsLoading } =
|
const { vendorsTransactions, isVendorsTransactionsLoading } =
|
||||||
useVendorsTransactionsContext();
|
useVendorsTransactionsContext();
|
||||||
|
|
||||||
const { table, query } = vendorsTransactions;
|
const { table, query, meta } = vendorsTransactions;
|
||||||
|
|
||||||
// Retireve vendor transactions table columns.
|
// Retireve vendor transactions table columns.
|
||||||
const columns = useVendorsTransactionsColumns();
|
const columns = useVendorsTransactionsColumns();
|
||||||
@@ -39,8 +39,7 @@ export default function VendorsTransactionsTable({
|
|||||||
companyName={companyName}
|
companyName={companyName}
|
||||||
sheetType={intl.get('vendors_transactions')}
|
sheetType={intl.get('vendors_transactions')}
|
||||||
loading={isVendorsTransactionsLoading}
|
loading={isVendorsTransactionsLoading}
|
||||||
fromDate={query.from_date}
|
dateText={meta?.formatted_date_range ?? meta?.formatted_as_date}
|
||||||
toDate={query.to_date}
|
|
||||||
fullWidth={true}
|
fullWidth={true}
|
||||||
>
|
>
|
||||||
<VendorsTransactionsDataTable
|
<VendorsTransactionsDataTable
|
||||||
|
|||||||
@@ -22,10 +22,12 @@ export function useCustomerBalanceSummaryReport(query, props) {
|
|||||||
select: (res) => ({
|
select: (res) => ({
|
||||||
query: res.data.query,
|
query: res.data.query,
|
||||||
table: res.data.table,
|
table: res.data.table,
|
||||||
|
meta: res.data.meta,
|
||||||
}),
|
}),
|
||||||
defaultData: {
|
defaultData: {
|
||||||
table: {},
|
table: {},
|
||||||
query: {},
|
query: {},
|
||||||
|
meta: {},
|
||||||
},
|
},
|
||||||
...props,
|
...props,
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -22,10 +22,12 @@ export function useCustomersTransactionsReport(query, props) {
|
|||||||
select: (res) => ({
|
select: (res) => ({
|
||||||
data: res.data.table,
|
data: res.data.table,
|
||||||
tableRows: res.data.table.rows,
|
tableRows: res.data.table.rows,
|
||||||
|
meta: res.data.meta,
|
||||||
}),
|
}),
|
||||||
defaultData: {
|
defaultData: {
|
||||||
tableRows: [],
|
tableRows: [],
|
||||||
data: [],
|
data: [],
|
||||||
|
meta: {},
|
||||||
},
|
},
|
||||||
...props,
|
...props,
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -22,10 +22,12 @@ export function useVendorsBalanceSummaryReport(query, props) {
|
|||||||
select: (res) => ({
|
select: (res) => ({
|
||||||
query: res.data.query,
|
query: res.data.query,
|
||||||
table: res.data.table,
|
table: res.data.table,
|
||||||
|
meta: res.data.meta,
|
||||||
}),
|
}),
|
||||||
defaultData: {
|
defaultData: {
|
||||||
table: {},
|
table: {},
|
||||||
query: {},
|
query: {},
|
||||||
|
meta: {},
|
||||||
},
|
},
|
||||||
...props,
|
...props,
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user