fix: payment receive subtotal shouldn't be rounded

This commit is contained in:
Ahmed Bouhuolia
2024-02-06 10:54:41 +02:00
parent 528d447443
commit 374f1acf8a
3 changed files with 20 additions and 10 deletions

View File

@@ -3,10 +3,9 @@ import React from 'react';
import styled from 'styled-components';
import {
FormatNumber,
T,
TotalLineTextStyle,
TotalLineBorderStyle,
T,
TotalLine,
TotalLines,
} from '@/components';
@@ -27,7 +26,7 @@ export default function PaymentReceiveDetailTableFooter() {
>
<TotalLine
title={<T id={'payment_receive.details.subtotal'} />}
value={<FormatNumber value={paymentReceive.amount} />}
value={paymentReceive.subtotal_formatted}
/>
<TotalLine
title={<T id={'payment_receive.details.total'} />}

View File

@@ -10,7 +10,7 @@ import {
MenuItem,
Menu,
} from '@blueprintjs/core';
import { Icon, FormatNumberCell } from '@/components';
import { Icon } from '@/components';
import { getColumnWidth } from '@/utils';
import { usePaymentReceiveDetailContext } from './PaymentReceiveDetailProvider';
@@ -40,9 +40,8 @@ export const usePaymentReceiveEntriesColumns = () => {
},
{
Header: intl.get('invoice_amount'),
accessor: 'invoice.balance',
Cell: FormatNumberCell,
width: getColumnWidth(entries, 'invoice.balance', {
accessor: 'invoice.total_formatted',
width: getColumnWidth(entries, 'invoice.total_formatted', {
minWidth: 60,
magicSpacing: 5,
}),
@@ -51,10 +50,9 @@ export const usePaymentReceiveEntriesColumns = () => {
},
{
Header: intl.get('amount_due'),
accessor: 'invoice.due_amount',
Cell: FormatNumberCell,
accessor: 'invoice.due_amount_formatted',
align: 'right',
width: getColumnWidth(entries, 'invoice.due_amount', {
width: getColumnWidth(entries, 'invoice.due_amount_formatted', {
minWidth: 60,
magicSpacing: 5,
}),