Ejegg has submitted this change and it was merged.
Change subject: CRM-17951 Add Chargeback Contribution status and optional
account relationship types for chargeback & refund
......................................................................
CRM-17951 Add Chargeback Contribution status and optional account relationship
types for chargeback & refund
Note, I'm still on the fence about whether we need to use the latter - having
an 'established' Chargeback status that works like refund may be enough
Bug: T124979
Change-Id: I35fc1346c695a07e7842fac72ce3c7d760207749
---
M sites/all/modules/wmf_civicrm/wmf_civicrm.install
1 file changed, 30 insertions(+), 0 deletions(-)
Approvals:
Ejegg: Looks good to me, approved
jenkins-bot: Verified
diff --git a/sites/all/modules/wmf_civicrm/wmf_civicrm.install
b/sites/all/modules/wmf_civicrm/wmf_civicrm.install
index 0204d85..f6868e4 100644
--- a/sites/all/modules/wmf_civicrm/wmf_civicrm.install
+++ b/sites/all/modules/wmf_civicrm/wmf_civicrm.install
@@ -46,6 +46,7 @@
wmf_civicrm_update_7064();
wmf_civicrm_update_7080();
wmf_civicrm_update_7090();
+ wmf_civicrm_update_7100();
}
/**
@@ -1670,3 +1671,32 @@
'civicrm_financial_item' => array(array('entity_id', 'entity_table')),
));
}
+
+/**
+ * T124979 add Chargeback refund status and chargeback & contra account
relationships.
+ *
+ * This is the same code in 4.7.2 to add these options and is written to be
upgrade safe.
+ */
+function wmf_civicrm_update_7100() {
+ civicrm_initialize();
+ // First we enable and edit the record for Credit contra - this exists but
is disabled for most sites.
+ // Using the ensure function (below) will not enabled a disabled option (by
design).
+ CRM_Core_DAO::executeQuery("UPDATE civicrm_option_value v
+ INNER JOIN civicrm_option_group g on v.option_group_id=g.id and
g.name='account_relationship'
+ SET v.is_active=1, v.label='Credit/Contra Revenue Account is',
v.name='Credit/Contra Revenue Account is', v.description='Credit/Contra Revenue
Account is'
+ WHERE v.name = 'Credit/Contra Account is';");
+ CRM_Core_BAO_OptionValue::ensureOptionValueExists(array(
+ 'option_group_id' => 'account_relationship',
+ 'name' => 'Chargeback Account is',
+ 'label' => ts('Chargeback Account is'),
+ 'is_active' => TRUE,
+ 'component_id' => 'CiviContribute',
+ ));
+ CRM_Core_BAO_OptionValue::ensureOptionValueExists(array(
+ 'option_group_id' => 'contribution_status',
+ 'name' => 'Chargeback',
+ 'label' => ts('Chargeback'),
+ 'is_active' => TRUE,
+ 'component_id' => 'CiviContribute',
+ ));
+}
--
To view, visit https://gerrit.wikimedia.org/r/268735
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I35fc1346c695a07e7842fac72ce3c7d760207749
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm
Gerrit-Branch: master
Gerrit-Owner: Eileen <[email protected]>
Gerrit-Reviewer: Awight <[email protected]>
Gerrit-Reviewer: Cdentinger <[email protected]>
Gerrit-Reviewer: Eileen <[email protected]>
Gerrit-Reviewer: Ejegg <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits