From: Aleksey Filippov Date: Wed, 24 Apr 2024 08:39:40 +0000 (+0300) Subject: правки по дашборду Продажи сегодня X-Git-Url: https://gitweb.erp-flowers.ru/?a=commitdiff_plain;h=e7df91450f823e55fef755eda8733015ca1eba7a;p=yii-erp24%2F.git правки по дашборду Продажи сегодня --- diff --git a/erp24/actions/dashboard/SalesAction.php b/erp24/actions/dashboard/SalesAction.php index 64f6e54..276dbb4 100755 --- a/erp24/actions/dashboard/SalesAction.php +++ b/erp24/actions/dashboard/SalesAction.php @@ -205,7 +205,9 @@ class SalesAction extends Action if (array_key_exists($keyStoreGuid, $salesSummByType)) { $salesSummByTypeKeyStoreGuid = $salesSummByType[$keyStoreGuid]; - $percentRow = round(($salesSummByTypeKeyStoreGuid / $salesSummRow) * 100, 1); + if (!empty($salesSummRow) && $salesSummRow > 0) { + $percentRow = round(($salesSummByTypeKeyStoreGuid / $salesSummRow) * 100, 1); + } }