Commit 70ba6293 authored by Bastien Ho's avatar Bastien Ho :alien:
Browse files

Comment

parent 1b014487
No related merge requests found
Showing with 3 additions and 0 deletions
+3 -0
......@@ -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 = [];
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment