mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-21 23:30:32 +00:00
feat(qucikpayment):fix currency code.
This commit is contained in:
@@ -156,7 +156,7 @@ function QuickPaymentMadeFormFields({
|
|||||||
{/*------------ exchange rate -----------*/}
|
{/*------------ exchange rate -----------*/}
|
||||||
<ExchangeRateMutedField
|
<ExchangeRateMutedField
|
||||||
name={'exchange_rate'}
|
name={'exchange_rate'}
|
||||||
fromCurrency={baseCurrency}
|
fromCurrency={base_currency}
|
||||||
toCurrency={values.currency_code}
|
toCurrency={values.currency_code}
|
||||||
formGroupProps={{ label: '', inline: false }}
|
formGroupProps={{ label: '', inline: false }}
|
||||||
date={values.payment_date}
|
date={values.payment_date}
|
||||||
|
|||||||
@@ -161,7 +161,7 @@ function QuickPaymentReceiveFormFields({
|
|||||||
{/*------------ exchange rate -----------*/}
|
{/*------------ exchange rate -----------*/}
|
||||||
<ExchangeRateMutedField
|
<ExchangeRateMutedField
|
||||||
name={'exchange_rate'}
|
name={'exchange_rate'}
|
||||||
fromCurrency={baseCurrency}
|
fromCurrency={base_currency}
|
||||||
toCurrency={values.currency_code}
|
toCurrency={values.currency_code}
|
||||||
formGroupProps={{ label: '', inline: false }}
|
formGroupProps={{ label: '', inline: false }}
|
||||||
date={values.payment_date}
|
date={values.payment_date}
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { isEmpty } from 'lodash';
|
import { isEmpty } from 'lodash';
|
||||||
|
import { Features } from 'common';
|
||||||
import DashboardInsider from 'components/Dashboard/DashboardInsider';
|
import DashboardInsider from 'components/Dashboard/DashboardInsider';
|
||||||
|
import { useFeatureCan } from 'hooks/state';
|
||||||
import {
|
import {
|
||||||
useResourceViews,
|
useResourceViews,
|
||||||
useResourceMeta,
|
useResourceMeta,
|
||||||
@@ -24,16 +25,26 @@ function WarehouseTransfersListProvider({
|
|||||||
// warehouse transfers refresh action.
|
// warehouse transfers refresh action.
|
||||||
const { refresh } = useRefreshWarehouseTransfers();
|
const { refresh } = useRefreshWarehouseTransfers();
|
||||||
|
|
||||||
|
// Features guard.
|
||||||
|
const { featureCan } = useFeatureCan();
|
||||||
|
|
||||||
|
const isWarehouseFeatureCan = featureCan(Features.Warehouses);
|
||||||
|
|
||||||
// Fetch warehouse transfers list according to the given custom view id.
|
// Fetch warehouse transfers list according to the given custom view id.
|
||||||
const {
|
const {
|
||||||
data: { warehousesTransfers, pagination, filterMeta },
|
data: { warehousesTransfers, pagination, filterMeta },
|
||||||
isFetching: isWarehouseTransfersFetching,
|
isFetching: isWarehouseTransfersFetching,
|
||||||
isLoading: isWarehouseTransfersLoading,
|
isLoading: isWarehouseTransfersLoading,
|
||||||
} = useWarehousesTransfers(query, { keepPreviousData: true });
|
} = useWarehousesTransfers(
|
||||||
|
query,
|
||||||
|
// { keepPreviousData: true },
|
||||||
|
{ enabled: isWarehouseFeatureCan },
|
||||||
|
);
|
||||||
|
|
||||||
// Detarmines the datatable empty status.
|
// Detarmines the datatable empty status.
|
||||||
const isEmptyStatus =
|
const isEmptyStatus =
|
||||||
isEmpty(warehousesTransfers) && !isWarehouseTransfersLoading;
|
(isEmpty(warehousesTransfers) && !isWarehouseTransfersLoading) ||
|
||||||
|
!isWarehouseFeatureCan;
|
||||||
|
|
||||||
// Fetch create notes resource views and fields.
|
// Fetch create notes resource views and fields.
|
||||||
const { data: WarehouseTransferView, isLoading: isViewsLoading } =
|
const { data: WarehouseTransferView, isLoading: isViewsLoading } =
|
||||||
|
|||||||
Reference in New Issue
Block a user