Index: branches/5.2.x/core/admin_templates/incs/grid_blocks.tpl
===================================================================
--- branches/5.2.x/core/admin_templates/incs/grid_blocks.tpl
+++ branches/5.2.x/core/admin_templates/incs/grid_blocks.tpl
@@ -187,9 +187,9 @@
-
+
-
+
Index: branches/5.2.x/core/kernel/db/db_tag_processor.php
===================================================================
--- branches/5.2.x/core/kernel/db/db_tag_processor.php
+++ branches/5.2.x/core/kernel/db/db_tag_processor.php
@@ -2488,7 +2488,13 @@
$list->setTotal($field, $total_function, $value);
}
- $value = $list->GetFormattedTotal($field, $total_function);
+ $format = array_key_exists('format', $params) ? $params['format'] : false;
+
+ if ( !$format || $format == '$format' ) {
+ $format = null;
+ }
+
+ $value = $list->GetFormattedTotal($field, $total_function, $format);
if (array_key_exists('currency', $params) && $params['currency']) {
$value = $this->AddCurrencySymbol($value, $iso);
Index: branches/5.2.x/core/kernel/db/dblist.php
===================================================================
--- branches/5.2.x/core/kernel/db/dblist.php
+++ branches/5.2.x/core/kernel/db/dblist.php
@@ -660,12 +660,13 @@
/**
* Returns previously calculated total (formatted)
*
- * @param string $field
- * @param string $total_function
+ * @param string $field Field.
+ * @param string $total_function Total function.
+ * @param string $format Format.
+ *
* @return float
- * @access public
*/
- function GetFormattedTotal($field, $total_function)
+ public function GetFormattedTotal($field, $total_function, $format = null)
{
$res = $this->getTotal($field, $total_function);
$formatter_class = $this->GetFieldOption($field, 'formatter');
@@ -674,7 +675,7 @@
/** @var kFormatter $formatter */
$formatter = $this->Application->recallObject($formatter_class);
- $res = $formatter->Format($res, $field, $this);
+ $res = $formatter->Format($res, $field, $this, $format);
}
return $res;