mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-17 21:30:31 +00:00
Fix: Opening balance with Vendor & Customer.
This commit is contained in:
@@ -61,7 +61,7 @@ function CustomerFinancialPanel({
|
||||
{/*------------ Opening balance -----------*/}
|
||||
<FastField name={'opening_balance'}>
|
||||
{({
|
||||
form: { values },
|
||||
form,
|
||||
field,
|
||||
field: { value },
|
||||
meta: { error, touched },
|
||||
@@ -76,12 +76,14 @@ function CustomerFinancialPanel({
|
||||
inline={true}
|
||||
>
|
||||
<ControlGroup>
|
||||
<InputPrependText text={values.currency_code} />
|
||||
<InputPrependText text={form.values.currency_code} />
|
||||
<MoneyInputGroup
|
||||
value={value}
|
||||
inputGroupProps={{ fill: true }}
|
||||
disabled={customerId}
|
||||
{...field}
|
||||
onChange={(balance) => {
|
||||
form.setFieldValue('opening_balance', balance);
|
||||
}}
|
||||
/>
|
||||
</ControlGroup>
|
||||
</FormGroup>
|
||||
|
||||
@@ -63,12 +63,7 @@ function VendorFinanicalPanelTab({
|
||||
</FastField>
|
||||
{/*------------ Opening balance -----------*/}
|
||||
<FastField name={'opening_balance'}>
|
||||
{({
|
||||
form: { values },
|
||||
field,
|
||||
field: { value },
|
||||
meta: { error, touched },
|
||||
}) => (
|
||||
{({ form, field, field: { value }, meta: { error, touched } }) => (
|
||||
<FormGroup
|
||||
label={<T id={'opening_balance'} />}
|
||||
className={classNames(
|
||||
@@ -79,14 +74,15 @@ function VendorFinanicalPanelTab({
|
||||
inline={true}
|
||||
>
|
||||
<ControlGroup>
|
||||
<InputPrependText text={values.currency_code} />
|
||||
<InputPrependText text={form.values.currency_code} />
|
||||
<MoneyInputGroup
|
||||
value={value}
|
||||
onChange={field.onChange}
|
||||
prefix={'$'}
|
||||
inputGroupProps={{
|
||||
fill: true,
|
||||
...field,
|
||||
// ...field,
|
||||
}}
|
||||
onChange={(balance) => {
|
||||
form.setFieldValue('opening_balance', balance);
|
||||
}}
|
||||
disabled={vendorId}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user