fix rounded ujrah
This commit is contained in:
@@ -89,7 +89,7 @@ class Calculation
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function getRoundedMethod(float $number = 0.0) : Float{
|
public function getRoundedMethod(float $number = 0.0) : Float{
|
||||||
$number_string = number_format($number,2);
|
$number_string = number_format(floor(($number*100))/100,2);
|
||||||
$rounded = substr($number_string, 0, -1);
|
$rounded = substr($number_string, 0, -1);
|
||||||
$lastDigit = substr($number_string, -1);
|
$lastDigit = substr($number_string, -1);
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
use App\Services\MasterServices;
|
use App\Services\MasterServices;
|
||||||
use App\Support\v2\Calculation;
|
use App\Support\v2\Calculation;
|
||||||
|
|
||||||
$number = 1456.50;
|
$number = 1456.529;
|
||||||
$test2 = new Calculation();
|
$test2 = new Calculation();
|
||||||
$test = new MasterServices('KB2');
|
$test = new MasterServices('KB2');
|
||||||
// $response = $test->kiraUpahTawarruq('KB2231207-0004');
|
// $response = $test->kiraUpahTawarruq('KB2231207-0004');
|
||||||
|
|||||||
Reference in New Issue
Block a user