Adamw has uploaded a new change for review.
https://gerrit.wikimedia.org/r/96572
Change subject: (FR #1183) Allow arbitrarily negative refunds
......................................................................
(FR #1183) Allow arbitrarily negative refunds
Sometimes they are positive, sometimes negative... Normalize the value to
positive.
Change-Id: I71edb04acad26c32f7226c707797284647e2e5d2
---
M sites/all/modules/queue2civicrm/refund/wmf_refund_qc.module
1 file changed, 4 insertions(+), 0 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm
refs/changes/72/96572/1
diff --git a/sites/all/modules/queue2civicrm/refund/wmf_refund_qc.module
b/sites/all/modules/queue2civicrm/refund/wmf_refund_qc.module
index d4574ab..4c29691 100644
--- a/sites/all/modules/queue2civicrm/refund/wmf_refund_qc.module
+++ b/sites/all/modules/queue2civicrm/refund/wmf_refund_qc.module
@@ -175,6 +175,10 @@
$parentTxn = $body['gateway_parent_id'];
$refundTxn = $body['gateway_refund_id'];
+ if ( $body['gross'] < 0 ) {
+ $body['gross'] = abs( $body['gross'] );
+ }
+
// FIXME: these WATCHDOG_ERROR's are not exceptions?
if ( $contributions = wmf_civicrm_get_contributions_from_gateway_id(
$gateway, $parentTxn ) ) {
// Perform the refund!
--
To view, visit https://gerrit.wikimedia.org/r/96572
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I71edb04acad26c32f7226c707797284647e2e5d2
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm
Gerrit-Branch: master
Gerrit-Owner: Adamw <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits