feat(OwnerContributionForm): add exchange rate.

This commit is contained in:
elforjani13
2022-02-27 14:38:47 +02:00
parent 31a5ee6dda
commit cb9c7fcdb6
2 changed files with 10 additions and 9 deletions

View File

@@ -68,6 +68,7 @@ function MoneyInForm({
transaction_number: transactionNo, transaction_number: transactionNo,
}), }),
cashflow_account_id: accountId, cashflow_account_id: accountId,
exchange_rate: 1,
}; };
// Handles the form submit. // Handles the form submit.

View File

@@ -186,19 +186,19 @@ function OwnerContributionFormFields({
</Field> </Field>
{/*------------ exchange rate -----------*/} {/*------------ exchange rate -----------*/}
<If {/* <If
condition={isForeignCurrency( condition={isForeignCurrency(
account?.currency_code, account?.currency_code,
values?.currency_code, values?.currency_code,
)} )}
> > */}
<ExchangeRateInputGroup <ExchangeRateInputGroup
fromCurrency={values?.currency_code} fromCurrency={values?.currency_code}
toCurrency={account?.currency_code} toCurrency={account?.currency_code}
name={'exchange_rate'} name={'exchange_rate'}
formGroupProps={{ label: ' ', inline: false }} formGroupProps={{ label: ' ', inline: false }}
/> />
</If> {/* </If> */}
<Row> <Row>
<Col xs={5}> <Col xs={5}>