Merge pull request #15649 from JMAConsulting/core-1346
[civicrm-core.git] / CRM / Core / Smarty / plugins / modifier.crmMoney.php
1 <?php
2 /*
3 +--------------------------------------------------------------------+
4 | Copyright CiviCRM LLC. All rights reserved. |
5 | |
6 | This work is published under the GNU AGPLv3 license with some |
7 | permitted exceptions and without any warranty. For full license |
8 | and copyright information, see https://civicrm.org/licensing |
9 +--------------------------------------------------------------------+
10 */
11
12 /**
13 *
14 * @package CRM
15 * @copyright CiviCRM LLC https://civicrm.org/licensing
16 * $Id$
17 *
18 */
19
20 /**
21 * Format the given monetary amount (and currency) for display
22 *
23 * @param float $amount
24 * The monetary amount up for display.
25 * @param string $currency
26 * The (optional) currency.
27 *
28 * @param null $format
29 * @param bool $onlyNumber
30 *
31 * @return string
32 * formatted monetary amount
33 */
34 function smarty_modifier_crmMoney($amount, $currency = NULL, $format = NULL, $onlyNumber = FALSE) {
35 return CRM_Utils_Money::format($amount, $currency, $format, $onlyNumber);
36 }