CRM-14930 - ensure data integrity of all contributions.
authorJamie McClelland <jm@mayfirst.org>
Mon, 18 Aug 2014 15:38:32 +0000 (11:38 -0400)
committerJamie McClelland <jm@mayfirst.org>
Mon, 18 Aug 2014 15:38:32 +0000 (11:38 -0400)
Some auth.net contributions may  not have correct net amount set.

----------------------------------------
* CRM-14930: Authorize.net silentpost transactions cannot be edited due to invalid net_amount
  https://issues.civicrm.org/jira/browse/CRM-14930

CRM/Upgrade/Incremental/sql/4.5.beta7.mysql.tpl [new file with mode: 0644]

diff --git a/CRM/Upgrade/Incremental/sql/4.5.beta7.mysql.tpl b/CRM/Upgrade/Incremental/sql/4.5.beta7.mysql.tpl
new file mode 100644 (file)
index 0000000..16e8767
--- /dev/null
@@ -0,0 +1,2 @@
+{* file to handle db changes in 4.5.beta7 during upgrade *}
+UPDATE civicrm_contribution SET net_amount = total_amount - fee_amount WHERE net_amount = 0 OR net_amount IS NULL;