Skip to content

Commit

Permalink
fix: lock total column issue
Browse files Browse the repository at this point in the history
  • Loading branch information
alisher-epam committed Nov 19, 2024
1 parent c937b30 commit 7a4e54a
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 21 deletions.
18 changes: 11 additions & 7 deletions src/invoices/InvoiceDetails/Information/Information.js
Original file line number Diff line number Diff line change
Expand Up @@ -184,13 +184,17 @@ const Information = ({
</Row>

<Row>
<Col xs={3}>
<CalculatedExchangeAmount
currency={currency}
exchangeRate={exchangeRate}
total={total}
/>
</Col>
{
exchangeRate && (
<Col xs={3}>
<CalculatedExchangeAmount
currency={currency}
exchangeRate={exchangeRate}
total={total}
/>
</Col>
)
}
{isLockTotal && (
<Col xs={3} data-testid="lock-total-amount">
<KeyValue label={<FormattedMessage id="ui-invoice.invoice.lockTotalAmount" />}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -212,27 +212,29 @@ export const VersionHistoryViewInformation = ({ version = {} }) => {
</Row>

<Row>
<Col xs={3}>
<CalculatedExchangeAmount
currency={currency}
exchangeRate={exchangeRate}
total={total}
name="exchangeRate"
isVersionView
/>
</Col>
</Row>
{isLockTotal && (
<Row>
{
exchangeRate && (
<Col xs={3}>
<CalculatedExchangeAmount
currency={currency}
exchangeRate={exchangeRate}
total={total}
name="exchangeRate"
isVersionView
/>
</Col>
)
}
{isLockTotal && (
<Col xs={3} data-testid="lock-total-amount">
<VersionKeyValue
name="lockTotal"
label={<FormattedMessage id="ui-invoice.invoice.lockTotalAmount" />}
value={<AmountWithCurrencyField amount={lockTotal} currency={currency} />}
/>
</Col>
</Row>
)}
)}
</Row>
</>
);
};
Expand Down

0 comments on commit 7a4e54a

Please sign in to comment.