Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Extensions
grant_program
Commits
79221ed3
Commit
79221ed3
authored
Nov 21, 2018
by
Monish Deb
Browse files
minor fixes
parent
5fc833d1
Changes
1
Hide whitespace changes
Inline
Side-by-side
grantprograms.php
View file @
79221ed3
...
...
@@ -355,6 +355,11 @@ function grantprograms_civicrm_buildForm($formName, &$form) {
//Financial Type RG-125
$financialType
=
CRM_Contribute_PseudoConstant
::
financialType
();
foreach
(
$financialType
as
$id
=>
$dontCare
)
{
if
(
!
CRM_Contribute_PseudoConstant
::
getRelationalFinancialAccount
(
$id
,
'Expense Account is'
))
{
unset
(
$financialType
[
$id
]);
}
}
if
(
count
(
$financialType
))
{
$form
->
assign
(
'financialType'
,
$financialType
);
}
...
...
@@ -391,6 +396,12 @@ function grantprograms_civicrm_buildForm($formName, &$form) {
}
}
$form
->
removeElement
(
'status_id'
);
if
(
$grantStatuses
[
$currentStatus
]
==
'Paid'
)
{
$approvedStatusID
=
array_search
(
'Approved for Payment'
,
$grantStatuses
);
if
(
!
empty
(
$grantStatuses
[
$approvedStatusID
]))
{
unset
(
$grantStatuses
[
$approvedStatusID
]);
}
}
$element
=
$form
->
add
(
'select'
,
'status_id'
,
ts
(
'Grant Status'
),
$grantStatuses
,
...
...
@@ -985,12 +996,11 @@ function grantprograms_civicrm_postProcess($formName, &$form) {
}
function
_processMultiFundEntries
(
$values
)
{
$totalCount
=
civicrm_api3
(
'FinancialAccount'
,
'getcount'
,
[]);
$multifundEntries
=
[];
if
(
empty
(
$values
[
'multifund_amount'
]))
{
return
$multifundEntries
;
}
for
(
$i
=
0
;
$i
<
$totalCount
;
$i
++
)
{
for
(
$i
=
0
;
$i
<
2
;
$i
++
)
{
if
(
!
empty
(
$values
[
'financial_account'
][
$i
]))
{
$multifundEntries
[
$i
]
=
[
'from_financial_account_id'
=>
$values
[
'financial_account'
][
$i
],
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment