mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-21 15:20:34 +00:00
fix(webapp): use the server formatted value
This commit is contained in:
@@ -63,8 +63,7 @@ export const useBillReadonlyEntriesTableColumns = () => {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
Header: intl.get('rate'),
|
Header: intl.get('rate'),
|
||||||
accessor: 'rate',
|
accessor: 'rate_formatted',
|
||||||
Cell: FormatNumberCell,
|
|
||||||
width: getColumnWidth(entries, 'rate', {
|
width: getColumnWidth(entries, 'rate', {
|
||||||
minWidth: 60,
|
minWidth: 60,
|
||||||
magicSpacing: 5,
|
magicSpacing: 5,
|
||||||
@@ -75,9 +74,8 @@ export const useBillReadonlyEntriesTableColumns = () => {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
Header: intl.get('amount'),
|
Header: intl.get('amount'),
|
||||||
accessor: 'amount',
|
accessor: 'total_formatted',
|
||||||
Cell: FormatNumberCell,
|
width: getColumnWidth(entries, 'total_formatted', {
|
||||||
width: getColumnWidth(entries, 'amount', {
|
|
||||||
minWidth: 60,
|
minWidth: 60,
|
||||||
magicSpacing: 5,
|
magicSpacing: 5,
|
||||||
}),
|
}),
|
||||||
|
|||||||
@@ -60,9 +60,8 @@ export const useCreditNoteReadOnlyEntriesColumns = () => {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
Header: intl.get('rate'),
|
Header: intl.get('rate'),
|
||||||
accessor: 'rate',
|
accessor: 'rate_formatted',
|
||||||
Cell: FormatNumberCell,
|
width: getColumnWidth(entries, 'rate_formatted', {
|
||||||
width: getColumnWidth(entries, 'rate', {
|
|
||||||
minWidth: 60,
|
minWidth: 60,
|
||||||
magicSpacing: 5,
|
magicSpacing: 5,
|
||||||
}),
|
}),
|
||||||
@@ -72,9 +71,8 @@ export const useCreditNoteReadOnlyEntriesColumns = () => {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
Header: intl.get('amount'),
|
Header: intl.get('amount'),
|
||||||
accessor: 'amount',
|
accessor: 'total_formatted',
|
||||||
Cell: FormatNumberCell,
|
width: getColumnWidth(entries, 'total_formatted', {
|
||||||
width: getColumnWidth(entries, 'amount', {
|
|
||||||
minWidth: 60,
|
minWidth: 60,
|
||||||
magicSpacing: 5,
|
magicSpacing: 5,
|
||||||
}),
|
}),
|
||||||
|
|||||||
@@ -47,9 +47,8 @@ export const useEstimateReadonlyEntriesColumns = () => {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
Header: intl.get('rate'),
|
Header: intl.get('rate'),
|
||||||
accessor: 'rate',
|
accessor: 'rate_formatted',
|
||||||
Cell: FormatNumberCell,
|
width: getColumnWidth(entries, 'rate_formatted', {
|
||||||
width: getColumnWidth(entries, 'rate', {
|
|
||||||
minWidth: 60,
|
minWidth: 60,
|
||||||
magicSpacing: 5,
|
magicSpacing: 5,
|
||||||
}),
|
}),
|
||||||
@@ -59,9 +58,9 @@ export const useEstimateReadonlyEntriesColumns = () => {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
Header: intl.get('amount'),
|
Header: intl.get('amount'),
|
||||||
accessor: 'amount',
|
accessor: 'total_formatted',
|
||||||
Cell: FormatNumberCell,
|
Cell: FormatNumberCell,
|
||||||
width: getColumnWidth(entries, 'amount', {
|
width: getColumnWidth(entries, 'total_formatted', {
|
||||||
minWidth: 60,
|
minWidth: 60,
|
||||||
magicSpacing: 5,
|
magicSpacing: 5,
|
||||||
}),
|
}),
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ export function InvoiceDetailTableFooter() {
|
|||||||
<InvoiceTotalLines labelColWidth={'180px'} amountColWidth={'180px'}>
|
<InvoiceTotalLines labelColWidth={'180px'} amountColWidth={'180px'}>
|
||||||
<TotalLine
|
<TotalLine
|
||||||
title={<T id={'invoice.details.subtotal'} />}
|
title={<T id={'invoice.details.subtotal'} />}
|
||||||
value={<FormatNumber value={invoice.subtotal_formatted} />}
|
value={invoice.subtotal_formatted}
|
||||||
borderStyle={TotalLineBorderStyle.SingleDark}
|
borderStyle={TotalLineBorderStyle.SingleDark}
|
||||||
/>
|
/>
|
||||||
{invoice.taxes.map((taxRate) => (
|
{invoice.taxes.map((taxRate) => (
|
||||||
|
|||||||
@@ -64,24 +64,22 @@ export const useInvoiceReadonlyEntriesColumns = () => {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
Header: intl.get('rate'),
|
Header: intl.get('rate'),
|
||||||
accessor: 'rate',
|
accessor: 'rate_formatted',
|
||||||
Cell: FormatNumberCell,
|
|
||||||
align: 'right',
|
align: 'right',
|
||||||
disableSortBy: true,
|
disableSortBy: true,
|
||||||
textOverview: true,
|
textOverview: true,
|
||||||
width: getColumnWidth(entries, 'rate', {
|
width: getColumnWidth(entries, 'rate_formatted', {
|
||||||
minWidth: 60,
|
minWidth: 60,
|
||||||
magicSpacing: 5,
|
magicSpacing: 5,
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Header: intl.get('amount'),
|
Header: intl.get('amount'),
|
||||||
accessor: 'amount',
|
accessor: 'total_formatted',
|
||||||
Cell: FormatNumberCell,
|
|
||||||
align: 'right',
|
align: 'right',
|
||||||
disableSortBy: true,
|
disableSortBy: true,
|
||||||
textOverview: true,
|
textOverview: true,
|
||||||
width: getColumnWidth(entries, 'amount', {
|
width: getColumnWidth(entries, 'total_formatted', {
|
||||||
minWidth: 60,
|
minWidth: 60,
|
||||||
magicSpacing: 5,
|
magicSpacing: 5,
|
||||||
}),
|
}),
|
||||||
|
|||||||
@@ -52,9 +52,8 @@ export const usePaymentMadeEntriesColumns = () => {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
Header: intl.get('payment_amount'),
|
Header: intl.get('payment_amount'),
|
||||||
accessor: 'payment_amount',
|
accessor: 'payment_amount_formatted',
|
||||||
Cell: FormatNumberCell,
|
width: getColumnWidth(entries, 'payment_amount_formatted', {
|
||||||
width: getColumnWidth(entries, 'payment_amount', {
|
|
||||||
minWidth: 60,
|
minWidth: 60,
|
||||||
magicSpacing: 5,
|
magicSpacing: 5,
|
||||||
}),
|
}),
|
||||||
|
|||||||
@@ -63,10 +63,9 @@ export const usePaymentReceiveEntriesColumns = () => {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
Header: intl.get('payment_amount'),
|
Header: intl.get('payment_amount'),
|
||||||
accessor: 'invoice.payment_amount',
|
accessor: 'payment_amount_formatted',
|
||||||
Cell: FormatNumberCell,
|
|
||||||
align: 'right',
|
align: 'right',
|
||||||
width: getColumnWidth(entries, 'invoice.payment_amount', {
|
width: getColumnWidth(entries, 'payment_amount_formatted', {
|
||||||
minWidth: 60,
|
minWidth: 60,
|
||||||
magicSpacing: 5,
|
magicSpacing: 5,
|
||||||
}),
|
}),
|
||||||
|
|||||||
@@ -18,12 +18,9 @@ function ReceiptDetailDrawerProvider({ receiptId, ...props }) {
|
|||||||
const { featureCan } = useFeatureCan();
|
const { featureCan } = useFeatureCan();
|
||||||
|
|
||||||
// Fetch sale receipt details.
|
// Fetch sale receipt details.
|
||||||
const { data: receipt, isFetching: isReceiptLoading } = useReceipt(
|
const { data: receipt, isLoading: isReceiptLoading } = useReceipt(receiptId, {
|
||||||
receiptId,
|
|
||||||
{
|
|
||||||
enabled: !!receiptId,
|
enabled: !!receiptId,
|
||||||
},
|
});
|
||||||
);
|
|
||||||
|
|
||||||
// Provider.
|
// Provider.
|
||||||
const provider = {
|
const provider = {
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ export default function ReceiptDetailTableFooter() {
|
|||||||
<ReceiptTotalLines labelColWidth={'180px'} amountColWidth={'180px'}>
|
<ReceiptTotalLines labelColWidth={'180px'} amountColWidth={'180px'}>
|
||||||
<TotalLine
|
<TotalLine
|
||||||
title={<T id={'receipt.details.subtotal'} />}
|
title={<T id={'receipt.details.subtotal'} />}
|
||||||
value={<FormatNumber value={receipt.amount} />}
|
value={receipt.formatted_amount}
|
||||||
/>
|
/>
|
||||||
<TotalLine
|
<TotalLine
|
||||||
title={<T id={'receipt.details.total'} />}
|
title={<T id={'receipt.details.total'} />}
|
||||||
|
|||||||
@@ -43,8 +43,7 @@ export const useReceiptReadonlyEntriesTableColumns = () => {
|
|||||||
{
|
{
|
||||||
Header: intl.get('rate'),
|
Header: intl.get('rate'),
|
||||||
accessor: 'rate',
|
accessor: 'rate',
|
||||||
Cell: FormatNumberCell,
|
width: getColumnWidth(entries, 'rate_formatted', {
|
||||||
width: getColumnWidth(entries, 'rate', {
|
|
||||||
minWidth: 60,
|
minWidth: 60,
|
||||||
magicSpacing: 5,
|
magicSpacing: 5,
|
||||||
}),
|
}),
|
||||||
@@ -55,8 +54,7 @@ export const useReceiptReadonlyEntriesTableColumns = () => {
|
|||||||
{
|
{
|
||||||
Header: intl.get('amount'),
|
Header: intl.get('amount'),
|
||||||
accessor: 'amount',
|
accessor: 'amount',
|
||||||
Cell: FormatNumberCell,
|
width: getColumnWidth(entries, 'total_formatted', {
|
||||||
width: getColumnWidth(entries, 'amount', {
|
|
||||||
minWidth: 60,
|
minWidth: 60,
|
||||||
magicSpacing: 5,
|
magicSpacing: 5,
|
||||||
}),
|
}),
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ export default function VendorCreditDetailDrawerFooter() {
|
|||||||
<VendorCreditTotalLines labelColWidth={'180px'} amountColWidth={'180px'}>
|
<VendorCreditTotalLines labelColWidth={'180px'} amountColWidth={'180px'}>
|
||||||
<TotalLine
|
<TotalLine
|
||||||
title={<T id={'vendor_credit.drawer.label_subtotal'} />}
|
title={<T id={'vendor_credit.drawer.label_subtotal'} />}
|
||||||
value={<FormatNumber value={vendorCredit.formatted_amount} />}
|
value={vendorCredit.formatted_amount}
|
||||||
borderStyle={TotalLineBorderStyle.SingleDark}
|
borderStyle={TotalLineBorderStyle.SingleDark}
|
||||||
/>
|
/>
|
||||||
<TotalLine
|
<TotalLine
|
||||||
|
|||||||
@@ -61,9 +61,8 @@ export const useVendorCreditReadonlyEntriesTableColumns = () => {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
Header: intl.get('rate'),
|
Header: intl.get('rate'),
|
||||||
accessor: 'rate',
|
accessor: 'rate_formatted',
|
||||||
Cell: FormatNumberCell,
|
width: getColumnWidth(entries, 'rate_formatted', {
|
||||||
width: getColumnWidth(entries, 'rate', {
|
|
||||||
minWidth: 60,
|
minWidth: 60,
|
||||||
magicSpacing: 5,
|
magicSpacing: 5,
|
||||||
}),
|
}),
|
||||||
@@ -73,9 +72,8 @@ export const useVendorCreditReadonlyEntriesTableColumns = () => {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
Header: intl.get('amount'),
|
Header: intl.get('amount'),
|
||||||
accessor: 'amount',
|
accessor: 'total_formatted',
|
||||||
Cell: FormatNumberCell,
|
width: getColumnWidth(entries, 'total_formatted', {
|
||||||
width: getColumnWidth(entries, 'amount', {
|
|
||||||
minWidth: 60,
|
minWidth: 60,
|
||||||
magicSpacing: 5,
|
magicSpacing: 5,
|
||||||
}),
|
}),
|
||||||
|
|||||||
Reference in New Issue
Block a user