Skip to content
GitLab
Explore
Projects
Groups
Snippets
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
SUD Éducation
Cartable
Commits
70ba6293
Commit
70ba6293
authored
3 years ago
by
Bastien Ho
Browse files
Options
Download
Email Patches
Plain Diff
Comment
parent
1b014487
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
cartable.php
+3
-0
cartable.php
with
3 additions
and
0 deletions
+3
-0
cartable.php
+
3
-
0
View file @
70ba6293
...
...
@@ -199,6 +199,8 @@ function cartable_civicrm_buildForm($formName, &$form) {
function
get_indexed_syndicates_and_provinces
(){
// First get all needed values
$ProvinceField
=
civicrm_api3
(
'CustomField'
,
'getvalue'
,
[
'return'
=>
"id"
,
'name'
=>
"Departements"
]);
if
(
!
$ProvinceField
){
return
false
;
...
...
@@ -208,6 +210,7 @@ function get_indexed_syndicates_and_provinces(){
$Provinces
=
civicrm_api3
(
'StateProvince'
,
'get'
,
[
'country_id'
=>
$CountryId
,
'options'
=>
[
'limit'
=>
0
],
'sequential'
=>
1
]);
$Syndicates
=
civicrm_api3
(
'Contact'
,
'get'
,
[
'return'
=>
"id,display_name,
{
$ProvinceField
}
"
,
'contact_sub_type'
=>
"SyndicatSUD"
,
'options'
=>
[
'limit'
=>-
1
],
'sequential'
=>
1
]);
// Aggregate syndicates per department
$IndexedSyndicates
=
[];
$IndexedProvinces
=
[];
...
...
This diff is collapsed.
Click to expand it.
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
Menu
Explore
Projects
Groups
Snippets