mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-19 06:10:31 +00:00
feat(Sales & Purchases ): add setfieldvalue exchange rate.
This commit is contained in:
@@ -20,6 +20,7 @@ const Schema = Yup.object().shape({
|
||||
reference_no: Yup.string().min(1).max(DATATYPES_LENGTH.STRING).nullable(),
|
||||
// statement: Yup.string().nullable().max(DATATYPES_LENGTH.TEXT),
|
||||
branch_id: Yup.string(),
|
||||
exchange_rate:Yup.number(),
|
||||
entries: Yup.array().of(
|
||||
Yup.object().shape({
|
||||
id: Yup.number().nullable(),
|
||||
|
||||
@@ -73,6 +73,7 @@ function PaymentReceiveHeaderFields({
|
||||
isNewMode,
|
||||
isForeignCustomer,
|
||||
baseCurrency,
|
||||
selectCustomer,
|
||||
setSelectCustomer,
|
||||
} = usePaymentReceiveFormContext();
|
||||
|
||||
@@ -170,8 +171,8 @@ function PaymentReceiveHeaderFields({
|
||||
{/* ----------- Exchange rate ----------- */}
|
||||
<If condition={isForeignCustomer}>
|
||||
<ExchangeRateInputGroup
|
||||
fromCurrency={'USD'}
|
||||
toCurrency={'LYD'}
|
||||
fromCurrency={baseCurrency}
|
||||
toCurrency={selectCustomer?.currency_code}
|
||||
name={'exchange_rate'}
|
||||
formGroupProps={{ label: ' ', inline: true }}
|
||||
/>
|
||||
|
||||
@@ -34,6 +34,7 @@ export const defaultPaymentReceive = {
|
||||
full_amount: '',
|
||||
currency_code: '',
|
||||
branch_id: '',
|
||||
exchange_rate:'',
|
||||
entries: [],
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user