From: Patrick Figel Date: Thu, 14 Nov 2019 13:19:04 +0000 (+0100) Subject: dev/core#1391 - Fix contribution cancel_date not being loaded X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=3be1a6256d58b61e8698c788849f83768509bd98;p=civicrm-core.git dev/core#1391 - Fix contribution cancel_date not being loaded This fixes an issue where the contribution cancel_date is not loaded in the contribution search, causing cancelled contributions not to be greyed out and the cancel date not to be shown. --- diff --git a/CRM/Contribute/BAO/Query.php b/CRM/Contribute/BAO/Query.php index 0d2462ae78..8cdfda5735 100644 --- a/CRM/Contribute/BAO/Query.php +++ b/CRM/Contribute/BAO/Query.php @@ -756,7 +756,7 @@ class CRM_Contribute_BAO_Query extends CRM_Core_BAO_Query { // @todo return this & fix query to do pseudoconstant thing. 'contribution_status' => 1, 'currency' => 1, - 'cancel_date' => 1, + 'contribution_cancel_date' => 1, 'contribution_recur_id' => 1, ]; if (self::isSiteHasProducts()) { diff --git a/CRM/Contribute/Selector/Search.php b/CRM/Contribute/Selector/Search.php index 1c2d23a3bc..0c26fb6cbe 100644 --- a/CRM/Contribute/Selector/Search.php +++ b/CRM/Contribute/Selector/Search.php @@ -66,7 +66,7 @@ class CRM_Contribute_Selector_Search extends CRM_Core_Selector_Base implements C 'thankyou_date', 'contribution_status_id', 'contribution_status', - 'cancel_date', + 'contribution_cancel_date', 'product_name', 'is_test', 'contribution_recur_id', diff --git a/templates/CRM/Contribute/Form/Selector.tpl b/templates/CRM/Contribute/Form/Selector.tpl index 144d6544db..bcf283e209 100644 --- a/templates/CRM/Contribute/Form/Selector.tpl +++ b/templates/CRM/Contribute/Form/Selector.tpl @@ -51,7 +51,7 @@ {counter start=0 skip=1 print=false} {foreach from=$rows item=row} - + {if !$single } {if $context eq 'Search' } {assign var=cbName value=$row.checkbox} @@ -72,11 +72,11 @@ {if !$columnName}{* if field_name has not been set skip, this helps with not changing anything not specifically edited *} {elseif $columnName === 'total_amount'}{* rendered above as soft credit columns = confusing *} {elseif $column.type === 'actions'}{* rendered below as soft credit column handling = not fixed *} - {elseif $columnName == 'contribution-status'} + {elseif $columnName == 'contribution_status'} {$row.contribution_status}
- {if $row.cancel_date} - {$row.cancel_date|crmDate} + {if $row.contribution_cancel_date} + {$row.contribution_cancel_date|crmDate} {/if} {else} diff --git a/templates/CRM/Contribute/Form/Task/Print.tpl b/templates/CRM/Contribute/Form/Task/Print.tpl index ca8cf7a2d1..dcf77779c3 100644 --- a/templates/CRM/Contribute/Form/Task/Print.tpl +++ b/templates/CRM/Contribute/Form/Task/Print.tpl @@ -53,8 +53,8 @@ {$row.thankyou_date|truncate:10:''|crmDate} {$row.contribution_status_id}
- {if $row.cancel_date} - {$row.cancel_date|truncate:10:''|crmDate} + {if $row.contribution_cancel_date} + {$row.contribution_cancel_date|truncate:10:''|crmDate} {/if} {$row.product_name}