From: Alexander Smirnov Date: Tue, 30 Jul 2024 12:28:33 +0000 (+0300) Subject: Не флот не инт, а целое число и дробь X-Git-Tag: 1.4~45^2~3 X-Git-Url: https://gitweb.erp-flowers.ru/?a=commitdiff_plain;h=ca8500f81d53ebe24f2809e2c86ef98350efa896;p=erp24_rep%2Fyii-erp24%2F.git Не флот не инт, а целое число и дробь --- diff --git a/erp24/services/MotivationService.php b/erp24/services/MotivationService.php index ca1aeed1..43b77979 100644 --- a/erp24/services/MotivationService.php +++ b/erp24/services/MotivationService.php @@ -88,8 +88,8 @@ class MotivationService continue; } switch ($motivationCostsItems[$row[0]]->data_type) { - case MotivationCostsItem::DATA_TYPE_INT: { if (is_int($row[2])) { $value = (int)$row[2]; } else { $error = "Не инт [$ind,2] '" . $row[2] . "'"; }; break; } - case MotivationCostsItem::DATA_TYPE_FLOAT: { if (is_int($row[2]) || is_float($row[2])) { $value = (float)$row[2]; } else {$error = "Не флот [$ind,2] '" . $row[2] . "'"; } break; } + case MotivationCostsItem::DATA_TYPE_INT: { if (is_int($row[2])) { $value = (int)$row[2]; } else { $error = "Не целое число [$ind,2] '" . $row[2] . "'"; }; break; } + case MotivationCostsItem::DATA_TYPE_FLOAT: { if (is_int($row[2]) || is_float($row[2])) { $value = (float)$row[2]; } else {$error = "Не дробь [$ind,2] '" . $row[2] . "'"; } break; } case MotivationCostsItem::DATA_TYPE_STRING: { $value = $row[2]; break; } } if (!empty($error)) {