@@ -24,7 +24,6 @@ fn cart_lines_discounts_generate_run(
2424 let has_order_discount_class = input
2525 . discount
2626 . discount_classes
27- <<<<<<< HEAD
2827 . contains ( & input:: DiscountClass :: ORDER ) ;
2928 let has_product_discount_class = input
3029 . discount
@@ -33,46 +32,23 @@ fn cart_lines_discounts_generate_run(
3332
3433 if !has_order_discount_class && !has_product_discount_class {
3534 return Ok ( output:: CartLinesDiscountsGenerateRunResult { operations : vec ! [ ] } ) ;
36- =======
37- . contains ( & DiscountClass :: ORDER ) ;
38- let has_product_discount_class = input
39- . discount
40- . discount_classes
41- . contains ( & DiscountClass :: PRODUCT ) ;
42-
43- if !has_order_discount_class && !has_product_discount_class {
44- return Ok ( CartLinesDiscountsGenerateRunResult { operations : vec ! [ ] } ) ;
45- >>>>>>> c85625f ( Update file names)
4635 }
4736
4837 let mut operations = vec ! [ ] ;
4938
5039 // Check if the discount has the ORDER class
5140 if has_order_discount_class {
52- <<<<<<< HEAD
5341 operations. push ( output:: CartOperation :: OrderDiscountsAdd (
5442 output:: OrderDiscountsAddOperation {
5543 selection_strategy : output:: OrderDiscountSelectionStrategy :: FIRST ,
5644 candidates : vec ! [ output:: OrderDiscountCandidate {
5745 targets: vec![ output:: OrderDiscountCandidateTarget :: OrderSubtotal (
5846 output:: OrderSubtotalTarget {
59- =======
60- operations. push( CartOperation :: OrderDiscountsAdd (
61- OrderDiscountsAddOperation {
62- selection_strategy: OrderDiscountSelectionStrategy :: FIRST ,
63- candidates: vec![ OrderDiscountCandidate {
64- targets: vec![ OrderDiscountCandidateTarget :: OrderSubtotal (
65- OrderSubtotalTarget {
66- >>>>>>> c85625f ( Update file names)
6747 excluded_cart_line_ids: vec![ ] ,
6848 } ,
6949 ) ] ,
7050 message: Some ( "10% OFF ORDER" . to_string( ) ) ,
71- <<<<<<< HEAD
7251 value: output:: OrderDiscountCandidateValue :: Percentage ( output:: Percentage {
73- =======
74- value: OrderDiscountCandidateValue :: Percentage ( Percentage {
75- >>>>>>> c85625f ( Update file names)
7652 value: Decimal ( 10.0 ) ,
7753 } ) ,
7854 conditions: None ,
@@ -84,7 +60,6 @@ fn cart_lines_discounts_generate_run(
8460
8561 // Check if the discount has the PRODUCT class
8662 if has_product_discount_class {
87- <<<<<<< HEAD
8863 operations. push ( output:: CartOperation :: ProductDiscountsAdd (
8964 output:: ProductDiscountsAddOperation {
9065 selection_strategy : output:: ProductDiscountSelectionStrategy :: FIRST ,
@@ -97,18 +72,6 @@ fn cart_lines_discounts_generate_run(
9772 ) ] ,
9873 message: Some ( "20% OFF PRODUCT" . to_string( ) ) ,
9974 value: output:: ProductDiscountCandidateValue :: Percentage ( output:: Percentage {
100- =======
101- operations. push( CartOperation :: ProductDiscountsAdd (
102- ProductDiscountsAddOperation {
103- selection_strategy: ProductDiscountSelectionStrategy :: FIRST ,
104- candidates: vec![ ProductDiscountCandidate {
105- targets: vec![ ProductDiscountCandidateTarget :: CartLine ( CartLineTarget {
106- id: max_cart_line. id. clone( ) ,
107- quantity: None ,
108- } ) ] ,
109- message: Some ( "20% OFF PRODUCT" . to_string( ) ) ,
110- value: ProductDiscountCandidateValue :: Percentage ( Percentage {
111- >>>>>>> c85625f ( Update file names)
11275 value: Decimal ( 20.0 ) ,
11376 } ) ,
11477 associated_discount_code: None ,
@@ -117,9 +80,5 @@ fn cart_lines_discounts_generate_run(
11780 ) ) ;
11881 }
11982
120- <<<<<<< HEAD
12183 Ok ( output:: CartLinesDiscountsGenerateRunResult { operations } )
122- =======
123- Ok ( CartLinesDiscountsGenerateRunResult { operations } )
124- >>>>>>> c85625f ( Update file names)
12584}
0 commit comments