From 61ae4f80ea7e3b82e65752a77a9b0df1ce488599 Mon Sep 17 00:00:00 2001 From: Civiware Solutions Date: Sun, 12 Aug 2018 05:04:21 +0530 Subject: [PATCH] added fiscal year select box --- CRM/Grant/Page/AnnualBudgets.php | 9 +++++++++ templates/CRM/Grant/Page/AnnualBudgets.tpl | 19 +++++++++++++++++++ 2 files changed, 28 insertions(+) diff --git a/CRM/Grant/Page/AnnualBudgets.php b/CRM/Grant/Page/AnnualBudgets.php index 258a222..b664153 100644 --- a/CRM/Grant/Page/AnnualBudgets.php +++ b/CRM/Grant/Page/AnnualBudgets.php @@ -39,6 +39,15 @@ class CRM_Grant_Page_AnnualBudgets extends CRM_Core_Page_Basic { if (empty($fiscalYear)) { $fiscalYear = date('Y'); } + $fiscalYearOptions = ''; + foreach (CRM_Grant_BAO_GrantBudget::getFiscalyear() as $key => $value) { + $extra = ''; + if ($key == $fiscalYear) { + $extra = 'selected="selected"'; + } + $fiscalYearOptions .= ""; + } + $this->assign('fiscal_year_options', $fiscalYearOptions); $this->assign('fiscalYear', $fiscalYear); } diff --git a/templates/CRM/Grant/Page/AnnualBudgets.tpl b/templates/CRM/Grant/Page/AnnualBudgets.tpl index 3226060..ea0634b 100644 --- a/templates/CRM/Grant/Page/AnnualBudgets.tpl +++ b/templates/CRM/Grant/Page/AnnualBudgets.tpl @@ -1,4 +1,9 @@
+ + +

@@ -23,3 +28,17 @@
{ts}Endowement{/ts}
{crmButton p="civicrm" q="reset=1" class="cancel" icon="times"}{ts}Done{/ts}{/crmButton}
+ +{literal} + +{/literal}