Magento 2 : How to disable input refund adjustmentRefund unsettled transactions using Authorize.netPartial...

One Half of Ten; A Riddle

Why are the books in the Game of Thrones citadel library shelved spine inwards?

Why would space fleets be aligned?

My cat mixes up the floors in my building. How can I help him?

Pronunciation of umlaut vowels in the history of German

If I delete my router's history can my ISP still provide it to my parents?

Caruana vs Carlsen game 10 (WCC) why not 18...Nxb6?

How to avoid being sexist when trying to employ someone to function in a very sexist environment?

How do you funnel food off a cutting board?

Why publish a research paper when a blog post or a lecture slide can have more citation count than a journal paper?

Using only 1s, make 29 with the minimum number of digits

What is 6÷2×(1+2) =?

Can I become debt free or should I file bankruptcy ? How to manage my debt and finances?

Which one of these password policies is more secure?

Publishing research using outdated methods

Finding a mistake using Mayer-Vietoris

Measure of a Brownian motion = normal distribution?

How to deal with an incendiary email that was recalled

How long is the D&D Starter Set campaign?

Explain the objections to these measures against human trafficking

Intern applicant asking for compensation equivalent to that of permanent employee

What are "industrial chops"?

Digits in an algebraic irrational number

Advice for a new journal editor



Magento 2 : How to disable input refund adjustment


Refund unsettled transactions using Authorize.netPartial refund option missing (Qty to Refund)Credit Memo in MagentoProgramatically create credit memoIs it possible to refund tax on a partial order refund?Credit memo refund more than original invoice due to return shipping costsRefunding partial order, but refund confirmation email shows all ordered itemsCredit memo vs Refund Which one is true? Magento 1.9Magento 2.2.0 partial Credit Memo/Refund doesn't work properlyChange order state from processing to closed













1















Can anyone help me, how to disable input refund shipping, adjustment refund and adjustment fee when we create credit memo on Magento 2?



enter image description here



I can disable it on Magento 1, but I am confused how to disable it for Magento 2.



enter image description here



[edit]
in my case, I need to validate a condition. I need to delete that field for payment by certain methods only. so not all orders get disabled/










share|improve this question





























    1















    Can anyone help me, how to disable input refund shipping, adjustment refund and adjustment fee when we create credit memo on Magento 2?



    enter image description here



    I can disable it on Magento 1, but I am confused how to disable it for Magento 2.



    enter image description here



    [edit]
    in my case, I need to validate a condition. I need to delete that field for payment by certain methods only. so not all orders get disabled/










    share|improve this question



























      1












      1








      1








      Can anyone help me, how to disable input refund shipping, adjustment refund and adjustment fee when we create credit memo on Magento 2?



      enter image description here



      I can disable it on Magento 1, but I am confused how to disable it for Magento 2.



      enter image description here



      [edit]
      in my case, I need to validate a condition. I need to delete that field for payment by certain methods only. so not all orders get disabled/










      share|improve this question
















      Can anyone help me, how to disable input refund shipping, adjustment refund and adjustment fee when we create credit memo on Magento 2?



      enter image description here



      I can disable it on Magento 1, but I am confused how to disable it for Magento 2.



      enter image description here



      [edit]
      in my case, I need to validate a condition. I need to delete that field for payment by certain methods only. so not all orders get disabled/







      magento2 forms refund






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Nov 20 '17 at 11:05







      Husen Bisri

















      asked Nov 20 '17 at 4:56









      Husen BisriHusen Bisri

      84




      84






















          2 Answers
          2






          active

          oldest

          votes


















          0














          There is a block adjustments in sales_order_creditmemo_new.xml layout which is responsible to generate adjustment fields. We can simply remove this block from the layout.



          In order to disable these fields, create a new file with the name sales_order_creditmemo_new in your custom module and paste below content to remove adjustments block.




          app/code/{Namespace}/{Module}/view/adminhtml/layout/sales_order_creditmemo_new.xml




          <?xml version="1.0"?>
          <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
          <body>
          <referenceBlock name="creditmemo_totals">
          <referenceBlock name="adjustments" remove="true"/>
          </referenceBlock>
          </body>
          </page>


          UPDATE



          To remove a block conditionally, you can use a helper in layout to apply some conditions.




          app/code/{Namespace}/{Module}/view/adminhtml/layout/sales_order_creditmemo_new.xml




          <?xml version="1.0"?>
          <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
          <body>
          <referenceBlock name="creditmemo_totals">
          <action method="unsetChild">
          <argument name="block" xsi:type="helper" helper="{Namespace}{Module}HelperData::removeAdjustmentSection">
          <param name="name">adjustments</param>
          </argument>
          </action>
          </referenceBlock>
          </body>
          </page>



          app/code/{Namespace}/{Module}/Helper/Data.php




          <?php
          namespace {Namespace}{Module}Helper;

          /**
          * @param $name | Block's reference in layout that you wish to remove
          * passed as param in layout
          * @return string
          */
          class Data extends MagentoFrameworkAppHelperAbstractHelper
          {
          public function removeAdjustmentSection($name)
          {
          if ({some-conditions-to-remove-block}) {
          return $name;
          }

          return '';
          }
          }


          In removeAdjustmentSection function, you can define your conditions to remove the block.






          share|improve this answer


























          • Hi @Shyam, thanks. But in my case, I need to validate a condition. I need to delete that field for payment by certain methods only. do you know how to do that? so not all order get disabled :)

            – Husen Bisri
            Nov 20 '17 at 10:46











          • @HusenBisri Please check the updated answer

            – Shyam
            Nov 20 '17 at 13:24











          • Great, thank you @shyam. btw, do you have a reference to learn about xml for magento 2? on devdocs.magento.com I did not find like this

            – Husen Bisri
            Nov 21 '17 at 11:05



















          0














          I am not able to comment but with Shyam solution how would you do it to remove only one of those three fields? i follow the solution but it removes the three of them i want only the adjustment fee disabled is that even possible?





          share








          New contributor




          Mr Robot is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
          Check out our Code of Conduct.




















            Your Answer








            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "479"
            };
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function() {
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled) {
            StackExchange.using("snippets", function() {
            createEditor();
            });
            }
            else {
            createEditor();
            }
            });

            function createEditor() {
            StackExchange.prepareEditor({
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: false,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: null,
            bindNavPrevention: true,
            postfix: "",
            imageUploader: {
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            },
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            });


            }
            });














            draft saved

            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f202228%2fmagento-2-how-to-disable-input-refund-adjustment%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            2 Answers
            2






            active

            oldest

            votes








            2 Answers
            2






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            0














            There is a block adjustments in sales_order_creditmemo_new.xml layout which is responsible to generate adjustment fields. We can simply remove this block from the layout.



            In order to disable these fields, create a new file with the name sales_order_creditmemo_new in your custom module and paste below content to remove adjustments block.




            app/code/{Namespace}/{Module}/view/adminhtml/layout/sales_order_creditmemo_new.xml




            <?xml version="1.0"?>
            <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
            <body>
            <referenceBlock name="creditmemo_totals">
            <referenceBlock name="adjustments" remove="true"/>
            </referenceBlock>
            </body>
            </page>


            UPDATE



            To remove a block conditionally, you can use a helper in layout to apply some conditions.




            app/code/{Namespace}/{Module}/view/adminhtml/layout/sales_order_creditmemo_new.xml




            <?xml version="1.0"?>
            <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
            <body>
            <referenceBlock name="creditmemo_totals">
            <action method="unsetChild">
            <argument name="block" xsi:type="helper" helper="{Namespace}{Module}HelperData::removeAdjustmentSection">
            <param name="name">adjustments</param>
            </argument>
            </action>
            </referenceBlock>
            </body>
            </page>



            app/code/{Namespace}/{Module}/Helper/Data.php




            <?php
            namespace {Namespace}{Module}Helper;

            /**
            * @param $name | Block's reference in layout that you wish to remove
            * passed as param in layout
            * @return string
            */
            class Data extends MagentoFrameworkAppHelperAbstractHelper
            {
            public function removeAdjustmentSection($name)
            {
            if ({some-conditions-to-remove-block}) {
            return $name;
            }

            return '';
            }
            }


            In removeAdjustmentSection function, you can define your conditions to remove the block.






            share|improve this answer


























            • Hi @Shyam, thanks. But in my case, I need to validate a condition. I need to delete that field for payment by certain methods only. do you know how to do that? so not all order get disabled :)

              – Husen Bisri
              Nov 20 '17 at 10:46











            • @HusenBisri Please check the updated answer

              – Shyam
              Nov 20 '17 at 13:24











            • Great, thank you @shyam. btw, do you have a reference to learn about xml for magento 2? on devdocs.magento.com I did not find like this

              – Husen Bisri
              Nov 21 '17 at 11:05
















            0














            There is a block adjustments in sales_order_creditmemo_new.xml layout which is responsible to generate adjustment fields. We can simply remove this block from the layout.



            In order to disable these fields, create a new file with the name sales_order_creditmemo_new in your custom module and paste below content to remove adjustments block.




            app/code/{Namespace}/{Module}/view/adminhtml/layout/sales_order_creditmemo_new.xml




            <?xml version="1.0"?>
            <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
            <body>
            <referenceBlock name="creditmemo_totals">
            <referenceBlock name="adjustments" remove="true"/>
            </referenceBlock>
            </body>
            </page>


            UPDATE



            To remove a block conditionally, you can use a helper in layout to apply some conditions.




            app/code/{Namespace}/{Module}/view/adminhtml/layout/sales_order_creditmemo_new.xml




            <?xml version="1.0"?>
            <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
            <body>
            <referenceBlock name="creditmemo_totals">
            <action method="unsetChild">
            <argument name="block" xsi:type="helper" helper="{Namespace}{Module}HelperData::removeAdjustmentSection">
            <param name="name">adjustments</param>
            </argument>
            </action>
            </referenceBlock>
            </body>
            </page>



            app/code/{Namespace}/{Module}/Helper/Data.php




            <?php
            namespace {Namespace}{Module}Helper;

            /**
            * @param $name | Block's reference in layout that you wish to remove
            * passed as param in layout
            * @return string
            */
            class Data extends MagentoFrameworkAppHelperAbstractHelper
            {
            public function removeAdjustmentSection($name)
            {
            if ({some-conditions-to-remove-block}) {
            return $name;
            }

            return '';
            }
            }


            In removeAdjustmentSection function, you can define your conditions to remove the block.






            share|improve this answer


























            • Hi @Shyam, thanks. But in my case, I need to validate a condition. I need to delete that field for payment by certain methods only. do you know how to do that? so not all order get disabled :)

              – Husen Bisri
              Nov 20 '17 at 10:46











            • @HusenBisri Please check the updated answer

              – Shyam
              Nov 20 '17 at 13:24











            • Great, thank you @shyam. btw, do you have a reference to learn about xml for magento 2? on devdocs.magento.com I did not find like this

              – Husen Bisri
              Nov 21 '17 at 11:05














            0












            0








            0







            There is a block adjustments in sales_order_creditmemo_new.xml layout which is responsible to generate adjustment fields. We can simply remove this block from the layout.



            In order to disable these fields, create a new file with the name sales_order_creditmemo_new in your custom module and paste below content to remove adjustments block.




            app/code/{Namespace}/{Module}/view/adminhtml/layout/sales_order_creditmemo_new.xml




            <?xml version="1.0"?>
            <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
            <body>
            <referenceBlock name="creditmemo_totals">
            <referenceBlock name="adjustments" remove="true"/>
            </referenceBlock>
            </body>
            </page>


            UPDATE



            To remove a block conditionally, you can use a helper in layout to apply some conditions.




            app/code/{Namespace}/{Module}/view/adminhtml/layout/sales_order_creditmemo_new.xml




            <?xml version="1.0"?>
            <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
            <body>
            <referenceBlock name="creditmemo_totals">
            <action method="unsetChild">
            <argument name="block" xsi:type="helper" helper="{Namespace}{Module}HelperData::removeAdjustmentSection">
            <param name="name">adjustments</param>
            </argument>
            </action>
            </referenceBlock>
            </body>
            </page>



            app/code/{Namespace}/{Module}/Helper/Data.php




            <?php
            namespace {Namespace}{Module}Helper;

            /**
            * @param $name | Block's reference in layout that you wish to remove
            * passed as param in layout
            * @return string
            */
            class Data extends MagentoFrameworkAppHelperAbstractHelper
            {
            public function removeAdjustmentSection($name)
            {
            if ({some-conditions-to-remove-block}) {
            return $name;
            }

            return '';
            }
            }


            In removeAdjustmentSection function, you can define your conditions to remove the block.






            share|improve this answer















            There is a block adjustments in sales_order_creditmemo_new.xml layout which is responsible to generate adjustment fields. We can simply remove this block from the layout.



            In order to disable these fields, create a new file with the name sales_order_creditmemo_new in your custom module and paste below content to remove adjustments block.




            app/code/{Namespace}/{Module}/view/adminhtml/layout/sales_order_creditmemo_new.xml




            <?xml version="1.0"?>
            <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
            <body>
            <referenceBlock name="creditmemo_totals">
            <referenceBlock name="adjustments" remove="true"/>
            </referenceBlock>
            </body>
            </page>


            UPDATE



            To remove a block conditionally, you can use a helper in layout to apply some conditions.




            app/code/{Namespace}/{Module}/view/adminhtml/layout/sales_order_creditmemo_new.xml




            <?xml version="1.0"?>
            <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
            <body>
            <referenceBlock name="creditmemo_totals">
            <action method="unsetChild">
            <argument name="block" xsi:type="helper" helper="{Namespace}{Module}HelperData::removeAdjustmentSection">
            <param name="name">adjustments</param>
            </argument>
            </action>
            </referenceBlock>
            </body>
            </page>



            app/code/{Namespace}/{Module}/Helper/Data.php




            <?php
            namespace {Namespace}{Module}Helper;

            /**
            * @param $name | Block's reference in layout that you wish to remove
            * passed as param in layout
            * @return string
            */
            class Data extends MagentoFrameworkAppHelperAbstractHelper
            {
            public function removeAdjustmentSection($name)
            {
            if ({some-conditions-to-remove-block}) {
            return $name;
            }

            return '';
            }
            }


            In removeAdjustmentSection function, you can define your conditions to remove the block.







            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited Nov 20 '17 at 13:24

























            answered Nov 20 '17 at 10:31









            ShyamShyam

            1,367827




            1,367827













            • Hi @Shyam, thanks. But in my case, I need to validate a condition. I need to delete that field for payment by certain methods only. do you know how to do that? so not all order get disabled :)

              – Husen Bisri
              Nov 20 '17 at 10:46











            • @HusenBisri Please check the updated answer

              – Shyam
              Nov 20 '17 at 13:24











            • Great, thank you @shyam. btw, do you have a reference to learn about xml for magento 2? on devdocs.magento.com I did not find like this

              – Husen Bisri
              Nov 21 '17 at 11:05



















            • Hi @Shyam, thanks. But in my case, I need to validate a condition. I need to delete that field for payment by certain methods only. do you know how to do that? so not all order get disabled :)

              – Husen Bisri
              Nov 20 '17 at 10:46











            • @HusenBisri Please check the updated answer

              – Shyam
              Nov 20 '17 at 13:24











            • Great, thank you @shyam. btw, do you have a reference to learn about xml for magento 2? on devdocs.magento.com I did not find like this

              – Husen Bisri
              Nov 21 '17 at 11:05

















            Hi @Shyam, thanks. But in my case, I need to validate a condition. I need to delete that field for payment by certain methods only. do you know how to do that? so not all order get disabled :)

            – Husen Bisri
            Nov 20 '17 at 10:46





            Hi @Shyam, thanks. But in my case, I need to validate a condition. I need to delete that field for payment by certain methods only. do you know how to do that? so not all order get disabled :)

            – Husen Bisri
            Nov 20 '17 at 10:46













            @HusenBisri Please check the updated answer

            – Shyam
            Nov 20 '17 at 13:24





            @HusenBisri Please check the updated answer

            – Shyam
            Nov 20 '17 at 13:24













            Great, thank you @shyam. btw, do you have a reference to learn about xml for magento 2? on devdocs.magento.com I did not find like this

            – Husen Bisri
            Nov 21 '17 at 11:05





            Great, thank you @shyam. btw, do you have a reference to learn about xml for magento 2? on devdocs.magento.com I did not find like this

            – Husen Bisri
            Nov 21 '17 at 11:05













            0














            I am not able to comment but with Shyam solution how would you do it to remove only one of those three fields? i follow the solution but it removes the three of them i want only the adjustment fee disabled is that even possible?





            share








            New contributor




            Mr Robot is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
            Check out our Code of Conduct.

























              0














              I am not able to comment but with Shyam solution how would you do it to remove only one of those three fields? i follow the solution but it removes the three of them i want only the adjustment fee disabled is that even possible?





              share








              New contributor




              Mr Robot is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
              Check out our Code of Conduct.























                0












                0








                0







                I am not able to comment but with Shyam solution how would you do it to remove only one of those three fields? i follow the solution but it removes the three of them i want only the adjustment fee disabled is that even possible?





                share








                New contributor




                Mr Robot is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.










                I am not able to comment but with Shyam solution how would you do it to remove only one of those three fields? i follow the solution but it removes the three of them i want only the adjustment fee disabled is that even possible?






                share








                New contributor




                Mr Robot is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.








                share


                share






                New contributor




                Mr Robot is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.









                answered 6 mins ago









                Mr RobotMr Robot

                11




                11




                New contributor




                Mr Robot is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.





                New contributor





                Mr Robot is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.






                Mr Robot is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.






























                    draft saved

                    draft discarded




















































                    Thanks for contributing an answer to Magento Stack Exchange!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f202228%2fmagento-2-how-to-disable-input-refund-adjustment%23new-answer', 'question_page');
                    }
                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    “%fieldName is a required field.”, in Magento2 REST API Call for GET Method Type The Next...

                    How to change City field to a dropdown in Checkout step Magento 2Magento 2 : How to change UI field(s)...

                    夢乃愛華...