Configurable rate rounding (#5734)

* added invoice hydration of the issuer object
* added "rate calculator" mode
* new config to select rounding mode
* replace static calls with dependency injection
This commit is contained in:
Kevin Papst
2025-12-16 16:47:46 +01:00
committed by GitHub
parent 07ac6c308f
commit 595b5f4b25
43 changed files with 876 additions and 411 deletions

View File

@@ -54,9 +54,17 @@ trait RendererTestTrait
);
}
/**
* @param class-string $classname
*/
protected function getAbstractRenderer(string $classname): AbstractRenderer
{
return new $classname();
$t = new $classname();
if (!$t instanceof AbstractRenderer) {
throw new \InvalidArgumentException('Not an instance of AbstractRenderer: ' . \get_class($t));
}
return $t;
}
protected function getFormatter(): InvoiceFormatter