diff --git a/src/schemas/invoices.schema.ts b/src/schemas/invoices.schema.ts index b6ae94f..dccfebc 100644 --- a/src/schemas/invoices.schema.ts +++ b/src/schemas/invoices.schema.ts @@ -53,7 +53,7 @@ export const CreateInvoiceSchema = z.object({ // Positional indices of company custom fields to print on this document's PDF. selected_custom_fields: z .array(z.number().int().nonnegative()) - .max(200) + .max(50) .optional(), }); @@ -81,7 +81,7 @@ export const UpdateInvoiceSchema = z.object({ sections: z.array(DocumentSectionSchema).optional(), selected_custom_fields: z .array(z.number().int().nonnegative()) - .max(200) + .max(50) .optional(), }); diff --git a/src/schemas/issued-orders.schema.ts b/src/schemas/issued-orders.schema.ts index f570c47..e137f5f 100644 --- a/src/schemas/issued-orders.schema.ts +++ b/src/schemas/issued-orders.schema.ts @@ -45,7 +45,7 @@ export const CreateIssuedOrderSchema = z.object({ // PDF. Omitted/empty ⇒ none. Update schema derives via .partial(). selected_custom_fields: z .array(z.number().int().nonnegative()) - .max(200) + .max(50) .optional(), }); diff --git a/src/schemas/offers.schema.ts b/src/schemas/offers.schema.ts index 5a52677..427b94f 100644 --- a/src/schemas/offers.schema.ts +++ b/src/schemas/offers.schema.ts @@ -52,7 +52,7 @@ export const CreateQuotationSchema = z.object({ // PDF. Omitted/empty ⇒ none. Update schema derives via .partial(). selected_custom_fields: z .array(z.number().int().nonnegative()) - .max(200) + .max(50) .optional(), }); diff --git a/src/services/issued-orders.service.ts b/src/services/issued-orders.service.ts index 4265942..7925e2c 100644 --- a/src/services/issued-orders.service.ts +++ b/src/services/issued-orders.service.ts @@ -129,6 +129,7 @@ const NON_STATUS_UPDATE_FIELDS = [ "language", "order_text", "internal_notes", + "selected_custom_fields", "items", "sections", ] as const; diff --git a/src/services/offers.service.ts b/src/services/offers.service.ts index 3842a3e..a244c3f 100644 --- a/src/services/offers.service.ts +++ b/src/services/offers.service.ts @@ -68,6 +68,7 @@ const NON_STATUS_UPDATE_FIELDS = [ "language", "scope_title", "scope_description", + "selected_custom_fields", "items", "sections", ] as const;