diff --git a/src/components/purchase/ManagePurchase.jsx b/src/components/purchase/ManagePurchase.jsx
index 7e470c33..1c76017e 100644
--- a/src/components/purchase/ManagePurchase.jsx
+++ b/src/components/purchase/ManagePurchase.jsx
@@ -120,7 +120,6 @@ const ManagePurchase = ({ onClose, purchaseId }) => {
CreateInvoice(formData);
}
};
-
return (
{
{/* Organization */}
- {/*
*/}
+
{
labelKey="name"
useFetchHook={useGlobaleOrganizations}
hookParams={[ITEMS_PER_PAGE,1]}
- errors={errors?.organizationId}
+ errors={errors.supplierId}
/>
)}
/>
- {errors?.supplierId && (
- {errors.supplierId.message}
- )}
+
{/* Billing Address */}
@@ -209,8 +202,8 @@ const PurchasePartyDetails = () => {
diff --git a/src/components/purchase/PurchasePaymentDetails.jsx b/src/components/purchase/PurchasePaymentDetails.jsx
index b39f8d0e..0d461248 100644
--- a/src/components/purchase/PurchasePaymentDetails.jsx
+++ b/src/components/purchase/PurchasePaymentDetails.jsx
@@ -93,7 +93,7 @@ const PurchasePaymentDetails = () => {
id="transportCharges"
type="number"
className="form-control form-control-md"
- {...register("transportCharges")}
+ {...register("transportCharges",{ valueAsNumber: true })}
/>
{errors?.transportCharges && (
diff --git a/src/components/purchase/PurchaseSchema.jsx b/src/components/purchase/PurchaseSchema.jsx
index 83fd88f8..9322bdc5 100644
--- a/src/components/purchase/PurchaseSchema.jsx
+++ b/src/components/purchase/PurchaseSchema.jsx
@@ -49,7 +49,7 @@ export const PurchaseSchema = z.object({
proformaInvoiceNumber: z.string().nullable(),
proformaInvoiceDate: z.coerce.date().nullable(),
- proformaInvoiceAmount: z.number().optional(),
+ proformaInvoiceAmount: z.coerce.number().optional(),
invoiceNumber: z.string().nullable(),
invoiceDate: z.coerce.date().nullable(),
@@ -66,7 +66,7 @@ export const PurchaseSchema = z.object({
transportCharges: z.number().nullable(),
description: z.string().min(1, { message: "Description is required" }),
- attachments: z.array(AttachmentSchema([], 25)).optional(),
+ // attachments: z.array(AttachmentSchema([], 25)).optional(),
});
// deliveryChallanNo: z
@@ -88,7 +88,7 @@ export const defaultPurchaseValue = {
proformaInvoiceNumber: null,
proformaInvoiceDate: null,
- proformaInvoiceAmount: null,
+ proformaInvoiceAmount: 0,
invoiceNumber: null,
invoiceDate: null,
@@ -105,7 +105,7 @@ export const defaultPurchaseValue = {
transportCharges: null,
description: "",
- attachments: [],
+ // attachments: [],
};
export const getStepFields = (stepIndex) => {