Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'core/Tracker/GoalManager.php')
-rw-r--r--core/Tracker/GoalManager.php15
1 files changed, 11 insertions, 4 deletions
diff --git a/core/Tracker/GoalManager.php b/core/Tracker/GoalManager.php
index 9f989df935..0d4bd2bfcb 100644
--- a/core/Tracker/GoalManager.php
+++ b/core/Tracker/GoalManager.php
@@ -273,11 +273,13 @@ class GoalManager
*/
protected function getRevenue($revenue)
{
- if (round($revenue) == $revenue) {
- return $revenue;
+ if (round($revenue) != $revenue) {
+ $revenue = round($revenue, self::REVENUE_PRECISION);
}
- return round($revenue, self::REVENUE_PRECISION);
+ $revenue = Common::forceDotAsSeparatorForDecimalPoint($revenue);
+
+ return $revenue;
}
/**
@@ -633,7 +635,7 @@ class GoalManager
'idaction_category3' => (int)$item[self::INTERNAL_ITEM_CATEGORY3],
'idaction_category4' => (int)$item[self::INTERNAL_ITEM_CATEGORY4],
'idaction_category5' => (int)$item[self::INTERNAL_ITEM_CATEGORY5],
- 'price' => $item[self::INTERNAL_ITEM_PRICE],
+ 'price' => Common::forceDotAsSeparatorForDecimalPoint($item[self::INTERNAL_ITEM_PRICE]),
'quantity' => $item[self::INTERNAL_ITEM_QUANTITY],
'deleted' => isset($item['deleted']) ? $item['deleted'] : 0, //deleted
'idorder' => isset($goal['idorder']) ? $goal['idorder'] : self::ITEM_IDORDER_ABANDONED_CART, //idorder = 0 in log_conversion_item for carts
@@ -815,6 +817,11 @@ class GoalManager
$value = $dimension->$hook($this->request, $visitor, $action, $this);
if (false !== $value) {
+
+ if (is_float($value)) {
+ $value = Common::forceDotAsSeparatorForDecimalPoint($value);
+ }
+
$fieldName = $dimension->getColumnName();
$visitor->setVisitorColumn($fieldName, $value);