Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
aivlspecificactions
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Partners
CiviCooP
AIVL
aivlspecificactions
Commits
689fe2aa
Commit
689fe2aa
authored
2 years ago
by
ErikHommel
Browse files
Options
Downloads
Patches
Plain Diff
fix issue 9833 - import reactivate donation company
parent
6f3ba679
No related branches found
No related tags found
1 merge request
!1
fix issue 9833 - import reactivate donation company
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Civi/Aivlspecificactions/Actions/UpdateCallAssignment.php
+46
-3
46 additions, 3 deletions
Civi/Aivlspecificactions/Actions/UpdateCallAssignment.php
info.xml
+2
-2
2 additions, 2 deletions
info.xml
with
48 additions
and
5 deletions
Civi/Aivlspecificactions/Actions/UpdateCallAssignment.php
+
46
−
3
View file @
689fe2aa
...
...
@@ -32,6 +32,8 @@ class UpdateCallAssignment extends AbstractAction {
$specs
->
addSpecification
(
new
Specification
(
'activity_id'
,
'Integer'
,
E
::
ts
(
'Activity ID'
),
TRUE
,
NULL
));
$specs
->
addSpecification
(
new
Specification
(
'result_code'
,
'String'
,
E
::
ts
(
'Result Code'
),
TRUE
,
NULL
));
$specs
->
addSpecification
(
new
Specification
(
'result_description'
,
'String'
,
E
::
ts
(
"Result Description"
),
FALSE
,
NULL
));
$specs
->
addSpecification
(
new
Specification
(
'result_agency_reference'
,
'String'
,
E
::
ts
(
"Result Agency Reference"
),
FALSE
,
NULL
));
$specs
->
addSpecification
(
new
Specification
(
'result_code_sdd'
,
'String'
,
E
::
ts
(
"Result Code SDD"
),
FALSE
,
NULL
));
$specs
->
addSpecification
(
new
Specification
(
'call_date'
,
'String'
,
E
::
ts
(
'Call Date'
),
FALSE
,
NULL
));
$specs
->
addSpecification
(
new
Specification
(
'result_upload_date'
,
'String'
,
E
::
ts
(
'Result Upload Date'
),
FALSE
,
NULL
));
$specs
->
addSpecification
(
new
Specification
(
'call_agent'
,
'String'
,
E
::
ts
(
'Call Agent'
),
FALSE
,
NULL
));
...
...
@@ -102,6 +104,8 @@ class UpdateCallAssignment extends AbstractAction {
$this
->
setResultUploadDate
(
$parameterBag
,
$callAssignmentParams
);
$this
->
setResultAgent
(
$parameterBag
,
$callAssignmentParams
);
$this
->
setResultReasonNo
(
$parameterBag
,
$callAssignmentParams
);
$this
->
setResultAgencyReference
(
$parameterBag
,
$callAssignmentParams
);
$this
->
setResultCodeSdd
(
$parameterBag
,
$callAssignmentParams
);
$this
->
setActivityStatus
(
$parameterBag
,
$callAssignmentParams
);
$this
->
setCampaignName
(
$parameterBag
,
$callAssignmentParams
);
$this
->
setNewMandateCode
(
$parameterBag
,
$callAssignmentParams
);
...
...
@@ -159,9 +163,20 @@ class UpdateCallAssignment extends AbstractAction {
$interval
=
$parameterBag
->
getParameter
(
'new_frequency'
);
if
(
$interval
)
{
$unitCustomFieldId
=
"custom_"
.
\Civi
::
service
(
'aivlgeneric'
)
->
getTmCaResultFreqUnitCustomFieldId
();
$intervalCustomFieldId
=
"custom_"
.
\Civi
::
service
(
'aivlgeneric'
)
->
getTmCaResultFreqIntervalCustomFieldId
();
$callAssignmentParams
[
$unitCustomFieldId
]
=
"maand"
;
$callAssignmentParams
[
$intervalCustomFieldId
]
=
$interval
;
switch
(
$interval
)
{
case
4
:
$callAssignmentParams
[
$unitCustomFieldId
]
=
"kwartaal"
;
break
;
case
2
:
$callAssignmentParams
[
$unitCustomFieldId
]
=
"halfjaarlijks"
;
break
;
case
1
:
$callAssignmentParams
[
$unitCustomFieldId
]
=
"jaarlijks"
;
break
;
default
:
$callAssignmentParams
[
$unitCustomFieldId
]
=
"maand"
;
break
;
}
}
}
/**
...
...
@@ -234,6 +249,34 @@ class UpdateCallAssignment extends AbstractAction {
}
}
/**
* Method to set the result agency reference in call assignment parameters
*
* @param ParameterBagInterface $parameterBag
* @param $callAssignmentParams
*/
private
function
setResultAgencyReference
(
ParameterBagInterface
$parameterBag
,
&
$callAssignmentParams
)
{
$reason
=
$parameterBag
->
getParameter
(
'result_agency_reference'
);
if
(
$reason
)
{
$reasonCustomField
=
"custom_"
.
\Civi
::
service
(
'aivlgeneric'
)
->
getTmCaAgencyReferenceCustomFieldId
();
$callAssignmentParams
[
$reasonCustomField
]
=
$reason
;
}
}
/**
* Method to set the result code sdd in call assignment parameters
*
* @param ParameterBagInterface $parameterBag
* @param $callAssignmentParams
*/
private
function
setResultCodeSdd
(
ParameterBagInterface
$parameterBag
,
&
$callAssignmentParams
)
{
$reason
=
$parameterBag
->
getParameter
(
'result_code_sdd'
);
if
(
$reason
)
{
$reasonCustomField
=
"custom_"
.
\Civi
::
service
(
'aivlgeneric'
)
->
getTmCaResultCodeSddCustomFieldId
();
$callAssignmentParams
[
$reasonCustomField
]
=
$reason
;
}
}
/**
* Method to set the result agent in call assignment parameters
*
...
...
This diff is collapsed.
Click to expand it.
info.xml
+
2
−
2
View file @
689fe2aa
...
...
@@ -14,8 +14,8 @@
<url
desc=
"Support"
>
https://civicoop.org
</url>
<url
desc=
"Licensing"
>
http://www.gnu.org/licenses/agpl-3.0.html
</url>
</urls>
<releaseDate>
2022-10-2
0
</releaseDate>
<version>
1.2
3
</version>
<releaseDate>
2022-10-2
4
</releaseDate>
<version>
1.2
4
</version>
<develStage>
stable
</develStage>
<compatibility>
<ver>
4.7
</ver>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment