From fd054617bc0d2daff4fd9e82713f841c376374c7 Mon Sep 17 00:00:00 2001 From: David Reedy Jr Date: Wed, 26 Oct 2016 09:20:17 -0500 Subject: [PATCH] CRM-19567 FALSE amount owed warning --- templates/CRM/Contribute/Page/PaymentInfo.tpl | 2 +- templates/CRM/Event/Form/Participant.tpl | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/templates/CRM/Contribute/Page/PaymentInfo.tpl b/templates/CRM/Contribute/Page/PaymentInfo.tpl index a9225813ce..31a5e79cfe 100644 --- a/templates/CRM/Contribute/Page/PaymentInfo.tpl +++ b/templates/CRM/Contribute/Page/PaymentInfo.tpl @@ -69,7 +69,7 @@ CRM.$(function($) { {/if} - {$paymentInfo.balance|crmMoney} + {$paymentInfo.balance|crmMoney} {if $paymentInfo.balance and !$paymentInfo.payLater} diff --git a/templates/CRM/Event/Form/Participant.tpl b/templates/CRM/Event/Form/Participant.tpl index cc0b859d85..c80173bf69 100644 --- a/templates/CRM/Event/Form/Participant.tpl +++ b/templates/CRM/Event/Form/Participant.tpl @@ -153,6 +153,12 @@ cj('form[name=Participant]').on("click", '.validate', function(e) { + if (CRM.$('#total_amount').length == 0) { + var $balance = CRM.$('#payment-info-balance'); + if ($balance.length > 0 && parseFloat($balance.attr('data-balance')) == 0) { + return true; + } + } var userSubmittedStatus = cj('#status_id').val(); var statusLabel = cj('#status_id option:selected').text(); if (userModifiedAmount < feeAmount && userSubmittedStatus != partiallyPaidStatusId) { -- 2.25.1