Magento 2: How to disable Adjustment Fee field ONLYCredit Memo Adjustment Fee Woesmagento 2 captcha not...

It took me a lot of time to make this, pls like. (YouTube Comments #1)

Why do neural networks need so many training examples to perform?

Who is this Ant Woman character in this image alongside the Wasp?

Finding a mistake using Mayer-Vietoris

Find some digits of factorial 17

Porting Linux to another platform requirements

Eww, those bytes are gross

How would an AI self awareness kill switch work?

Why do stocks necessarily drop during a recession?

Intern applicant asking for compensation equivalent to that of permanent employee

Why would the Pakistan airspace closure cancel flights not headed to Pakistan itself?

Can we use the stored gravitational potential energy of a building to produce power?

Why Prushim were the ones who "separated"?

Avoiding morning and evening handshakes

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

Which one of these password policies is more secure?

How to count the characters of jar files by wc

Dilemma of explaining to interviewer that he is the reason for declining second interview

Word or phrase for showing great skill at something WITHOUT formal training in it

Why is working on the same position for more than 15 years not a red flag?

Can a hotel cancel a confirmed reservation?

Why is mind meld hard for T'pol in Star Trek: Enterprise?

Can a person refuse a presidential pardon?

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



Magento 2: How to disable Adjustment Fee field ONLY


Credit Memo Adjustment Fee Woesmagento 2 captcha not rendering if I override layout xmlMagento 2 : Problem while adding custom button order view page?Magento 2 Add new field to Magento_User admin formMagento 2 : How to disable input refund adjustmentHow to do multiple partial online refunds?Magento 2 - How to add custom discount to order programmatically?Magento 1.9 - Creditmemo: Is there a workaround for adjustment fee tax calculation?Magento 2: How to Pass Adjustment Fee to Credit MemoMagento 2.2.5: Add, Update and Delete existing products Custom Options













0















I want to disable only the adjustment field from the refund section



I already created a custom template called adjustments.phtml which basically it haves all the html



<tr>
<td class="label"><?php /* @escapeNotVerified */ echo __('Adjustment Fee') ?><div id="adjustment_negative_adv"></div></td>
<td>
<input type="text"
name="creditmemo[adjustment_negative]"
value="<?php /* @escapeNotVerified */ echo $_source->getBaseAdjustmentFeeNegative()*1 ?>"
class="input-text admin__control-text not-negative-amount"
id="adjustment_negative"/>
<script>
require(['prototype'], function(){

//<![CDATA[
Validation.addAllThese([
['not-negative-amount', '<?php /* @escapeNotVerified */ echo __('Please enter a positive number in this field.') ?>', function(v) {
if(v.length)
return /^s*d+([,.]d+)*s*%?s*$/.test(v);
else
return true;
}]
]);

if ($('shipping_amount')) {
$('shipping_amount').advaiceContainer = $('shipping_amount_adv');
unblockSubmit('shipping_amount');
}
if ($('adjustment_positive')) {
$('adjustment_positive').advaiceContainer = $('adjustment_positive_adv');
unblockSubmit('adjustment_positive');
}
if ($('adjustment_negative')) {
$('adjustment_negative').advaiceContainer = $('adjustment_negative_adv');
unblockSubmit('adjustment_negative');
}

function unblockSubmit(id) {
$(id).observe('focus', function(event) {
if ($$('button[class="scalable update-button disabled"]').size() > 0) {
enableElements('submit-button');
}
});
}
//]]>

});
</script>
</td>
</tr>


I also already created my custom layout called saled_order_creditmemo_new.xml in which i placed the remove block code



<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">
<block class="MagentoSalesBlockAdminhtmlOrderCreditmemoCreateAdjustments" name="adjustments" template="order/creditmemo/create/totals/adjustments.phtml"/>
<referenceBlock name="adjustments" remove="true"/>
</referenceBlock>
</body>




The thing is it does disable three fields the ones that editable in the picture below
enter image description here



How can I only disable the one i want?









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 want to disable only the adjustment field from the refund section



    I already created a custom template called adjustments.phtml which basically it haves all the html



    <tr>
    <td class="label"><?php /* @escapeNotVerified */ echo __('Adjustment Fee') ?><div id="adjustment_negative_adv"></div></td>
    <td>
    <input type="text"
    name="creditmemo[adjustment_negative]"
    value="<?php /* @escapeNotVerified */ echo $_source->getBaseAdjustmentFeeNegative()*1 ?>"
    class="input-text admin__control-text not-negative-amount"
    id="adjustment_negative"/>
    <script>
    require(['prototype'], function(){

    //<![CDATA[
    Validation.addAllThese([
    ['not-negative-amount', '<?php /* @escapeNotVerified */ echo __('Please enter a positive number in this field.') ?>', function(v) {
    if(v.length)
    return /^s*d+([,.]d+)*s*%?s*$/.test(v);
    else
    return true;
    }]
    ]);

    if ($('shipping_amount')) {
    $('shipping_amount').advaiceContainer = $('shipping_amount_adv');
    unblockSubmit('shipping_amount');
    }
    if ($('adjustment_positive')) {
    $('adjustment_positive').advaiceContainer = $('adjustment_positive_adv');
    unblockSubmit('adjustment_positive');
    }
    if ($('adjustment_negative')) {
    $('adjustment_negative').advaiceContainer = $('adjustment_negative_adv');
    unblockSubmit('adjustment_negative');
    }

    function unblockSubmit(id) {
    $(id).observe('focus', function(event) {
    if ($$('button[class="scalable update-button disabled"]').size() > 0) {
    enableElements('submit-button');
    }
    });
    }
    //]]>

    });
    </script>
    </td>
    </tr>


    I also already created my custom layout called saled_order_creditmemo_new.xml in which i placed the remove block code



    <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">
    <block class="MagentoSalesBlockAdminhtmlOrderCreditmemoCreateAdjustments" name="adjustments" template="order/creditmemo/create/totals/adjustments.phtml"/>
    <referenceBlock name="adjustments" remove="true"/>
    </referenceBlock>
    </body>




    The thing is it does disable three fields the ones that editable in the picture below
    enter image description here



    How can I only disable the one i want?









    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 want to disable only the adjustment field from the refund section



      I already created a custom template called adjustments.phtml which basically it haves all the html



      <tr>
      <td class="label"><?php /* @escapeNotVerified */ echo __('Adjustment Fee') ?><div id="adjustment_negative_adv"></div></td>
      <td>
      <input type="text"
      name="creditmemo[adjustment_negative]"
      value="<?php /* @escapeNotVerified */ echo $_source->getBaseAdjustmentFeeNegative()*1 ?>"
      class="input-text admin__control-text not-negative-amount"
      id="adjustment_negative"/>
      <script>
      require(['prototype'], function(){

      //<![CDATA[
      Validation.addAllThese([
      ['not-negative-amount', '<?php /* @escapeNotVerified */ echo __('Please enter a positive number in this field.') ?>', function(v) {
      if(v.length)
      return /^s*d+([,.]d+)*s*%?s*$/.test(v);
      else
      return true;
      }]
      ]);

      if ($('shipping_amount')) {
      $('shipping_amount').advaiceContainer = $('shipping_amount_adv');
      unblockSubmit('shipping_amount');
      }
      if ($('adjustment_positive')) {
      $('adjustment_positive').advaiceContainer = $('adjustment_positive_adv');
      unblockSubmit('adjustment_positive');
      }
      if ($('adjustment_negative')) {
      $('adjustment_negative').advaiceContainer = $('adjustment_negative_adv');
      unblockSubmit('adjustment_negative');
      }

      function unblockSubmit(id) {
      $(id).observe('focus', function(event) {
      if ($$('button[class="scalable update-button disabled"]').size() > 0) {
      enableElements('submit-button');
      }
      });
      }
      //]]>

      });
      </script>
      </td>
      </tr>


      I also already created my custom layout called saled_order_creditmemo_new.xml in which i placed the remove block code



      <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">
      <block class="MagentoSalesBlockAdminhtmlOrderCreditmemoCreateAdjustments" name="adjustments" template="order/creditmemo/create/totals/adjustments.phtml"/>
      <referenceBlock name="adjustments" remove="true"/>
      </referenceBlock>
      </body>




      The thing is it does disable three fields the ones that editable in the picture below
      enter image description here



      How can I only disable the one i want?









      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 want to disable only the adjustment field from the refund section



      I already created a custom template called adjustments.phtml which basically it haves all the html



      <tr>
      <td class="label"><?php /* @escapeNotVerified */ echo __('Adjustment Fee') ?><div id="adjustment_negative_adv"></div></td>
      <td>
      <input type="text"
      name="creditmemo[adjustment_negative]"
      value="<?php /* @escapeNotVerified */ echo $_source->getBaseAdjustmentFeeNegative()*1 ?>"
      class="input-text admin__control-text not-negative-amount"
      id="adjustment_negative"/>
      <script>
      require(['prototype'], function(){

      //<![CDATA[
      Validation.addAllThese([
      ['not-negative-amount', '<?php /* @escapeNotVerified */ echo __('Please enter a positive number in this field.') ?>', function(v) {
      if(v.length)
      return /^s*d+([,.]d+)*s*%?s*$/.test(v);
      else
      return true;
      }]
      ]);

      if ($('shipping_amount')) {
      $('shipping_amount').advaiceContainer = $('shipping_amount_adv');
      unblockSubmit('shipping_amount');
      }
      if ($('adjustment_positive')) {
      $('adjustment_positive').advaiceContainer = $('adjustment_positive_adv');
      unblockSubmit('adjustment_positive');
      }
      if ($('adjustment_negative')) {
      $('adjustment_negative').advaiceContainer = $('adjustment_negative_adv');
      unblockSubmit('adjustment_negative');
      }

      function unblockSubmit(id) {
      $(id).observe('focus', function(event) {
      if ($$('button[class="scalable update-button disabled"]').size() > 0) {
      enableElements('submit-button');
      }
      });
      }
      //]]>

      });
      </script>
      </td>
      </tr>


      I also already created my custom layout called saled_order_creditmemo_new.xml in which i placed the remove block code



      <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">
      <block class="MagentoSalesBlockAdminhtmlOrderCreditmemoCreateAdjustments" name="adjustments" template="order/creditmemo/create/totals/adjustments.phtml"/>
      <referenceBlock name="adjustments" remove="true"/>
      </referenceBlock>
      </body>




      The thing is it does disable three fields the ones that editable in the picture below
      enter image description here



      How can I only disable the one i want?







      magento2 creditmemo refund





      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







      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.









      asked 8 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.






















          0






          active

          oldest

          votes











          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
          });


          }
          });






          Mr Robot is a new contributor. Be nice, and check out our Code of Conduct.










          draft saved

          draft discarded


















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

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          Mr Robot is a new contributor. Be nice, and check out our Code of Conduct.










          draft saved

          draft discarded


















          Mr Robot is a new contributor. Be nice, and check out our Code of Conduct.













          Mr Robot is a new contributor. Be nice, and check out our Code of Conduct.












          Mr Robot is a new contributor. Be nice, and check out our Code of Conduct.
















          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%2f263930%2fmagento-2-how-to-disable-adjustment-fee-field-only%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)...

          夢乃愛華...