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