Sfoglia il codice sorgente

积分统计百分比

吴昊天 2 anni fa
parent
commit
9246eba4b2

+ 2 - 2
crmeb/app/services/activity/integral/StorePointRecordServices.php

@@ -190,7 +190,7 @@ class StorePointRecordServices extends BaseServices
             $list[] = [
             $list[] = [
                 'name' => $item['name'],
                 'name' => $item['name'],
                 'value' => $item['value'],
                 'value' => $item['value'],
-                'percent' => $count != 0 ? bcmul((string)bcdiv((string)$item['value'], (string)$count, 4), '100', 1) : 0,
+                'percent' => $count != 0 ? bcmul((string)bcdiv((string)$item['value'], (string)$count, 4), '100', 2) : 0,
             ];
             ];
         }
         }
         array_multisort(array_column($list, 'value'), SORT_DESC, $list);
         array_multisort(array_column($list, 'value'), SORT_DESC, $list);
@@ -222,7 +222,7 @@ class StorePointRecordServices extends BaseServices
             $list[] = [
             $list[] = [
                 'name' => $item['name'],
                 'name' => $item['name'],
                 'value' => $item['value'],
                 'value' => $item['value'],
-                'percent' => $count != 0 ? bcmul((string)bcdiv((string)$item['value'], (string)$count, 4), '100', 1) : 0,
+                'percent' => $count != 0 ? bcmul((string)bcdiv((string)$item['value'], (string)$count, 4), '100', 2) : 0,
             ];
             ];
         }
         }
         array_multisort(array_column($list, 'value'), SORT_DESC, $list);
         array_multisort(array_column($list, 'value'), SORT_DESC, $list);