diff --git a/src/components/purchase/Purchasetable.jsx b/src/components/purchase/Purchasetable.jsx index 614cc269..abc1176b 100644 --- a/src/components/purchase/Purchasetable.jsx +++ b/src/components/purchase/Purchasetable.jsx @@ -49,6 +49,17 @@ export const PurchaseColumn = [ ); }, }, + { + key: "proformaInvoiceAmount", + label: "Proforma Amount", + className: "text-end", + render: (item) => ( + + {formatFigure(item?.proformaInvoiceAmount, { type: "currency" })} + + ), + }, + { key: "totalAmount", label: "Total Amount", diff --git a/src/components/purchase/ViewPurchase.jsx b/src/components/purchase/ViewPurchase.jsx index 3d5c7507..d2a16ec6 100644 --- a/src/components/purchase/ViewPurchase.jsx +++ b/src/components/purchase/ViewPurchase.jsx @@ -2,7 +2,7 @@ import React from "react"; import { usePurchase } from "../../hooks/usePurchase"; import { SpinnerLoader } from "../common/Loader"; import { formatUTCToLocalTime } from "../../utils/dateUtils"; -import { getColorNameFromHex } from "../../utils/appUtils"; +import { formatFigure, getColorNameFromHex } from "../../utils/appUtils"; const ViewPurchase = ({ purchaseId }) => { const { data, isLoading, isError, error } = usePurchase(purchaseId); @@ -25,11 +25,14 @@ const ViewPurchase = ({ purchaseId }) => {
Purchase Details
Title:
++ Title: +
{data?.title}
Description:
++ Description: +
{data?.description}
Project Name:
++ Project Name: +
{data?.project?.name}
Organization:
++ Organization: +
{data?.organization?.name}
Email:
++ Email: +
{data?.organization?.email}
Contact:
++ Contact: +
{data?.organization?.contactNumber}
Address:
++ Address: +
{data?.organization?.address}
Supplier
{/* Supplier Name */}Name:
++ Name: +
{data?.supplier?.name}
Contact Person:
++ Contact Person: +
{data?.supplier?.contactPerson}
Email:
++ Email: +
{data?.supplier?.email}
Contact:
++ Contact: +
{data?.supplier?.contactNumber}
Address:
++ Address: +
{data?.supplier?.address}
Invoice No:
-{data?.invoiceNumber}
+{data?.invoiceNumber ?? "NA"}
Proforma No:
-{data?.proformaInvoiceNumber}
++ {data?.proformaInvoiceNumber ?? "NA"} +
E-Way Bill:
-{data?.eWayBillNumber}
+{data?.eWayBillNumber ?? "NA"}
PO No:
-{data?.purchaseOrderNumber}
++ {data?.purchaseOrderNumber ?? "NA"} +
Invoice Date:
- {formatUTCToLocalTime(data?.invoiceDate)} + {data?.invoiceDate + ? formatUTCToLocalTime(data?.invoiceDate) + : "NA"}
Proforma Date:
- {formatUTCToLocalTime(data?.proformaInvoiceDate)} + {data?.proformaInvoiceDate + ? formatUTCToLocalTime(data?.proformaInvoiceDate) + : "NA"}
E-Way Date:
- {formatUTCToLocalTime(data?.eWayBillDate)} + {data?.eWayBillDate + ? formatUTCToLocalTime(data?.eWayBillDate) + : "NA"}
PO Date:
- {formatUTCToLocalTime(data?.purchaseOrderDate)} + {data?.purchaseOrderDate + ? formatUTCToLocalTime(data?.purchaseOrderDate) + : "NA"}
Amount Summary
+Proforma Amount
++ {formatFigure(data?.proformaInvoiceAmount, { + type: "currency", + currency: "INR", + })} +
+Base Amount
-₹ {data?.baseAmount}
++ {formatFigure(data?.baseAmount, { + type: "currency", + currency: "INR", + })} +
Tax
-₹ {data?.taxAmount}
++ {formatFigure(data?.taxAmount, { + type: "currency", + currency: "INR", + })} +
Transport
-₹ {data?.transportCharges}
++ {formatFigure(data?.transportCharges, { + type: "currency", + currency: "INR", + })} +