File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -174,7 +174,7 @@ class CouponForm extends React.Component {
174174
175175 onSubmit = async ( fields ) => {
176176 if ( fields . amount )
177- if ( ! ( await this . getProductsWithMrpLessThanDiscount ( fields ) ) )
177+ if ( ! ( await this . freeProductsNotice ( fields ) ) )
178178 return
179179
180180 if ( this . props . data . isEditMode ) {
@@ -184,14 +184,15 @@ class CouponForm extends React.Component {
184184 }
185185 }
186186
187- getProductsWithMrpLessThanDiscount = async ( formValues ) => {
187+ freeProductsNotice = async ( formValues ) => {
188188 try {
189189 const payload = {
190190 amount : formValues . amount ,
191191 product_ids : await this . getCouponProductIds ( ) ,
192192 category : formValues . category ,
193193 sub_category_id : formValues . sub_category_id ,
194- mode : formValues . mode
194+ mode : formValues . mode ,
195+ min_product_mrp : formValues . min_product_mrp
195196 }
196197 const response = await controller . getProductsWithMrpLessThanDiscount ( payload )
197198 if ( ! response . data . length ) {
You can’t perform that action at this time.
0 commit comments