From e7df91450f823e55fef755eda8733015ca1eba7a Mon Sep 17 00:00:00 2001 From: Aleksey Filippov Date: Wed, 24 Apr 2024 11:39:40 +0300 Subject: [PATCH] =?utf8?q?=D0=BF=D1=80=D0=B0=D0=B2=D0=BA=D0=B8=20=D0=BF?= =?utf8?q?=D0=BE=20=D0=B4=D0=B0=D1=88=D0=B1=D0=BE=D1=80=D0=B4=D1=83=20?= =?utf8?q?=D0=9F=D1=80=D0=BE=D0=B4=D0=B0=D0=B6=D0=B8=20=D1=81=D0=B5=D0=B3?= =?utf8?q?=D0=BE=D0=B4=D0=BD=D1=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- erp24/actions/dashboard/SalesAction.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/erp24/actions/dashboard/SalesAction.php b/erp24/actions/dashboard/SalesAction.php index 64f6e546..276dbb45 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); + } } -- 2.39.5