diff --git a/src/Application/Dto/Product/RechargeProductsDto.php b/src/Application/Dto/Product/RechargeProductsDto.php index 287826d..9e3e684 100644 --- a/src/Application/Dto/Product/RechargeProductsDto.php +++ b/src/Application/Dto/Product/RechargeProductsDto.php @@ -54,17 +54,19 @@ final class RechargeProductsDto extends AbstractDto if (!$is_ftai) { $result += [ 'total_points' => $effect->getPointTotal(), - 'bonus_rate_pct' => (float)(bcmul( - num1: $effect->getPointTotal() == 0 - ? '0' - : bcdiv( - (string)$effect->pointBonus, - (string)$effect->getPointTotal(), - 3, - ), - num2: '100', - scale: 0, - )), + 'bonus_rate_pct' => round( + (float)(bcmul( + num1: $effect->getPointTotal() == 0 + ? '0' + : bcdiv( + (string)$effect->pointBonus, + (string)$effect->getPointTotal(), + 3, + ), + num2: '100', + scale: 3, + )), + ), 'point' => [ 'total' => $effect->getPointTotal(), 'number' => $effect->pointBasic,