Skip to content

Commit

Permalink
QA fix
Browse files Browse the repository at this point in the history
  • Loading branch information
monishdeb committed Apr 6, 2017
1 parent 79c16b2 commit 0adcec2
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion CRM/Event/Form/ManageEvent/Fee.php
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ public function buildQuickForm() {
);
if (CRM_Contribute_BAO_Contribution::checkContributeSettings('deferred_revenue_enabled')) {
$deferredFinancialType = CRM_Financial_BAO_FinancialAccount::getDeferredFinancialType();
$this->assign('deferredFinancialType', json_encode(array_keys($deferredFinancialType)));
$this->assign('deferredFinancialType', array_keys($deferredFinancialType));
}
$this->buildAmountLabel();
parent::buildQuickForm();
Expand Down
2 changes: 1 addition & 1 deletion CRM/Member/Form/MembershipType.php
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ public function buildQuickForm() {

if (CRM_Contribute_BAO_Contribution::checkContributeSettings('deferred_revenue_enabled')) {
$deferredFinancialType = CRM_Financial_BAO_FinancialAccount::getDeferredFinancialType();
$this->assign('deferredFinancialType', json_encode(array_keys($deferredFinancialType)));
$this->assign('deferredFinancialType', array_keys($deferredFinancialType));
}
}

Expand Down
6 changes: 3 additions & 3 deletions templates/CRM/common/deferredFinancialType.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
+--------------------------------------------------------------------+
*}
{if isset($deferredFinancialType)}
{if isset($deferredFinancialType) && $deferredFinancialType|@count}
<div id='warningDialog' style="display:none;"></div>
{literal}
<script type="text/javascript">
Expand All @@ -35,7 +35,7 @@ CRM.$(function($) {
{ts}Note: Revenue for these types of memberships will not be deferred as the financial type does not have a deferred revenue account setup for it. If you want the revenue to be deferred, please select a different Financial Type with a Deferred Revenue account setup for it, or setup a Deferred Revenue account for this Financial Type.{/ts}
{/if}
{literal}";
var deferredFinancialType = {/literal}{$deferredFinancialType}{literal};
var deferredFinancialType = {/literal}{$deferredFinancialType|@json_encode}{literal};
var financialType = parseInt($('#financial_type_id').val());
if ($.inArray(financialType, deferredFinancialType) == -1) {
return confirm(message);
Expand All @@ -44,4 +44,4 @@ CRM.$(function($) {
});
</script>
{/literal}
{/if}
{/if}

0 comments on commit 0adcec2

Please sign in to comment.