Open JoseLuis21 opened 2 years ago
Esta es la solución
public function calculateVerificationNumber() { $rut = $this->number; $s=1; for ($m=0; $rut != 0; $rut /= 10) { $rut_porcentaje = (int)$rut%(int)10; $nine = ((int)9-(int)$m++%(int)6); $s=(((int)$s+$rut_porcentaje*($nine))%(int)11); } return chr($s?$s+47:75); }
Laravel Logs version 9 WARNING [2022-09-02 15:00:14] laravel.WARNING: Implicit conversion from float 6.6666666E-62 to int loses precision in /home/www/vendor/freshwork/chilean-bundle/src/Rut.php on line 247