Skip to content

Commit

Permalink
Merge pull request #17612 from eileenmcnaughton/format
Browse files Browse the repository at this point in the history
[NFC] Remove instances where html is passed to crmMoney
  • Loading branch information
seamuslee001 authored Jun 19, 2020
2 parents bc24c42 + d0b7e8c commit 8debf42
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
9 changes: 4 additions & 5 deletions CRM/Core/Smarty/plugins/modifier.crmMoney.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,11 @@
* @param string $currency
* The (optional) currency.
*
* @param null $format
* @param bool $onlyNumber
*
* @return string
* formatted monetary amount
*
* @throws \CRM_Core_Exception
*/
function smarty_modifier_crmMoney($amount, $currency = NULL, $format = NULL, $onlyNumber = FALSE) {
return CRM_Utils_Money::format($amount, $currency, $format, $onlyNumber);
function smarty_modifier_crmMoney($amount, $currency = NULL) {
return CRM_Utils_Money::format($amount, $currency);
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
<table class="form-layout-compressed">
<tr class="crm-contribution-form-block-contribution_page"><td class="label">{$form.contribution_page_id.label}</td><td{$valueStyle}>{$form.contribution_page_id.html|crmAddClass:twenty}</td></tr>
<tr class="crm-contribution-form-block-note"><td class="label" style="vertical-align:top;">{$form.note.label}</td><td>{$form.note.html}</td></tr>
<tr class="crm-contribution-form-block-non_deductible_amount"><td class="label">{$form.non_deductible_amount.label}</td><td{$valueStyle}>{$form.non_deductible_amount.html|crmMoney:$currency:'':1}<br />
<tr class="crm-contribution-form-block-non_deductible_amount"><td class="label">{$form.non_deductible_amount.label}</td><td{$valueStyle}>{$form.non_deductible_amount.html}<br />
<span class="description">{ts}Non-deductible portion of this contribution.{/ts}</span></td></tr>
<tr class="crm-contribution-form-block-fee_amount"><td class="label">{$form.fee_amount.label}</td><td{$valueStyle}>{$form.fee_amount.html|crmMoney:$currency:'XXX':'YYY'}<br />
<tr class="crm-contribution-form-block-fee_amount"><td class="label">{$form.fee_amount.label}</td><td{$valueStyle}>{$form.fee_amount.html}<br />
<span class="description">{ts}Processing fee for this transaction (if applicable).{/ts}</span></td></tr>
<tr class="crm-contribution-form-block-invoice_id"><td class="label">{$form.invoice_id.label}</td><td{$valueStyle}>{$form.invoice_id.html}<br />
<span class="description">{ts}Unique internal reference ID for this contribution.{/ts}</span></td></tr>
Expand Down
2 changes: 1 addition & 1 deletion templates/CRM/Contribute/Form/AdditionalPayment.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@
<td class="label">{$form.trxn_id.label}</td>
<td>{$form.trxn_id.html} {help id="id-trans_id"}</td>
</tr>
<tr class="crm-payment-form-block-fee_amount"><td class="label">{$form.fee_amount.label}</td><td{$valueStyle}>{$form.fee_amount.html|crmMoney:$currency:'XXX':'YYY'}<br />
<tr class="crm-payment-form-block-fee_amount"><td class="label">{$form.fee_amount.label}</td><td{$valueStyle}>{$form.fee_amount.html}<br />
<span class="description">{ts}Processing fee for this transaction (if applicable).{/ts}</span></td></tr>
</table>
</div>
Expand Down

0 comments on commit 8debf42

Please sign in to comment.