forked from CiviWare/org.agbu.annualgrantbudgets
fixed civilint
This commit is contained in:
@ -2,12 +2,23 @@
|
||||
|
||||
class CRM_Grant_BAO_GrantBudget extends CRM_Grant_DAO_GrantBudget {
|
||||
|
||||
/**
|
||||
* Build Fiscal year option list.
|
||||
*
|
||||
*/
|
||||
public static function getFiscalyear() {
|
||||
$from = date("Y", strtotime(date('Y') . ' - ' . GRANT_SCHOLARSHIP_YEAR_DIFF . ' years'));
|
||||
$to = date("Y", strtotime(date('Y') . ' + ' . GRANT_SCHOLARSHIP_YEAR_DIFF . ' years'));
|
||||
return array_combine(range($to, $from), range($to, $from));
|
||||
}
|
||||
|
||||
/**
|
||||
* Build Fiscal year option list.
|
||||
*
|
||||
* @param $params array
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function getGrantBudget($params) {
|
||||
$fiscalYear = $params['fiscal_year'];
|
||||
if (empty($fiscalYear)) {
|
||||
@ -21,7 +32,7 @@ class CRM_Grant_BAO_GrantBudget extends CRM_Grant_DAO_GrantBudget {
|
||||
);
|
||||
|
||||
$config = CRM_Core_Config::singleton();
|
||||
$mkTime = mktime(0, 0, 0, $config->fiscalYearStart['M'], $config->fiscalYearStart['d'], $fiscalYear);
|
||||
$mkTime = mktime(0, 0, 0, $config->fiscalYearStart['M'], $config->fiscalYearStart['d'], $fiscalYear);
|
||||
$fiscalStartDate = date('Y-m-d', $mkTime);
|
||||
$fiscalEndDate = date('Y-m-d', strtotime($fiscalStartDate . '+ 1 year'));
|
||||
|
||||
|
Reference in New Issue
Block a user