When the user selects "Bank" as the payment method, the form still validates as if "PayPal" details are required. This causes a Zod validation error, even though PayPal shouldn't be needed in that case.
Steps to Reproduce:
Select "Bank" in the payment method dropdown.
Leave PayPal-related fields empty.
Try to submit the form.
Expected Behavior:
PayPal fields should not be required when "Bank" is selected.
Suggested Fix:
Add conditional logic inside the invoiceSchema to validate only the selected payment method.
When the user selects "Bank" as the payment method, the form still validates as if "PayPal" details are required. This causes a Zod validation error, even though PayPal shouldn't be needed in that case.
Steps to Reproduce:
Select "Bank" in the payment method dropdown.
Leave PayPal-related fields empty.
Try to submit the form.
Expected Behavior:
PayPal fields should not be required when "Bank" is selected.
Suggested Fix:
Add conditional logic inside the invoiceSchema to validate only the selected payment method.