[REF] Fix Smarty Notice Errors on Contribution Edit
authorSeamus Lee <seamuslee001@gmail.com>
Thu, 16 Nov 2023 00:36:56 +0000 (11:36 +1100)
committerSeamus Lee <seamuslee001@gmail.com>
Thu, 16 Nov 2023 00:36:56 +0000 (11:36 +1100)
CRM/Contribute/BAO/Contribution.php
templates/CRM/Contribute/Form/AdditionalPayment.tpl
templates/CRM/Contribute/Form/Contribution.tpl

index 16412b14fe8251a92050fc14bae62ccecd5a1392..8eb7f8ad56024cc8464d9363c0973af66df5e5c6 100644 (file)
@@ -1064,6 +1064,9 @@ class CRM_Contribute_BAO_Contribution extends CRM_Contribute_DAO_Contribution im
       if ($paidByName === 'Check') {
         $val['check_number'] = $resultDAO->check_number;
       }
+      else {
+        $val['check_number'] = NULL;
+      }
       $rows[] = $val;
     }
     return $rows;
index 6c01148419e8846cae4431d5664c352243045547..52d54ec903be99b5fac77134ebc75fe03bd63507 100644 (file)
 
     {literal}
     <script type="text/javascript">
-
-    var url = {/literal}{$dataUrl|@json_encode}{literal};
-
       CRM.$(function($) {
         showHideByValue( 'is_email_receipt', '', 'notice', 'table-row', 'radio', false );
         showHideByValue( 'is_email_receipt', '', 'fromEmail', 'table-row', 'radio', false );
index 0e6c1cabc38fcec960455a43af2ad62ca5a27748..88c66e1925ad99466737248eb182942f39a0485d 100644 (file)
           }
         }
 
-        var url = {/literal}{$dataUrl|@json_encode}{literal};
-
         {/literal}
         {if $context eq 'standalone' and $outBound_option != 2}
         {literal}