Remove multiple currency handling as it seems to make it format worse
authoreileen <emcnaughton@wikimedia.org>
Mon, 18 Feb 2019 01:17:37 +0000 (14:17 +1300)
committereileen <emcnaughton@wikimedia.org>
Mon, 18 Feb 2019 05:15:51 +0000 (18:15 +1300)
CRM/Contact/BAO/Query.php
templates/CRM/Contribute/Page/ContributionTotals.tpl
tests/phpunit/CRM/Contact/BAO/QueryTest.php

index db917cd47029a6e3ae66f8b3a1a650820f9fb211..7c4d39a275ccb56621114ff47ee292c0c11ea356 100644 (file)
@@ -6554,7 +6554,7 @@ AND   displayRelType.is_active = 1
       $summary['total']['amount'][] = CRM_Utils_Money::format($dao->total_amount, $dao->currency);
       $summary['total']['avg'][] = CRM_Utils_Money::format($dao->total_avg, $dao->currency);
     }
-    $summary['total']['currencyCount'] = count($summary['total']['amount']);
+
     if (!empty($summary['total']['amount'])) {
       $summary['total']['amount'] = implode(',&nbsp;', $summary['total']['amount']);
       $summary['total']['avg'] = implode(',&nbsp;', $summary['total']['avg']);
index 3e5576d8dfba6d41af534ef5364089fa30ed066e..5f03596a7272f2171bf706576889c71a3bf3e5c6 100644 (file)
     {if $contributionSummary }
       <tr>
           {if $contributionSummary.total.amount}
-            {if $contributionSummary.total.currencyCount gt 1}
-              <th class="contriTotalLeft right">{ts}Total{/ts} &ndash; {$contributionSummary.total.amount}</th>
-              <th class="left contriTotalRight"> &nbsp; {ts}# Completed{/ts} &ndash; {$contributionSummary.total.count}</th>
-            </tr><tr>
-              <th class="contriTotalLeft">{ts}Avg{/ts} &ndash; {$contributionSummary.total.avg}</th>
-            {else}
-              <th class="contriTotalLeft right">{ts}Total{/ts} &ndash; {$contributionSummary.total.amount}</th>
-              <th class="right"> &nbsp; {ts}# Completed{/ts} &ndash; {$contributionSummary.total.count}</th>
-              <th class="right contriTotalRight"> &nbsp; {ts}Avg{/ts} &ndash; {$contributionSummary.total.avg}</th>
-            {/if}
+            <th class="contriTotalLeft right">{ts}Total{/ts} &ndash; {$contributionSummary.total.amount}</th>
+            <th class="right"> &nbsp; {ts}# Completed{/ts} &ndash; {$contributionSummary.total.count}</th>
+            <th class="right contriTotalRight"> &nbsp; {ts}Avg{/ts} &ndash; {$contributionSummary.total.avg}</th>
           {/if}
           {if $contributionSummary.cancel.amount}
             <th class="disabled right contriTotalRight"> &nbsp; {ts}Cancelled/Refunded{/ts} &ndash; {$contributionSummary.cancel.amount}</th>
index dc0cc0afff9200ca875228f0092322b46f030e8d..507069f78438a74b9f7be2406a9a3833ce51fcfe 100644 (file)
@@ -734,7 +734,6 @@ civicrm_relationship.is_active = 1 AND
         'avg' => '$ 233.33',
         'amount' => '$ 1,400.00',
         'count' => 6,
-        'currencyCount' => 1,
         ],
       'cancel' => [
         'count' => 2,