Skip to content

Commit 1a6060f

Browse files
committed
Merge pull request #44 from systopia/master
Update to version 0.3.2
2 parents f65a9a9 + 821de9d commit 1a6060f

File tree

8 files changed

+60
-23
lines changed

8 files changed

+60
-23
lines changed

extension/CRM/Banking/PluginImpl/CSVImporter.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ protected function apply_rule($rule, $line, &$btx, $header) {
309309
// TRIM will strip the string of
310310
$params = explode(":", $rule->type);
311311
if (isset($params[1])) {
312-
// the user provided a date format
312+
// the user provided a the trim parameters
313313
$btx[$rule->to] = trim($value, $params[1]);
314314
} else {
315315
$btx[$rule->to] = trim($value);

extension/CRM/Banking/PluginImpl/Matcher/ExistingContribution.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ function __construct($config_name) {
2020
$config = $this->_plugin_config;
2121
if (!isset($config->threshold)) $config->threshold = 0.5;
2222
if (!isset($config->mode)) $config->mode = "default"; // other mode is "cancellation"
23-
if (!isset($config->accepted_contribution_states)) $config->accepted_contribution_states = ["Completed", "Pending"];
23+
if (!isset($config->accepted_contribution_states)) $config->accepted_contribution_states = array("Completed", "Pending");
2424
if (!isset($config->received_date_minimum)) $config->received_date_minimum = "-100 days";
2525
if (!isset($config->received_date_maximum)) $config->received_date_maximum = "+1 days";
2626
if (!isset($config->date_penalty)) $config->date_penalty = 1.0;

extension/CRM/Banking/PluginModel/Matcher.php

+3-2
Original file line numberDiff line numberDiff line change
@@ -217,8 +217,9 @@ public function getPropagationValue($btx, $key) {
217217
return $btx->$key_bits[1];
218218
} else {
219219
// look in the parsed values
220-
if (isset($btx->getDataParsed()->$key_bits[1])) {
221-
return $btx->getDataParsed()->$key_bits[1];
220+
$data = $btx->getDataParsed();
221+
if (isset($data[$key_bits[1]])) {
222+
return $data[$key_bits[1]];
222223
} else {
223224
return NULL;
224225
}

extension/hooks.php

+27-6
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ function banking_civicrm_navigationMenu(&$params) {
3131
'child' => array(
3232
$level => array(
3333
'attributes' => array(
34-
'label' => 'Dashboard',
34+
'label' => ts('Dashboard'),
3535
'name' => 'Dashboard',
3636
'url' => 'civicrm/banking/dashboard',
3737
'permission' => 'access CiviContribute',
@@ -45,7 +45,7 @@ function banking_civicrm_navigationMenu(&$params) {
4545
),
4646
$level => array(
4747
'attributes' => array(
48-
'label' => 'Payments',
48+
'label' => ts('Show Statements'),
4949
'name' => 'Payments',
5050
'url' => 'civicrm/banking/payments',
5151
'permission' => 'access CiviContribute',
@@ -59,7 +59,7 @@ function banking_civicrm_navigationMenu(&$params) {
5959
),
6060
$level => array(
6161
'attributes' => array(
62-
'label' => 'Find Accounts',
62+
'label' => ts('Find Accounts'),
6363
'name' => 'Find Accounts',
6464
'url' => 'civicrm/banking/search',
6565
'permission' => 'access CiviContribute',
@@ -73,7 +73,7 @@ function banking_civicrm_navigationMenu(&$params) {
7373
),
7474
$level => array(
7575
'attributes' => array(
76-
'label' => 'Manage Accounts',
76+
'label' => ts('Manage Accounts'),
7777
'name' => 'Manage Accounts',
7878
'url' => 'civicrm/banking/accounts',
7979
'permission' => 'access CiviContribute',
@@ -87,7 +87,7 @@ function banking_civicrm_navigationMenu(&$params) {
8787
),
8888
$level => array(
8989
'attributes' => array(
90-
'label' => 'Import Payments',
90+
'label' => ts('Import Payments'),
9191
'name' => 'Import Payments',
9292
'url' => 'civicrm/banking/import',
9393
'permission' => 'access CiviContribute',
@@ -101,7 +101,7 @@ function banking_civicrm_navigationMenu(&$params) {
101101
),
102102
$level => array(
103103
'attributes' => array(
104-
'label' => 'Configuration',
104+
'label' => ts('Configuration'),
105105
'name' => 'Configuration',
106106
'url' => 'civicrm/banking/manager',
107107
'permission' => 'access CiviContribute',
@@ -148,4 +148,25 @@ function banking_civicrm_tabs( &$tabs, $contactID ) {
148148
'title' => ts("Bank Accounts"),
149149
'weight' => 95,
150150
'count' => $count_query->acCount));
151+
}
152+
153+
154+
/* bank accounts in merge operations
155+
*/
156+
function banking_civicrm_merge ( $type, &$data, $mainId = NULL, $otherId = NULL, $tables = NULL ) {
157+
switch ($type) {
158+
case 'relTables':
159+
// Offer user to merge SEPA Mandates
160+
$data['rel_table_bankaccounts'] = array(
161+
'title' => ts('Bank Accounts'),
162+
'tables' => array('civicrm_bank_account'),
163+
'url' => CRM_Utils_System::url('civicrm/contact/view', 'reset=1&cid=$cid&selectedChild=bank_accounts'), // '$cid' will be automatically replaced
164+
);
165+
break;
166+
167+
case 'cidRefs':
168+
// this is the only field that needs to be modified
169+
$data['civicrm_bank_account'] = array('contact_id');
170+
break;
171+
}
151172
}

extension/info.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<email>project-60@ml.foebud.org</email>
1010
</maintainer>
1111
<releaseDate>2014-01-15</releaseDate>
12-
<version>0.3.1</version>
12+
<version>0.3.2</version>
1313
<develStage>alpha</develStage>
1414
<compatibility>
1515
<ver>4.4</ver>

extension/versions.txt

+6
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
Version History
22
===============
33

4+
version 0.3.2
5+
=============
6+
- FIX: move bank accounts when merging contacts
7+
- FIX: translated menu
8+
- FIX: value propagation in some matchers
9+
410

511
version 0.3.1
612
=============

l10n/CiviBanking.pot

+10-6
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ msgstr ""
238238
msgid "Warning: bad matcher evidence"
239239
msgstr ""
240240

241-
#: on/CRM/Banking/Page/AccountSearch.php
241+
#: on/CRM/Banking/Page/AccountSearch.php on/hooks.php
242242
msgid "Find Accounts"
243243
msgstr ""
244244

@@ -291,7 +291,7 @@ msgid "Manage CiviBanking Components"
291291
msgstr ""
292292

293293
#: on/CRM/Banking/Page/Payments.php
294-
#: on/CRM/Banking/PluginImpl/Matcher/Batches.php
294+
#: on/CRM/Banking/PluginImpl/Matcher/Batches.php on/hooks.php
295295
msgid "Payments"
296296
msgstr ""
297297

@@ -496,7 +496,7 @@ msgstr ""
496496
msgid "Show Statements"
497497
msgstr ""
498498

499-
#: templates/CRM/Banking/Page/Payments.tpl
499+
#: templates/CRM/Banking/Page/Payments.tpl on/hooks.php
500500
msgid "Show Payments"
501501
msgstr ""
502502

@@ -806,15 +806,15 @@ msgstr ""
806806
msgid "Back"
807807
msgstr ""
808808

809-
#: menu entry
809+
#: menu entry on/hooks.php
810810
msgid "Manage Accounts"
811811
msgstr ""
812812

813-
#: menu entry
813+
#: menu entry on/hooks.php
814814
msgid "Import Payments"
815815
msgstr ""
816816

817-
#: menu entry
817+
#: menu entry on/hooks.php
818818
msgid "Configuration"
819819
msgstr ""
820820

@@ -1088,3 +1088,7 @@ msgstr ""
10881088
#: templates/CRM/Banking/Page/Review.tpl
10891089
msgid "Skip Processed"
10901090
msgstr ""
1091+
1092+
#: on/hooks.php
1093+
msgid "Dashboard"
1094+
msgstr ""

l10n/CiviBanking_de_DE.po

+11-6
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ msgstr "Programmfehler: Wahrscheinlichkeitsangabe außerhalb von [0..1], wird al
237237
msgid "Warning: bad matcher evidence"
238238
msgstr "Warnung: Schlechte Matcher-Evidenzen"
239239

240-
#: on/CRM/Banking/Page/AccountSearch.php
240+
#: on/CRM/Banking/Page/AccountSearch.php on/hooks.php
241241
msgid "Find Accounts"
242242
msgstr "Konten finden"
243243

@@ -290,7 +290,7 @@ msgid "Manage CiviBanking Components"
290290
msgstr "CiviBanking-Komponenten verwalten"
291291

292292
#: on/CRM/Banking/Page/Payments.php
293-
#: on/CRM/Banking/PluginImpl/Matcher/Batches.php
293+
#: on/CRM/Banking/PluginImpl/Matcher/Batches.php on/hooks.php
294294
msgid "Payments"
295295
msgstr "Zahlungen"
296296

@@ -495,7 +495,7 @@ msgstr "Profil hinzufügen"
495495
msgid "Show Statements"
496496
msgstr "Kontoauszüge anzeigen"
497497

498-
#: templates/CRM/Banking/Page/Payments.tpl
498+
#: templates/CRM/Banking/Page/Payments.tpl on/hooks.php
499499
msgid "Show Payments"
500500
msgstr "Zahlungen anzeigen"
501501

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

802-
#: menu entry
802+
#: menu entry on/hooks.php
803803
msgid "Manage Accounts"
804804
msgstr "Konten verwalten"
805805

806-
#: menu entry
806+
#: menu entry on/hooks.php
807807
msgid "Import Payments"
808808
msgstr "Zahlungen importieren"
809809

810-
#: menu entry
810+
#: menu entry on/hooks.php
811811
msgid "Configuration"
812812
msgstr "Konfiguration"
813813

@@ -1074,6 +1074,11 @@ msgstr ""
10741074
msgid "Skip Processed"
10751075
msgstr "Nächste Unbearbeitete"
10761076

1077+
#: on/hooks.php
1078+
#, fuzzy
1079+
msgid "Dashboard"
1080+
msgstr "CiviBanking Übersicht"
1081+
10771082
#, fuzzy
10781083
#~ msgid "Payment count<"
10791084
#~ msgstr "Anzahl"

0 commit comments

Comments
 (0)