Merged in feature/IO-2395-Payment-Expansion-Formating (pull request #973)
IO-2395 Payment Expansion Formatting
This commit is contained in:
@@ -1,15 +1,17 @@
|
||||
import React, { useState } from "react";
|
||||
import { useMutation, useQuery } from "@apollo/client";
|
||||
import { Button, Descriptions, InputNumber, Modal, notification } from "antd";
|
||||
import axios from "axios";
|
||||
import moment from "moment";
|
||||
import React, { useState } from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import {
|
||||
GET_REFUNDABLE_AMOUNT_BY_JOBID,
|
||||
INSERT_PAYMENT_RESPONSE,
|
||||
QUERY_PAYMENT_RESPONSE_BY_PAYMENT_ID,
|
||||
} from "../../graphql/payment_response.queries";
|
||||
import { Button, Descriptions, InputNumber, Modal, notification } from "antd";
|
||||
import moment from "moment";
|
||||
import axios from "axios";
|
||||
import { INSERT_NEW_PAYMENT } from "../../graphql/payments.queries";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import CurrencyFormatter from "../../utils/CurrencyFormatter";
|
||||
import { DateTimeFormatter } from "../../utils/DateFormatter";
|
||||
|
||||
const { confirm } = Modal;
|
||||
|
||||
@@ -137,10 +139,10 @@ const PaymentExpandedRowComponent = ({ record, bodyshop }) => {
|
||||
{payment_response?.response?.nameOnCard ?? ""}
|
||||
</Descriptions.Item>
|
||||
<Descriptions.Item label={t("job_payments.titles.amount")}>
|
||||
{record.amount}
|
||||
<CurrencyFormatter>{record.amount}</CurrencyFormatter>
|
||||
</Descriptions.Item>
|
||||
<Descriptions.Item label={t("job_payments.titles.dateOfPayment")}>
|
||||
{moment(record.created_at).format("YYYY-MM-DD HH:mm:ss")}
|
||||
{<DateTimeFormatter>{record.created_at}</DateTimeFormatter>}
|
||||
</Descriptions.Item>
|
||||
<Descriptions.Item label={t("job_payments.titles.transactionid")}>
|
||||
{record.transactionid}
|
||||
@@ -151,6 +153,9 @@ const PaymentExpandedRowComponent = ({ record, bodyshop }) => {
|
||||
<Descriptions.Item label={t("job_payments.titles.paymenttype")}>
|
||||
{record.type}
|
||||
</Descriptions.Item>
|
||||
<Descriptions.Item label={t("job_payments.titles.paymenttype")}>
|
||||
{record.paymentnum}
|
||||
</Descriptions.Item>
|
||||
{payment_response && (
|
||||
<Descriptions.Item label={t("job_payments.titles.refundamount")}>
|
||||
<InputNumber
|
||||
|
||||
@@ -574,7 +574,6 @@ export const GET_JOB_BY_PK = gql`
|
||||
est_co_nm
|
||||
est_ct_fn
|
||||
est_ct_ln
|
||||
|
||||
est_ph1
|
||||
est_ea
|
||||
selling_dealer
|
||||
@@ -746,6 +745,7 @@ export const GET_JOB_BY_PK = gql`
|
||||
jobid
|
||||
amount
|
||||
payer
|
||||
paymentnum
|
||||
created_at
|
||||
transactionid
|
||||
memo
|
||||
|
||||
@@ -1211,6 +1211,7 @@
|
||||
"payer": "Payer",
|
||||
"payername": "Payer Name",
|
||||
"paymentid": "Payment Reference ID",
|
||||
"paymentnum": "Payment Number",
|
||||
"paymenttype": "Payment Type",
|
||||
"refundamount": "Refund Amount",
|
||||
"transactionid": "Transaction ID"
|
||||
|
||||
@@ -1211,6 +1211,7 @@
|
||||
"payer": "",
|
||||
"payername": "",
|
||||
"paymentid": "",
|
||||
"paymentnum": "",
|
||||
"paymenttype": "",
|
||||
"refundamount": "",
|
||||
"transactionid": ""
|
||||
|
||||
@@ -1211,6 +1211,7 @@
|
||||
"payer": "",
|
||||
"payername": "",
|
||||
"paymentid": "",
|
||||
"paymentnum": "",
|
||||
"paymenttype": "",
|
||||
"refundamount": "",
|
||||
"transactionid": ""
|
||||
|
||||
Reference in New Issue
Block a user