This commit is contained in:
songchenxuan
2023-08-22 08:47:44 +08:00
parent 6ed40ab5f9
commit 07b3df8456
+1 -1
View File
@@ -1541,7 +1541,7 @@ class pivotModel extends model
{
if($fields[$field]['type'] != 'number' and in_array($stat, array('avg', 'sum')))
{
$convertSql = $this->config->db->driver == 'mysql' ? "CAST(tt.`$field` AS FLOAT)" : "TO_DECIMAL(tt.`$field`)";
$convertSql = $this->config->db->driver == 'mysql' ? "CAST(tt.`$field` AS DECIMAL(32, 2))" : "TO_DECIMAL(tt.`$field`)";
$columnSQL = "$stat($convertSql) as `$uuName`";
}
else