diff --git a/packages/admin/dashboard/src/routes/orders/order-balance-settlement/components/order-balance-settlement-form/order-balance-settlement-form.tsx b/packages/admin/dashboard/src/routes/orders/order-balance-settlement/components/order-balance-settlement-form/order-balance-settlement-form.tsx index 44cfbf8a92..e9115cf341 100644 --- a/packages/admin/dashboard/src/routes/orders/order-balance-settlement/components/order-balance-settlement-form/order-balance-settlement-form.tsx +++ b/packages/admin/dashboard/src/routes/orders/order-balance-settlement/components/order-balance-settlement-form/order-balance-settlement-form.tsx @@ -40,8 +40,6 @@ const OrderBalanceSettlementSchema = zod.object({ credit_line: zod .object({ amount: zod.string().or(zod.number()).optional(), - reference: zod.string().optional(), - reference_id: zod.string().optional(), note: zod.string().optional(), }) .optional(), @@ -84,8 +82,6 @@ export const OrderBalanceSettlementForm = ({ await createCreditLine( { amount: parseFloat(data.credit_line!.amount! as string) * -1, - reference: data.credit_line!.reference ?? "order", - reference_id: data.credit_line!.reference_id ?? order.id, }, { onSuccess: () => { @@ -332,42 +328,6 @@ export const OrderBalanceSettlementForm = ({ ) }} /> - - { - return ( - - {t("fields.reference")} - - - - - - - - ) - }} - /> - - { - return ( - - {t("fields.reference_id")} - - - - - - - - ) - }} - /> )} diff --git a/packages/core/types/src/order/mutations.ts b/packages/core/types/src/order/mutations.ts index d546f7b1a4..c44d5a4b7e 100644 --- a/packages/core/types/src/order/mutations.ts +++ b/packages/core/types/src/order/mutations.ts @@ -2297,12 +2297,12 @@ export interface CreateOrderCreditLineDTO { /** * The reference model name that the credit line is generated from */ - reference: string | null + reference?: string | null /** * The reference model id that the credit line is generated from */ - reference_id: string | null + reference_id?: string | null /** * The metadata of the order detail