projects
/
civicrm-core.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1d3c2a4
)
proposed workaround for CRM-17235
author
systopia
<endres@systopia.de>
Wed, 18 May 2016 13:31:31 +0000
(15:31 +0200)
committer
systopia
<endres@systopia.de>
Wed, 18 May 2016 13:31:31 +0000
(15:31 +0200)
CRM/Contribute/BAO/Contribution.php
patch
|
blob
|
blame
|
history
diff --git
a/CRM/Contribute/BAO/Contribution.php
b/CRM/Contribute/BAO/Contribution.php
index df48aab0a946a9d641677c4c9d4ecbd7256d73bf..15027ec83ffd6d3d8dda485ba12aecce80449e82 100644
(file)
--- a/
CRM/Contribute/BAO/Contribution.php
+++ b/
CRM/Contribute/BAO/Contribution.php
@@
-3795,10
+3795,8
@@
WHERE con.id = {$contributionId}
do {
$creditNoteNum++;
$creditNoteId = CRM_Utils_Array::value('credit_notes_prefix', $prefixValue) . "" . $creditNoteNum;
- $result = civicrm_api3('Contribution', 'getcount', array(
- 'sequential' => 1,
- 'creditnote_id' => $creditNoteId,
- ));
+ $params = array(1 => array($creditNoteId, 'String'));
+ $result = CRM_Core_DAO::singleValueQuery("SELECT count(id) FROM civicrm_contribution WHERE creditnote_id = %1", $params);
} while ($result > 0);
return $creditNoteId;