);
diff --git a/src/components/settings/billing-form.tsx b/src/components/settings/billing-form.tsx
index dccd1d7..821fa34 100644
--- a/src/components/settings/billing-form.tsx
+++ b/src/components/settings/billing-form.tsx
@@ -8,6 +8,16 @@ import type { OrgBilling } from "@/types";
interface Props {
initial: OrgBilling | null;
+ /**
+ * Personal-account (individual customer) flag from the session.
+ * Individuals get a "Full name" field instead of "Company name",
+ * and the VAT input is hidden entirely — they don't have one and
+ * showing the field would only confuse. The underlying column is
+ * still `company_name` in the DB and the invoice PDF; for an
+ * individual that field carries their full name, which is
+ * exactly what should print on the invoice.
+ */
+ isPersonal: boolean;
}
/**
@@ -22,7 +32,7 @@ interface Props {
* On success we router.refresh() the page so the server component
* re-fetches and any "create now" -> "edit" wording flips.
*/
-export function BillingSettingsForm({ initial }: Props) {
+export function BillingSettingsForm({ initial, isPersonal }: Props) {
const t = useTranslations("settingsBilling");
const router = useRouter();
const [form, setForm] = useState({
@@ -78,7 +88,10 @@ export function BillingSettingsForm({ initial }: Props) {
postalCode: form.postalCode.trim(),
city: form.city.trim(),
country: form.country.trim().toUpperCase(),
- vatNumber: form.vatNumber.trim() || null,
+ // Personal accounts never have a VAT number — force null
+ // regardless of stale state, in case a value was stored
+ // before the account got flagged as personal.
+ vatNumber: isPersonal ? null : form.vatNumber.trim() || null,
billingEmail: form.billingEmail.trim(),
notes: form.notes.trim() || null,
}),
@@ -99,7 +112,10 @@ export function BillingSettingsForm({ initial }: Props) {
return (