Fixed Quick Payment Dialogs

PaymentReceives and BillsPayments Controllers expect 'amount' parameter, but webapp sends 'payment_amount'
This commit is contained in:
Denis
2024-07-29 22:49:07 +03:00
parent e11f1a95f6
commit 4490c2d4b4
2 changed files with 7 additions and 5 deletions

View File

@@ -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,
};