diff --git a/apps/dashboard/modules/payment-mades/payment-made-form.tsx b/apps/dashboard/modules/payment-mades/payment-made-form.tsx index de338ea..a50920d 100644 --- a/apps/dashboard/modules/payment-mades/payment-made-form.tsx +++ b/apps/dashboard/modules/payment-mades/payment-made-form.tsx @@ -268,14 +268,14 @@ export function PaymentMadeForm({ resourceId, initialData, onSuccess, billId, ex name="vendor" label="Vendor" required={vendorRequired} - description="Select either a vendor or an employee." + description="Select a vendor, an employee, or both." /> api.employees.list()} mapOption={mapEmployeeOption} diff --git a/apps/dashboard/modules/payment-mades/payment-made.schema.ts b/apps/dashboard/modules/payment-mades/payment-made.schema.ts index a993fd9..c2ca8e3 100644 --- a/apps/dashboard/modules/payment-mades/payment-made.schema.ts +++ b/apps/dashboard/modules/payment-mades/payment-made.schema.ts @@ -66,19 +66,6 @@ const paymentMadeFormSchema = z.object({ message: "Vendor or employee is required", }) } - - if (hasVendor && hasEmployee) { - ctx.addIssue({ - code: z.ZodIssueCode.custom, - path: ["vendor"], - message: "Select either a vendor or an employee, not both", - }) - ctx.addIssue({ - code: z.ZodIssueCode.custom, - path: ["employee"], - message: "Select either a vendor or an employee, not both", - }) - } }) type PaymentMadeFormValues = z.infer