mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-20 23:00:34 +00:00
Fixed Quick Payment Dialogs
PaymentReceives and BillsPayments Controllers expect 'amount' parameter, but webapp sends 'payment_amount'
This commit is contained in:
@@ -3,7 +3,7 @@ import React from 'react';
|
|||||||
import intl from 'react-intl-universal';
|
import intl from 'react-intl-universal';
|
||||||
import { Formik } from 'formik';
|
import { Formik } from 'formik';
|
||||||
import { Intent } from '@blueprintjs/core';
|
import { Intent } from '@blueprintjs/core';
|
||||||
import { pick } from 'lodash';
|
import { pick, omit } from 'lodash';
|
||||||
|
|
||||||
import { AppToaster } from '@/components';
|
import { AppToaster } from '@/components';
|
||||||
import { CreateQuickPaymentMadeFormSchema } from './QuickPaymentMade.schema';
|
import { CreateQuickPaymentMadeFormSchema } from './QuickPaymentMade.schema';
|
||||||
@@ -44,8 +44,9 @@ function QuickPaymentMadeForm({
|
|||||||
}));
|
}));
|
||||||
|
|
||||||
const form = {
|
const form = {
|
||||||
...values,
|
...omit(values, ['payment_amount']),
|
||||||
vendor_id: values?.vendor?.id,
|
vendor_id: values?.vendor?.id,
|
||||||
|
amount: values?.payment_amount,
|
||||||
entries,
|
entries,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -61,11 +61,12 @@ function QuickPaymentReceiveForm({
|
|||||||
}));
|
}));
|
||||||
|
|
||||||
const form = {
|
const form = {
|
||||||
...omit(values, ['payment_receive_no']),
|
...omit(values, ['payment_receive_no', 'payment_amount']),
|
||||||
...(!paymentReceiveAutoIncrement && {
|
...(!paymentReceiveAutoIncrement && {
|
||||||
payment_receive_no: values.payment_receive_no,
|
payment_receive_no: values.payment_receive_no,
|
||||||
}),
|
}),
|
||||||
customer_id: values.customer.id,
|
customer_id: values.customer.id,
|
||||||
|
amount: values.payment_amount,
|
||||||
entries,
|
entries,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user