diff --git a/application/Espo/Core/Formula/Functions/EntityGroup/SumRelatedType.php b/application/Espo/Core/Formula/Functions/EntityGroup/SumRelatedType.php index 80c5ffd1d9..31fbeaf88b 100644 --- a/application/Espo/Core/Formula/Functions/EntityGroup/SumRelatedType.php +++ b/application/Espo/Core/Formula/Functions/EntityGroup/SumRelatedType.php @@ -118,6 +118,6 @@ class SumRelatedType extends \Espo\Core\Formula\Functions\Base return 0; } - return $rowList[0]['SUM:' . $field]; + return floatval($rowList[0]['SUM:' . $field]); } } \ No newline at end of file diff --git a/application/Espo/Core/Formula/Functions/NumericGroup/DivisionType.php b/application/Espo/Core/Formula/Functions/NumericGroup/DivisionType.php index e4a2edcea4..f81fc7b9f4 100644 --- a/application/Espo/Core/Formula/Functions/NumericGroup/DivisionType.php +++ b/application/Espo/Core/Formula/Functions/NumericGroup/DivisionType.php @@ -1,4 +1,4 @@ -evaluate($item->value[0]); $part = $this->evaluate($item->value[1]); if (!is_float($part) && !is_int($part)) { - $part = intval($part); + $part = floatval($part); } $result /= $part; diff --git a/application/Espo/Core/Formula/Functions/NumericGroup/ModuloType.php b/application/Espo/Core/Formula/Functions/NumericGroup/ModuloType.php index c4d6e58f42..1f4087b7ed 100644 --- a/application/Espo/Core/Formula/Functions/NumericGroup/ModuloType.php +++ b/application/Espo/Core/Formula/Functions/NumericGroup/ModuloType.php @@ -1,4 +1,4 @@ -evaluate($subItem); if (!is_float($part) && !is_int($part)) { - $part = intval($part); + $part = floatval($part); } $result %= $part; diff --git a/application/Espo/Core/Formula/Functions/NumericGroup/MultiplicationType.php b/application/Espo/Core/Formula/Functions/NumericGroup/MultiplicationType.php index 33a5251e72..6dd3a31877 100644 --- a/application/Espo/Core/Formula/Functions/NumericGroup/MultiplicationType.php +++ b/application/Espo/Core/Formula/Functions/NumericGroup/MultiplicationType.php @@ -1,4 +1,4 @@ -evaluate($subItem); if (!is_float($part) && !is_int($part)) { - $part = intval($part); + $part = floatval($part); } $result *= $part; diff --git a/application/Espo/Core/Formula/Functions/NumericGroup/SubtractionType.php b/application/Espo/Core/Formula/Functions/NumericGroup/SubtractionType.php index cb5b336a19..3abb84d22b 100644 --- a/application/Espo/Core/Formula/Functions/NumericGroup/SubtractionType.php +++ b/application/Espo/Core/Formula/Functions/NumericGroup/SubtractionType.php @@ -1,4 +1,4 @@ -evaluate($item->value[0]); $part = $this->evaluate($item->value[1]); if (!is_float($part) && !is_int($part)) { - $part = intval($part); + $part = floatval($part); } $result -= $part; diff --git a/application/Espo/Core/Formula/Functions/NumericGroup/SummationType.php b/application/Espo/Core/Formula/Functions/NumericGroup/SummationType.php index a275d30b4d..7d5378ca72 100644 --- a/application/Espo/Core/Formula/Functions/NumericGroup/SummationType.php +++ b/application/Espo/Core/Formula/Functions/NumericGroup/SummationType.php @@ -1,4 +1,4 @@ -evaluate($subItem); if (!is_float($part) && !is_int($part)) { - $part = intval($part); + $part = floatval($part); } $result += $part; diff --git a/client/lib/flotr2.js b/client/lib/flotr2.js index 4cc8f70302..16f5c3553d 100644 --- a/client/lib/flotr2.js +++ b/client/lib/flotr2.js @@ -5156,7 +5156,7 @@ Flotr.addPlugin('hit', { x: (this.plotWidth)/2, y: (this.plotHeight)/2 }, - radius = (Math.min(this.canvasWidth, this.canvasHeight) * s.pie.sizeRatio) / 2, + radius = (Math.min(this.canvasWidth, this.canvasHeight) * s.pie.sizeRatio), // EspoCRM fix line bisection = n.sAngle this.plotHeight * 2 / 3) { + p = 'n'; + } else { + p = 's'; + } + } // EspoCRM fix end pos += 'top:'; diff --git a/client/src/views/record/list.js b/client/src/views/record/list.js index bf5e537ee0..310ad57894 100644 --- a/client/src/views/record/list.js +++ b/client/src/views/record/list.js @@ -406,6 +406,8 @@ Espo.define('views/record/list', 'view', function (Dep) { selectAllResult: function () { this.allResultIsChecked = true; + this.hideActions(); + this.$el.find('input.record-checkbox').prop('checked', true).attr('disabled', 'disabled'); this.$el.find('input.select-all').prop('checked', true); @@ -905,6 +907,7 @@ Espo.define('views/record/list', 'view', function (Dep) { this.checkAllResultMassActionList = checkAllResultMassActionList; (this.getMetadata().get(['clientDefs', this.scope, 'checkAllResultMassActionList']) || []).forEach(function (item) { + if (this.collection.url !== this.entityType) return; if (~this.massActionList.indexOf(item)) { var defs = this.getMetadata().get(['clientDefs', this.scope, 'massActionDefs', item]) || {}; var acl = defs.acl; @@ -954,23 +957,24 @@ Espo.define('views/record/list', 'view', function (Dep) { this.addMassAction('printPdf'); } + if (this.options.unlinkMassAction && this.collection) { this.addMassAction('unlink', false, true); } - if (this.collection.url !== this.entityType) { - this.removeAllResultMassAction('massUpdate'); - this.removeAllResultMassAction('remove'); - this.removeAllResultMassAction('export'); - } + this.setupMassActionItems(); - if (this.getUser().isAdmin() && this.collection.url == this.entityType) { + if (this.getUser().isAdmin()) { if (this.getMetadata().get(['formula', this.entityType, 'beforeSaveCustomScript'])) { this.addMassAction('recalculateFormula', true); } } - this.setupMassActionItems(); + if (this.collection.url !== this.entityType) { + Espo.Utils.clone(this.checkAllResultMassActionList).forEach(function (item) { + this.removeAllResultMassAction(item); + }, this); + } Espo.Utils.clone(this.massActionList).forEach(function (item) { var propName = 'massAction' + Espo.Utils.upperCaseFirst(item) + 'Disabled';