1
0
mirror of synced 2024-11-25 06:46:08 +03:00

fix error during installation when orders count equals zero (#130)

This commit is contained in:
vasilevdm 2020-09-02 14:37:16 +03:00 committed by GitHub
parent 5d49d16955
commit b19c857cc3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -591,7 +591,12 @@ class intaro_retailcrm extends CModule
} else { } else {
$finish = (int)$_POST['finish']; $finish = (int)$_POST['finish'];
} }
if (!$countAll) {
$percent = 100;
} else {
$percent = round(100 - ($countLeft * 100 / $countAll), 1); $percent = round(100 - ($countLeft * 100 / $countAll), 1);
}
if (!$countLeft) { if (!$countLeft) {
$finish = 1; $finish = 1;