Skip to content

Commit

Permalink
Merge pull request #44 from systopia/master
Browse files Browse the repository at this point in the history
Update to version 0.3.2
  • Loading branch information
bjendres committed Feb 4, 2014
2 parents f65a9a9 + 821de9d commit 1a6060f
Show file tree
Hide file tree
Showing 8 changed files with 60 additions and 23 deletions.
2 changes: 1 addition & 1 deletion extension/CRM/Banking/PluginImpl/CSVImporter.php
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ protected function apply_rule($rule, $line, &$btx, $header) {
// TRIM will strip the string of
$params = explode(":", $rule->type);
if (isset($params[1])) {
// the user provided a date format
// the user provided a the trim parameters
$btx[$rule->to] = trim($value, $params[1]);
} else {
$btx[$rule->to] = trim($value);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ function __construct($config_name) {
$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->accepted_contribution_states)) $config->accepted_contribution_states = ["Completed", "Pending"];
if (!isset($config->accepted_contribution_states)) $config->accepted_contribution_states = array("Completed", "Pending");
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;
Expand Down
5 changes: 3 additions & 2 deletions extension/CRM/Banking/PluginModel/Matcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -217,8 +217,9 @@ public function getPropagationValue($btx, $key) {
return $btx->$key_bits[1];
} else {
// look in the parsed values
if (isset($btx->getDataParsed()->$key_bits[1])) {
return $btx->getDataParsed()->$key_bits[1];
$data = $btx->getDataParsed();
if (isset($data[$key_bits[1]])) {
return $data[$key_bits[1]];
} else {
return NULL;
}
Expand Down
33 changes: 27 additions & 6 deletions extension/hooks.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ function banking_civicrm_navigationMenu(&$params) {
'child' => array(
$level => array(
'attributes' => array(
'label' => 'Dashboard',
'label' => ts('Dashboard'),
'name' => 'Dashboard',
'url' => 'civicrm/banking/dashboard',
'permission' => 'access CiviContribute',
Expand All @@ -45,7 +45,7 @@ function banking_civicrm_navigationMenu(&$params) {
),
$level => array(
'attributes' => array(
'label' => 'Payments',
'label' => ts('Show Statements'),
'name' => 'Payments',
'url' => 'civicrm/banking/payments',
'permission' => 'access CiviContribute',
Expand All @@ -59,7 +59,7 @@ function banking_civicrm_navigationMenu(&$params) {
),
$level => array(
'attributes' => array(
'label' => 'Find Accounts',
'label' => ts('Find Accounts'),
'name' => 'Find Accounts',
'url' => 'civicrm/banking/search',
'permission' => 'access CiviContribute',
Expand All @@ -73,7 +73,7 @@ function banking_civicrm_navigationMenu(&$params) {
),
$level => array(
'attributes' => array(
'label' => 'Manage Accounts',
'label' => ts('Manage Accounts'),
'name' => 'Manage Accounts',
'url' => 'civicrm/banking/accounts',
'permission' => 'access CiviContribute',
Expand All @@ -87,7 +87,7 @@ function banking_civicrm_navigationMenu(&$params) {
),
$level => array(
'attributes' => array(
'label' => 'Import Payments',
'label' => ts('Import Payments'),
'name' => 'Import Payments',
'url' => 'civicrm/banking/import',
'permission' => 'access CiviContribute',
Expand All @@ -101,7 +101,7 @@ function banking_civicrm_navigationMenu(&$params) {
),
$level => array(
'attributes' => array(
'label' => 'Configuration',
'label' => ts('Configuration'),
'name' => 'Configuration',
'url' => 'civicrm/banking/manager',
'permission' => 'access CiviContribute',
Expand Down Expand Up @@ -148,4 +148,25 @@ function banking_civicrm_tabs( &$tabs, $contactID ) {
'title' => ts("Bank Accounts"),
'weight' => 95,
'count' => $count_query->acCount));
}


/* bank accounts in merge operations
*/
function banking_civicrm_merge ( $type, &$data, $mainId = NULL, $otherId = NULL, $tables = NULL ) {
switch ($type) {
case 'relTables':
// Offer user to merge SEPA Mandates
$data['rel_table_bankaccounts'] = array(
'title' => ts('Bank Accounts'),
'tables' => array('civicrm_bank_account'),
'url' => CRM_Utils_System::url('civicrm/contact/view', 'reset=1&cid=$cid&selectedChild=bank_accounts'), // '$cid' will be automatically replaced
);
break;

case 'cidRefs':
// this is the only field that needs to be modified
$data['civicrm_bank_account'] = array('contact_id');
break;
}
}
2 changes: 1 addition & 1 deletion extension/info.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<email>project-60@ml.foebud.org</email>
</maintainer>
<releaseDate>2014-01-15</releaseDate>
<version>0.3.1</version>
<version>0.3.2</version>
<develStage>alpha</develStage>
<compatibility>
<ver>4.4</ver>
Expand Down
6 changes: 6 additions & 0 deletions extension/versions.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
Version History
===============

version 0.3.2
=============
- FIX: move bank accounts when merging contacts
- FIX: translated menu
- FIX: value propagation in some matchers


version 0.3.1
=============
Expand Down
16 changes: 10 additions & 6 deletions l10n/CiviBanking.pot
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ msgstr ""
msgid "Warning: bad matcher evidence"
msgstr ""

#: on/CRM/Banking/Page/AccountSearch.php
#: on/CRM/Banking/Page/AccountSearch.php on/hooks.php
msgid "Find Accounts"
msgstr ""

Expand Down Expand Up @@ -291,7 +291,7 @@ msgid "Manage CiviBanking Components"
msgstr ""

#: on/CRM/Banking/Page/Payments.php
#: on/CRM/Banking/PluginImpl/Matcher/Batches.php
#: on/CRM/Banking/PluginImpl/Matcher/Batches.php on/hooks.php
msgid "Payments"
msgstr ""

Expand Down Expand Up @@ -496,7 +496,7 @@ msgstr ""
msgid "Show Statements"
msgstr ""

#: templates/CRM/Banking/Page/Payments.tpl
#: templates/CRM/Banking/Page/Payments.tpl on/hooks.php
msgid "Show Payments"
msgstr ""

Expand Down Expand Up @@ -806,15 +806,15 @@ msgstr ""
msgid "Back"
msgstr ""

#: menu entry
#: menu entry on/hooks.php
msgid "Manage Accounts"
msgstr ""

#: menu entry
#: menu entry on/hooks.php
msgid "Import Payments"
msgstr ""

#: menu entry
#: menu entry on/hooks.php
msgid "Configuration"
msgstr ""

Expand Down Expand Up @@ -1088,3 +1088,7 @@ msgstr ""
#: templates/CRM/Banking/Page/Review.tpl
msgid "Skip Processed"
msgstr ""

#: on/hooks.php
msgid "Dashboard"
msgstr ""
17 changes: 11 additions & 6 deletions l10n/CiviBanking_de_DE.po
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ msgstr "Programmfehler: Wahrscheinlichkeitsangabe außerhalb von [0..1], wird al
msgid "Warning: bad matcher evidence"
msgstr "Warnung: Schlechte Matcher-Evidenzen"

#: on/CRM/Banking/Page/AccountSearch.php
#: on/CRM/Banking/Page/AccountSearch.php on/hooks.php
msgid "Find Accounts"
msgstr "Konten finden"

Expand Down Expand Up @@ -290,7 +290,7 @@ msgid "Manage CiviBanking Components"
msgstr "CiviBanking-Komponenten verwalten"

#: on/CRM/Banking/Page/Payments.php
#: on/CRM/Banking/PluginImpl/Matcher/Batches.php
#: on/CRM/Banking/PluginImpl/Matcher/Batches.php on/hooks.php
msgid "Payments"
msgstr "Zahlungen"

Expand Down Expand Up @@ -495,7 +495,7 @@ msgstr "Profil hinzufügen"
msgid "Show Statements"
msgstr "Kontoauszüge anzeigen"

#: templates/CRM/Banking/Page/Payments.tpl
#: templates/CRM/Banking/Page/Payments.tpl on/hooks.php
msgid "Show Payments"
msgstr "Zahlungen anzeigen"

Expand Down Expand Up @@ -799,15 +799,15 @@ msgstr "Keine Kontoauszüge mit dem gewählten Stats gefunden. Wählen Sie ggf.
msgid "Back"
msgstr "Zurück"

#: menu entry
#: menu entry on/hooks.php
msgid "Manage Accounts"
msgstr "Konten verwalten"

#: menu entry
#: menu entry on/hooks.php
msgid "Import Payments"
msgstr "Zahlungen importieren"

#: menu entry
#: menu entry on/hooks.php
msgid "Configuration"
msgstr "Konfiguration"

Expand Down Expand Up @@ -1074,6 +1074,11 @@ msgstr ""
msgid "Skip Processed"
msgstr "Nächste Unbearbeitete"

#: on/hooks.php
#, fuzzy
msgid "Dashboard"
msgstr "CiviBanking Übersicht"

#, fuzzy
#~ msgid "Payment count<"
#~ msgstr "Anzahl"
Expand Down

0 comments on commit 1a6060f

Please sign in to comment.