From 323454afd27b56233478272c858be4a721909d13 Mon Sep 17 00:00:00 2001 From: eileen Date: Mon, 22 Feb 2021 16:10:30 +1300 Subject: [PATCH] [REF] Remove unused variables existingAmount is never used except in this if so cannot be true. feeTotal is used above this point but not below it - so this code is extraneous --- templates/CRM/Member/Form/Membership.tpl | 8 -------- 1 file changed, 8 deletions(-) diff --git a/templates/CRM/Member/Form/Membership.tpl b/templates/CRM/Member/Form/Membership.tpl index 3498abf6a0..7de2f3b7c6 100644 --- a/templates/CRM/Member/Form/Membership.tpl +++ b/templates/CRM/Member/Form/Membership.tpl @@ -268,7 +268,6 @@ function setPaymentBlock(mode, checkboxEvent) { var memType = parseInt(cj('#membership_type_id_1').val( )); var isPriceSet = 0; - var existingAmount = 0; if ( cj('#price_set_id').length > 0 && cj('#price_set_id').val() ) { isPriceSet = 1; @@ -319,13 +318,6 @@ var feeTotal = parseFloat(Number((taxRate/100) * allMemberships[memType]['total_amount'])+Number(allMemberships[memType]['total_amount_numeric'])).toFixed(2); cj("#total_amount").val(CRM.formatMoney(feeTotal, true)); } - else { - var feeTotal = allMemberships[memType]['total_amount']; - if (!existingAmount) { - // CRM-16680 don't set amount if there is an existing contribution. - cj("#total_amount").val(allMemberships[memType]['total_amount']); - } - } } var taxMessage = taxRate!=undefined ? 'Includes '+taxTerm+' amount of '+currency+' '+taxAmount:''; cj('.totaltaxAmount').html(taxMessage); -- 2.25.1