Implement custom trigger for recurring transactions

This commit is contained in:
James Cole
2022-12-29 15:42:02 +01:00
parent 85a2a87806
commit 8c320fd199
16 changed files with 604 additions and 234 deletions

View File

@@ -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));