mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
Implement custom trigger for recurring transactions
This commit is contained in:
@@ -104,16 +104,15 @@ class Steam
|
||||
*/
|
||||
public function bcround(?string $number, int $precision = 0): string
|
||||
{
|
||||
|
||||
if(null === $number) {
|
||||
if (null === $number) {
|
||||
return '0';
|
||||
}
|
||||
if('' === trim($number)) {
|
||||
if ('' === trim($number)) {
|
||||
return '0';
|
||||
}
|
||||
// if the number contains "E", it's in scientific notation, so we need to convert it to a normal number first.
|
||||
if(false !== stripos($number,'e')) {
|
||||
$number = sprintf('%.24f',$number);
|
||||
if (false !== stripos($number, 'e')) {
|
||||
$number = sprintf('%.24f', $number);
|
||||
}
|
||||
|
||||
Log::debug(sprintf('Trying bcround("%s",%d)', $number, $precision));
|
||||
|
Reference in New Issue
Block a user