mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-17 21:30:31 +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 { Formik } from 'formik';
|
||||
import { Intent } from '@blueprintjs/core';
|
||||
import { pick } from 'lodash';
|
||||
import { pick, omit } from 'lodash';
|
||||
|
||||
import { AppToaster } from '@/components';
|
||||
import { CreateQuickPaymentMadeFormSchema } from './QuickPaymentMade.schema';
|
||||
@@ -21,7 +21,7 @@ function QuickPaymentMadeForm({
|
||||
// #withDialogActions
|
||||
closeDialog,
|
||||
}) {
|
||||
|
||||
|
||||
const {
|
||||
bill,
|
||||
dialogName,
|
||||
@@ -44,8 +44,9 @@ function QuickPaymentMadeForm({
|
||||
}));
|
||||
|
||||
const form = {
|
||||
...values,
|
||||
...omit(values, ['payment_amount']),
|
||||
vendor_id: values?.vendor?.id,
|
||||
amount: values?.payment_amount,
|
||||
entries,
|
||||
};
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ function QuickPaymentReceiveForm({
|
||||
paymentReceiveNextNumber,
|
||||
preferredDepositAccount
|
||||
}) {
|
||||
|
||||
|
||||
const {
|
||||
dialogName,
|
||||
invoice,
|
||||
@@ -61,11 +61,12 @@ function QuickPaymentReceiveForm({
|
||||
}));
|
||||
|
||||
const form = {
|
||||
...omit(values, ['payment_receive_no']),
|
||||
...omit(values, ['payment_receive_no', 'payment_amount']),
|
||||
...(!paymentReceiveAutoIncrement && {
|
||||
payment_receive_no: values.payment_receive_no,
|
||||
}),
|
||||
customer_id: values.customer.id,
|
||||
amount: values.payment_amount,
|
||||
entries,
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user