mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-19 14:20:31 +00:00
fix: auto-increment transaction field
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
// @ts-nocheck
|
||||
import React, { useMemo } from 'react';
|
||||
import { sumBy, isEmpty, defaultTo } from 'lodash';
|
||||
import intl from 'react-intl-universal';
|
||||
import classNames from 'classnames';
|
||||
import { Formik, Form } from 'formik';
|
||||
import { omit, sumBy, pick, isEmpty, defaultTo } from 'lodash';
|
||||
import { Intent } from '@blueprintjs/core';
|
||||
import { useHistory } from 'react-router-dom';
|
||||
import { Intent } from '@blueprintjs/core';
|
||||
|
||||
import '@/style/pages/PaymentReceive/PageForm.scss';
|
||||
|
||||
@@ -69,7 +69,6 @@ function PaymentReceiveForm({
|
||||
paymentReceiveNumberPrefix,
|
||||
paymentReceiveNextNumber,
|
||||
);
|
||||
|
||||
// Form initial values.
|
||||
const initialValues = useMemo(
|
||||
() => ({
|
||||
@@ -114,7 +113,8 @@ function PaymentReceiveForm({
|
||||
const form = transformFormToRequest(values);
|
||||
|
||||
// Handle request response success.
|
||||
const onSaved = (response) => {
|
||||
const onSaved = () => {
|
||||
setSubmitting(false);
|
||||
AppToaster.show({
|
||||
message: intl.get(
|
||||
paymentReceiveId
|
||||
@@ -123,7 +123,6 @@ function PaymentReceiveForm({
|
||||
),
|
||||
intent: Intent.SUCCESS,
|
||||
});
|
||||
setSubmitting(false);
|
||||
|
||||
if (submitPayload.redirect) {
|
||||
history.push('/payment-receives');
|
||||
|
||||
@@ -109,6 +109,7 @@ const PaymentReceivePaymentNoField = R.compose(
|
||||
>
|
||||
<ControlGroup fill={true}>
|
||||
<InputGroup
|
||||
name={'payment_receive_no'}
|
||||
minimal={true}
|
||||
value={values.payment_receive_no}
|
||||
asyncControl={true}
|
||||
@@ -136,7 +137,7 @@ const PaymentReceivePaymentNoField = R.compose(
|
||||
/**
|
||||
* Payment receive header fields.
|
||||
*/
|
||||
export default function PaymentReceiveHeaderFields({}) {
|
||||
export default function PaymentReceiveHeaderFields() {
|
||||
// Payment receive form context.
|
||||
const { customers, accounts, projects, isNewMode } =
|
||||
usePaymentReceiveFormContext();
|
||||
|
||||
Reference in New Issue
Block a user