fix(InvoiceFormHeader): remove terms select field.

This commit is contained in:
a.bouhuolia
2022-03-19 23:14:27 +02:00
parent ca0672509b
commit 7df4cbdf54
2 changed files with 35 additions and 69 deletions

View File

@@ -1,4 +1,4 @@
import React, { useMemo } from 'react';
import React from 'react';
import classNames from 'classnames';
import { useFormikContext } from 'formik';
import intl from 'react-intl-universal';
@@ -6,19 +6,19 @@ import intl from 'react-intl-universal';
import { CLASSES } from 'common/classes';
import InvoiceFormHeaderFields from './InvoiceFormHeaderFields';
import { getEntriesTotal } from 'containers/Entries/utils';
import { PageFormBigNumber } from 'components';
import { useInvoiceTotal } from './utils';
/**
* Invoice form header section.
*/
function InvoiceFormHeader() {
const {
values: { currency_code, entries },
values: { currency_code },
} = useFormikContext();
// Calculate the total due amount of invoice entries.
const totalDueAmount = useMemo(() => getEntriesTotal(entries), [entries]);
const totalDueAmount = useInvoiceTotal();
return (
<div className={classNames(CLASSES.PAGE_FORM_HEADER)}>