From: monishdeb Date: Fri, 9 May 2014 14:02:47 +0000 (+0530) Subject: Styling and minor changes X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=eb3cfcd64a99e8f0da0e11d99fa459831dc3712f;p=civicrm-core.git Styling and minor changes --- diff --git a/CRM/Member/Page/Tab.php b/CRM/Member/Page/Tab.php index 412850068e..2aad0d971c 100644 --- a/CRM/Member/Page/Tab.php +++ b/CRM/Member/Page/Tab.php @@ -253,6 +253,16 @@ class CRM_Member_Page_Tab extends CRM_Core_Page { if (CRM_Core_Permission::access('CiviContribute')) { $this->assign('accessContribution', TRUE); CRM_Member_Page_Tab::associatedContribution($this->_contactId, $this->_id); + + //show associated soft credit when contribution payment is paid by different person in edit mode + if ($this->_id && $this->_contactId) { + $filter = " AND cc.id IN (SELECT contribution_id FROM civicrm_membership_payment WHERE membership_id = {$this->_id})"; + $softCreditList = CRM_Contribute_BAO_ContributionSoft::getSoftContributionList($this->_contactId, $filter); + if (!empty($softCreditList)) { + $this->assign('softCredit', TRUE); + $this->assign('softCreditRows', $softCreditList); + } + } } } diff --git a/templates/CRM/Member/Form/Membership.tpl b/templates/CRM/Member/Form/Membership.tpl index 3e21138fe3..3213ac2e61 100644 --- a/templates/CRM/Member/Form/Membership.tpl +++ b/templates/CRM/Member/Form/Membership.tpl @@ -306,9 +306,16 @@ {/literal} {if $accessContribution and $action eq 2 and $rows.0.contribution_id} -
- {include file="CRM/Contribute/Form/Selector.tpl" context="Search"} -
+
+
Related Contributions
+
{include file="CRM/Contribute/Form/Selector.tpl" context="Search"}
+
+ {/if} + {if $softCredit} +
+
Related Soft Contributions
+
{include file="CRM/Contribute/Page/ContributionSoft.tpl" context="membership"}
+
{/if} {/if} diff --git a/templates/CRM/Member/Form/MembershipView.tpl b/templates/CRM/Member/Form/MembershipView.tpl index 2e26bb1aaf..70d0ea0ca2 100644 --- a/templates/CRM/Member/Form/MembershipView.tpl +++ b/templates/CRM/Member/Form/MembershipView.tpl @@ -65,11 +65,17 @@ {include file="CRM/Custom/Page/CustomDataView.tpl"} {if $accessContribution and $rows.0.contribution_id} - {include file="CRM/Contribute/Form/Selector.tpl" context="Search"} +
+
Related Contributions
+
{include file="CRM/Contribute/Form/Selector.tpl" context="Search"}
+
{/if} {if $softCredit} - {include file="CRM/Contribute/Page/ContributionSoft.tpl" context="membership"} +
+
Related Soft Contributions
+
{include file="CRM/Contribute/Page/ContributionSoft.tpl" context="membership"}
+
{/if} {if $has_related}