diff --git a/src/discounts/views/VoucherCreate.tsx b/src/discounts/views/VoucherCreate.tsx index 5d55c6273..18c5792cd 100644 --- a/src/discounts/views/VoucherCreate.tsx +++ b/src/discounts/views/VoucherCreate.tsx @@ -85,7 +85,9 @@ export const VoucherDetails: React.StatelessComponent = () => { formData.discountType.toString() === "SHIPPING" ? VoucherTypeEnum.ENTIRE_ORDER : formData.type, - usageLimit: parseInt(formData.usageLimit, 10) + usageLimit: formData.hasUsageLimit + ? parseInt(formData.usageLimit, 10) + : 0 } } }) diff --git a/src/discounts/views/VoucherDetails.tsx b/src/discounts/views/VoucherDetails.tsx index 9584f07de..2b438c614 100644 --- a/src/discounts/views/VoucherDetails.tsx +++ b/src/discounts/views/VoucherDetails.tsx @@ -361,10 +361,9 @@ export const VoucherDetails: React.StatelessComponent = ({ "SHIPPING" ? VoucherTypeEnum.SHIPPING : formData.type, - usageLimit: parseInt( - formData.usageLimit, - 10 - ) + usageLimit: formData.hasUsageLimit + ? parseInt(formData.usageLimit, 10) + : 0 } } })