/**
  * class constructor
  */
 function __construct($config_name)
 {
     parent::__construct($config_name);
     $config = $this->_plugin_config;
     // read config, set defaults
     // payment should no arrive BEFORE the batch was exported:
     if (!isset($config->export_date_to_payment_min)) {
         $config->export_date_to_payment_min = "-1 days";
     }
     // payment should be there within a month:
     if (!isset($config->export_date_to_payment_max)) {
         $config->export_date_to_payment_max = "+30 days";
     }
     // paymeny is expected to arrive after three days:
     if (!isset($config->export_date_to_payment_delay)) {
         $config->export_date_to_payment_delay = "+3 days";
     }
     // ... but +/- 2 days is also fine without a penalty
     if (!isset($config->export_date_to_payment_tolerance)) {
         $config->export_date_to_payment_tolerance = "2 days";
     }
     // the sum must not deviate by more than 5%:
     if (!isset($config->total_amount_tolerance)) {
         $config->total_amount_tolerance = 0.05;
     }
     // ignore batches older than one year (for performance reasons):
     if (!isset($config->exclude_batches_older_than)) {
         $config->exclude_batches_older_than = "1 YEAR";
     }
 }
 /**
  * class constructor
  */
 function __construct($config_name)
 {
     parent::__construct($config_name);
     $config = $this->_plugin_config;
     if (!isset($config->ignore)) {
         $config->ignore = array();
     }
     if (!isset($config->dont_ignore)) {
         $config->dont_ignore = array();
     }
 }
 /**
  * class constructor
  */
 function __construct($config_name)
 {
     parent::__construct($config_name);
     // read config, set defaults
     $config = $this->_plugin_config;
     if (!isset($config->manual_enabled)) {
         $config->manual_enabled = true;
     }
     if (!isset($config->manual_probability)) {
         $config->manual_probability = 0.1;
     }
     if (!isset($config->manual_show_always)) {
         $config->manual_show_always = true;
     }
     if (!isset($config->lookup_contact_by_name)) {
         $config->lookup_contact_by_name = array('soft_cap_probability' => 0.8, 'soft_cap_min' => 10, 'hard_cap_probability' => 0.4);
     }
     if (!isset($config->manual_title)) {
         $config->manual_title = "Manually processed.";
     }
     if (!isset($config->manual_message)) {
         $config->manual_message = "Please configure";
     }
     if (!isset($config->manual_default_source)) {
         $config->manual_default_source = "";
     }
     if (!isset($config->manual_contribution)) {
         $config->manual_contribution = "Contribution:";
     }
     if (!isset($config->default_financial_type_id)) {
         $config->default_financial_type_id = 1;
     }
     if (!isset($config->createnew_value_propagation)) {
         $config->createnew_value_propagation = array();
     }
     if (!isset($config->ignore_enabled)) {
         $config->ignore_enabled = true;
     }
     if (!isset($config->ignore_probability)) {
         $config->ignore_probability = 0.1;
     }
     if (!isset($config->ignore_show_always)) {
         $config->ignore_show_always = true;
     }
     if (!isset($config->ignore_title)) {
         $config->ignore_title = "Not Relevant";
     }
     if (!isset($config->ignore_message)) {
         $config->ignore_message = "Please configure";
     }
 }
 /**
  * class constructor
  */
 function __construct($config_name)
 {
     parent::__construct($config_name);
     // read config, set defaults
     $config = $this->_plugin_config;
     if (!isset($config->threshold)) {
         $config->threshold = 0.5;
     }
     if (!isset($config->general_options)) {
         $config->general_options = array();
     }
     if (!isset($config->membership_options)) {
         $config->membership_options = array();
     }
 }
 /**
  * class constructor
  */
 function __construct($config_name)
 {
     parent::__construct($config_name);
     // read config, set defaults
     $config = $this->_plugin_config;
     if (!isset($config->auto_exec)) {
         $config->auto_exec = false;
     }
     if (!isset($config->required_values)) {
         $config->required_values = array("btx.financial_type_id", "btx.campaign_id");
     }
     if (!isset($config->factor)) {
         $config->factor = 1.0;
     }
     if (!isset($config->threshold)) {
         $config->threshold = 0.0;
     }
     if (!isset($config->source_label)) {
         $config->source_label = ts('Source');
     }
     if (!isset($config->lookup_contact_by_name)) {
         $config->lookup_contact_by_name = array("hard_cap_probability" => 0.9);
     }
 }
 /**
  * class constructor
  */
 function __construct($config_name)
 {
     parent::__construct($config_name);
     // read config, set defaults
     $config = $this->_plugin_config;
     if (!isset($config->threshold)) {
         $config->threshold = 0.5;
     }
     if (!isset($config->search_terms)) {
         $config->search_terms = array();
     }
     if (!isset($config->search_wo_contacts)) {
         $config->search_wo_contacts = FALSE;
     }
     // if true, the matcher will keep searching (using the search_terms) even if no contacts are found
     if (!isset($config->contact_id_list)) {
         $config->contact_id_list = '';
     }
     // if not empty, take contacts from comma separated list instead of contact search
     if (!isset($config->created_contribution_status)) {
         $config->created_contribution_status = 'Completed';
     }
     if (!isset($config->recurring_contribution_status)) {
         $config->recurring_contribution_status = array('Pending');
     }
     if (!isset($config->suggestion_title)) {
         $config->suggestion_title = '';
     }
     if (!isset($config->recurring_mode)) {
         $config->recurring_mode = 'static';
     }
     // see getExpectedDate()
     // amount check / amount penalty
     if (!isset($config->amount_check)) {
         $config->amount_check = "1";
     }
     if (!isset($config->amount_relative_minimum)) {
         $config->amount_relative_minimum = 1.0;
     }
     if (!isset($config->amount_relative_maximum)) {
         $config->amount_relative_maximum = 1.0;
     }
     if (!isset($config->amount_absolute_minimum)) {
         $config->amount_absolute_minimum = 0;
     }
     if (!isset($config->amount_absolute_maximum)) {
         $config->amount_absolute_maximum = 1;
     }
     if (!isset($config->amount_penalty)) {
         $config->amount_penalty = 1.0;
     }
     // date check / date range
     if (!isset($config->received_date_check)) {
         $config->received_date_check = "1";
     }
     // WARNING: DISABLING THIS COULD MAKE THE PROCESS VERY SLOW
     if (!isset($config->acceptable_date_offset_from)) {
         $config->acceptable_date_offset_from = "-1 days";
     }
     if (!isset($config->acceptable_date_offset_to)) {
         $config->acceptable_date_offset_to = "+1 days";
     }
     if (!isset($config->date_offset_minimum)) {
         $config->date_offset_minimum = "-5 days";
     }
     if (!isset($config->date_offset_maximum)) {
         $config->date_offset_maximum = "+15 days";
     }
     if (!isset($config->date_penalty)) {
         $config->date_penalty = 0.5;
     }
     // other checks
     if (!isset($config->payment_instrument_penalty)) {
         $config->payment_instrument_penalty = 0.0;
     }
     if (!isset($config->currency_penalty)) {
         $config->currency_penalty = 0.5;
     }
     // check existing payments
     if (!isset($config->existing_check)) {
         $config->existing_check = "1";
     }
     if (!isset($config->existing_penalty)) {
         $config->existing_penalty = 0.3;
     }
     if (!isset($config->existing_status_ids)) {
         $config->existing_status_ids = array(1, 2);
     }
     if (!isset($config->existing_precision)) {
         $config->existing_precision = "80%";
     }
     // allows payment within +/- 20% of the cycle period
     //  would also accept number (e.g. "5") meaning +/- 5 days
 }
Example #7
0
 /**
  * class constructor
  */
 function __construct($config_name)
 {
     parent::__construct($config_name);
 }
 /**
  * class constructor
  */
 function __construct($config_name)
 {
     parent::__construct($config_name);
     // read config, set defaults
     $config = $this->_plugin_config;
     if (!isset($config->threshold)) {
         $config->threshold = 0.5;
     }
     if (!isset($config->mode)) {
         $config->mode = "default";
     }
     // other mode is "cancellation"
     if (!isset($config->title)) {
         $config->title = "";
     }
     // default title
     if (!isset($config->accepted_contribution_states)) {
         $config->accepted_contribution_states = array("Completed", "Pending");
     }
     if (!isset($config->lookup_contact_by_name)) {
         $config->lookup_contact_by_name = array('soft_cap_probability' => 0.8, 'soft_cap_min' => 5, 'hard_cap_probability' => 0.4);
     }
     // search IDs and/or external ID list
     if (!isset($config->contribution_search)) {
         $config->contribution_search = "1";
     }
     if (!isset($config->contribution_list)) {
         $config->contribution_list = "";
     }
     // expects name of field that contains a comma separated list of contribution IDs
     // date check / date range
     if (!isset($config->received_date_check)) {
         $config->received_date_check = "1";
     }
     // WARNING: DISABLING THIS COULD MAKE THE PROCESS VERY SLOW
     if (!isset($config->received_range_days)) {
         $config->received_range_days = 366;
     }
     // WARNING: INCREASING THIS COULD MAKE THE PROCESS VERY SLOW
     if (!isset($config->received_date_minimum)) {
         $config->received_date_minimum = "-100 days";
     }
     if (!isset($config->received_date_maximum)) {
         $config->received_date_maximum = "+1 days";
     }
     if (!isset($config->date_penalty)) {
         $config->date_penalty = 1.0;
     }
     if (!isset($config->payment_instrument_penalty)) {
         $config->payment_instrument_penalty = 0.0;
     }
     // amount check / amount penalty
     if (!isset($config->amount_check)) {
         $config->amount_check = "1";
     }
     if (!isset($config->amount_relative_minimum)) {
         $config->amount_relative_minimum = 1.0;
     }
     if (!isset($config->amount_relative_maximum)) {
         $config->amount_relative_maximum = 1.0;
     }
     if (!isset($config->amount_absolute_minimum)) {
         $config->amount_absolute_minimum = 0;
     }
     if (!isset($config->amount_absolute_maximum)) {
         $config->amount_absolute_maximum = 1;
     }
     if (!isset($config->amount_penalty)) {
         $config->amount_penalty = 1.0;
     }
     if (!isset($config->currency_penalty)) {
         $config->currency_penalty = 0.5;
     }
     // extended cancellation features: enter cancel_reason
     if (!isset($config->cancellation_cancel_reason)) {
         $config->cancellation_cancel_reason = 0;
     }
     // set to 1 to enable
     if (!isset($config->cancellation_cancel_reason_edit)) {
         $config->cancellation_cancel_reason_edit = 1;
     }
     // set to 0 to disable user input
     if (!isset($config->cancellation_cancel_reason_source)) {
         $config->cancellation_cancel_reason_source = 'cancel_reason';
     }
     if (!isset($config->cancellation_cancel_reason_default)) {
         $config->cancellation_cancel_reason_default = ts('Unknown');
     }
     // extended cancellation features: fee
     if (!isset($config->cancellation_cancel_fee)) {
         $config->cancellation_cancel_fee = 0;
     }
     // set to 1 to enable
     if (!isset($config->cancellation_cancel_fee_edit)) {
         $config->cancellation_cancel_fee_edit = 1;
     }
     // set to 0 to disable user input
     if (!isset($config->cancellation_cancel_fee_source)) {
         $config->cancellation_cancel_fee_source = 'cancellation_fee';
     }
     // external source field in btx->data_parsed
     if (!isset($config->cancellation_cancel_fee_store)) {
         $config->cancellation_cancel_fee_store = 'match.cancel_fee';
     }
     // where to store the calculated fee, for syntax see value_propagation
     if (!isset($config->cancellation_cancel_fee_default)) {
         $config->cancellation_cancel_fee_default = 'difference';
     }
     // evaluated term, valid variables: 'difference'- (btx->amount + contribution->total_amount), 'source'- content of btx->data_parsed[$config->cancellation_cancel_fee_source]
     // add to value_propagation
     if ($config->cancellation_cancel_fee && !empty($config->cancellation_cancel_fee_store)) {
         // add entry to value propagation
         if (!isset($config->value_propagation)) {
             $config->value_propagation = array();
         }
         $config->value_propagation->{'match.cancel_fee'} = $config->cancellation_cancel_fee_store;
     }
 }
 /**
  * class constructor
  */
 function __construct($config_name)
 {
     parent::__construct($config_name);
     // read config, set defaults
     $config = $this->_plugin_config;
     if (!isset($config->threshold)) {
         $config->threshold = 0.5;
     }
     if (!isset($config->received_date_minimum)) {
         $config->received_date_minimum = "-10 days";
     }
     if (!isset($config->received_date_maximum)) {
         $config->received_date_maximum = "+10 days";
     }
     if (!isset($config->deviation_penalty)) {
         $config->deviation_penalty = 0.1;
     }
     if (!isset($config->value_propagation)) {
         $config->value_propagation = array();
     }
     if (!isset($config->cancellation_enabled)) {
         $config->cancellation_enabled = FALSE;
     }
     if (!isset($config->cancellation_general_penalty)) {
         $config->cancellation_general_penalty = 0.0;
     }
     if (!isset($config->cancellation_update_mandate_status_OOFF)) {
         $config->cancellation_update_mandate_status_OOFF = 'INVALID';
     }
     if (!isset($config->cancellation_update_mandate_status_RCUR)) {
         $config->cancellation_update_mandate_status_RCUR = false;
     }
     if (!isset($config->cancellation_default_reason)) {
         $config->cancellation_default_reason = ts("Unspecified SEPA cancellation");
     }
     if (!isset($config->cancellation_date_minimum)) {
         $config->cancellation_date_minimum = "-10 days";
     }
     if (!isset($config->cancellation_date_maximum)) {
         $config->cancellation_date_maximum = "+30 days";
     }
     if (!isset($config->cancellation_amount_relative_minimum)) {
         $config->cancellation_amount_relative_minimum = 1.0;
     }
     if (!isset($config->cancellation_amount_relative_maximum)) {
         $config->cancellation_amount_relative_maximum = 1.0;
     }
     if (!isset($config->cancellation_amount_absolute_minimum)) {
         $config->cancellation_amount_absolute_minimum = 1.0;
     }
     if (!isset($config->cancellation_amount_absolute_maximum)) {
         $config->cancellation_amount_absolute_maximum = 1.0;
     }
     if (!isset($config->cancellation_amount_penalty)) {
         $config->cancellation_amount_penalty = $config->deviation_penalty;
     }
     if (!isset($config->cancellation_penalty_threshold)) {
         $config->cancellation_penalty_threshold = $config->deviation_penalty;
     }
     if (!isset($config->cancellation_value_propagation)) {
         $config->cancellation_value_propagation = $config->value_propagation;
     }
     // extended cancellation features: enter cancel_reason
     if (!isset($config->cancellation_cancel_reason)) {
         $config->cancellation_cancel_reason = 0;
     }
     // set to 1 to enable
     if (!isset($config->cancellation_cancel_reason_edit)) {
         $config->cancellation_cancel_reason_edit = 1;
     }
     // set to 0 to disable user input
     if (!isset($config->cancellation_cancel_reason_source)) {
         $config->cancellation_cancel_reason_source = 'cancel_reason';
     }
     if (!isset($config->cancellation_cancel_reason_default)) {
         $config->cancellation_cancel_reason_default = ts('Unknown');
     }
     // extended cancellation features: fee
     if (!isset($config->cancellation_cancel_fee)) {
         $config->cancellation_cancel_fee = 0;
     }
     // set to 1 to enable
     if (!isset($config->cancellation_cancel_fee_edit)) {
         $config->cancellation_cancel_fee_edit = 1;
     }
     // set to 0 to disable user input
     if (!isset($config->cancellation_cancel_fee_source)) {
         $config->cancellation_cancel_fee_source = 'cancellation_fee';
     }
     // external source field in btx->data_parsed
     if (!isset($config->cancellation_cancel_fee_store)) {
         $config->cancellation_cancel_fee_store = 'match.cancel_fee';
     }
     // where to store the calculated fee, for syntax see value_propagation
     if (!isset($config->cancellation_cancel_fee_default)) {
         $config->cancellation_cancel_fee_default = 'difference';
     }
     // evaluated term, valid variables: 'difference'- (btx->amount + contribution->total_amount), 'source'- content of btx->data_parsed[$config->cancellation_cancel_fee_source]
     // add to value_propagation
     if ($config->cancellation_cancel_fee && !empty($config->cancellation_cancel_fee_store)) {
         // add entry to value propagation
         if (!isset($config->cancellation_value_propagation)) {
             $config->cancellation_value_propagation = array();
         }
         $config->cancellation_value_propagation->{'match.cancel_fee'} = $config->cancellation_cancel_fee_store;
     }
     // create activity
     if (!isset($config->cancellation_create_activity)) {
         $config->cancellation_create_activity = false;
     }
     if (!isset($config->cancellation_create_activity_type_id)) {
         $config->cancellation_create_activity_type_id = 37;
     }
     if (!isset($config->cancellation_create_activity_subject)) {
         $config->cancellation_create_activity_subject = ts("Follow-up SEPA Cancellation");
     }
     if (!isset($config->cancellation_create_activity_assignee_id)) {
         $config->cancellation_create_activity_assignee_id = 0;
     }
     // will be replaced with current user
     if (!isset($config->cancellation_create_activity_text)) {
         $config->cancellation_create_activity_text = '';
     }
 }
Example #10
0
 /**
  * class constructor
  */
 function __construct($config_name)
 {
     parent::__construct($config_name);
     $this->parseConditions();
 }