From 64faac587e6a19128d8066d155c828a25ce1ad56 Mon Sep 17 00:00:00 2001 From: Eileen McNaughton Date: Mon, 10 Jan 2022 11:39:58 +1300 Subject: [PATCH] Enotice fix --- templates/CRM/Financial/Page/BatchTransaction.tpl | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/templates/CRM/Financial/Page/BatchTransaction.tpl b/templates/CRM/Financial/Page/BatchTransaction.tpl index 9c7f8254fc..1b1519723e 100644 --- a/templates/CRM/Financial/Page/BatchTransaction.tpl +++ b/templates/CRM/Financial/Page/BatchTransaction.tpl @@ -26,7 +26,7 @@ -
{if in_array($batchStatus, array('Open', 'Reopened'))}{$form.close_batch.html}{/if} {$form.export_batch.html}
+
{if array_key_exists('close_batch', $form)}{$form.close_batch.html}{/if} {if array_key_exists('close_batch', $form)}{$form.export_batch.html}{/if}
{if in_array($batchStatus, array('Open', 'Reopened'))} {* Add / remove transactions only allowed for Open/Reopened batches *}
{$form.trans_remove.html} {$form.rSubmit.html}

@@ -75,17 +75,17 @@ CRM.$(function($) { }); function assignRemove(recordID, op) { var recordBAO = 'CRM_Batch_BAO_Batch'; - if (op == 'assign' || op == 'remove') { - recordBAO = 'CRM_Batch_BAO_EntityBatch'; + if (op === 'assign' || op === 'remove') { + recordBAO = 'CRM_Batch_BAO_EntityBatch'; } var entityID = {/literal}"{$entityID}"{literal}; - if (op == 'close' || op == 'export') { + if (op === 'close' || op === 'export') { var mismatch = checkMismatch(); } else { CRM.$('#mark_x_' + recordID).closest('tr').block({message: {/literal}'{ts escape="js"}Updating{/ts}'{literal}}); } - if (op == 'close' || (op == 'export' && mismatch.length)) { + if (op === 'close' || (op === 'export' && mismatch.length)) { CRM.$("#enableDisableStatusMsg").dialog({ title: {/literal}'{ts escape="js"}Close Batch{/ts}'{literal}, modal: true, -- 2.25.1