fixed perfoma amt and delivery charge validation
This commit is contained in:
parent
2b4f086318
commit
9234253c97
@ -120,7 +120,6 @@ const ManagePurchase = ({ onClose, purchaseId }) => {
|
|||||||
CreateInvoice(formData);
|
CreateInvoice(formData);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
id="wizard-property-listing"
|
id="wizard-property-listing"
|
||||||
|
|||||||
@ -64,12 +64,7 @@ const PurchasePartyDetails = () => {
|
|||||||
{/* Organization */}
|
{/* Organization */}
|
||||||
<div className="col-12 col-md-6">
|
<div className="col-12 col-md-6">
|
||||||
|
|
||||||
{/* <input
|
|
||||||
id="organizationId"
|
|
||||||
type="text"
|
|
||||||
className={`form-control form-control-md `}
|
|
||||||
{...register("organizationId")}
|
|
||||||
/> */}
|
|
||||||
<AppFormController
|
<AppFormController
|
||||||
name="organizationId"
|
name="organizationId"
|
||||||
control={control}
|
control={control}
|
||||||
@ -109,14 +104,12 @@ const PurchasePartyDetails = () => {
|
|||||||
labelKey="name"
|
labelKey="name"
|
||||||
useFetchHook={useGlobaleOrganizations}
|
useFetchHook={useGlobaleOrganizations}
|
||||||
hookParams={[ITEMS_PER_PAGE,1]}
|
hookParams={[ITEMS_PER_PAGE,1]}
|
||||||
errors={errors?.organizationId}
|
errors={errors.supplierId}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
{errors?.supplierId && (
|
|
||||||
<div className="danger-text">{errors.supplierId.message}</div>
|
|
||||||
)}
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Billing Address */}
|
{/* Billing Address */}
|
||||||
@ -209,8 +202,8 @@ const PurchasePartyDetails = () => {
|
|||||||
<Label htmlFor="proformaInvoiceAmountt">Proforma Amount</Label>
|
<Label htmlFor="proformaInvoiceAmountt">Proforma Amount</Label>
|
||||||
<input
|
<input
|
||||||
id="proformaInvoiceAmount"
|
id="proformaInvoiceAmount"
|
||||||
type="text"
|
type="number"
|
||||||
className={`form-control `}
|
className={`form-control form-control-md`}
|
||||||
{...register("proformaInvoiceAmount")}
|
{...register("proformaInvoiceAmount")}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
|||||||
@ -93,7 +93,7 @@ const PurchasePaymentDetails = () => {
|
|||||||
id="transportCharges"
|
id="transportCharges"
|
||||||
type="number"
|
type="number"
|
||||||
className="form-control form-control-md"
|
className="form-control form-control-md"
|
||||||
{...register("transportCharges")}
|
{...register("transportCharges",{ valueAsNumber: true })}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
{errors?.transportCharges && (
|
{errors?.transportCharges && (
|
||||||
|
|||||||
@ -49,7 +49,7 @@ export const PurchaseSchema = z.object({
|
|||||||
|
|
||||||
proformaInvoiceNumber: z.string().nullable(),
|
proformaInvoiceNumber: z.string().nullable(),
|
||||||
proformaInvoiceDate: z.coerce.date().nullable(),
|
proformaInvoiceDate: z.coerce.date().nullable(),
|
||||||
proformaInvoiceAmount: z.number().optional(),
|
proformaInvoiceAmount: z.coerce.number().optional(),
|
||||||
|
|
||||||
invoiceNumber: z.string().nullable(),
|
invoiceNumber: z.string().nullable(),
|
||||||
invoiceDate: z.coerce.date().nullable(),
|
invoiceDate: z.coerce.date().nullable(),
|
||||||
@ -66,7 +66,7 @@ export const PurchaseSchema = z.object({
|
|||||||
transportCharges: z.number().nullable(),
|
transportCharges: z.number().nullable(),
|
||||||
description: z.string().min(1, { message: "Description is required" }),
|
description: z.string().min(1, { message: "Description is required" }),
|
||||||
|
|
||||||
attachments: z.array(AttachmentSchema([], 25)).optional(),
|
// attachments: z.array(AttachmentSchema([], 25)).optional(),
|
||||||
});
|
});
|
||||||
|
|
||||||
// deliveryChallanNo: z
|
// deliveryChallanNo: z
|
||||||
@ -88,7 +88,7 @@ export const defaultPurchaseValue = {
|
|||||||
|
|
||||||
proformaInvoiceNumber: null,
|
proformaInvoiceNumber: null,
|
||||||
proformaInvoiceDate: null,
|
proformaInvoiceDate: null,
|
||||||
proformaInvoiceAmount: null,
|
proformaInvoiceAmount: 0,
|
||||||
|
|
||||||
invoiceNumber: null,
|
invoiceNumber: null,
|
||||||
invoiceDate: null,
|
invoiceDate: null,
|
||||||
@ -105,7 +105,7 @@ export const defaultPurchaseValue = {
|
|||||||
transportCharges: null,
|
transportCharges: null,
|
||||||
description: "",
|
description: "",
|
||||||
|
|
||||||
attachments: [],
|
// attachments: [],
|
||||||
};
|
};
|
||||||
|
|
||||||
export const getStepFields = (stepIndex) => {
|
export const getStepFields = (stepIndex) => {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user