1
0
mirror of synced 2024-11-22 05:16:09 +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 {
$finish = (int)$_POST['finish'];
}
$percent = round(100 - ($countLeft * 100 / $countAll), 1);
if (!$countAll) {
$percent = 100;
} else {
$percent = round(100 - ($countLeft * 100 / $countAll), 1);
}
if (!$countLeft) {
$finish = 1;