You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi Kevin
Thanks for this extensive hero demo of a plugin.
I was able to achieve some things with it, and learn how to survive better, in general...
Still, Symfony is a long way to go.
I'm now trying to re-implement my old Indesign XML Exporter from V1.
But at this stage I think I need to ask directly, since I seem to hit a solid wall, and from the past hours of trial'n'error it seems wise:
I extended the plugin with an exporter, that I think will serve as a minimum to get Indesign XML out in the end. However I also tried the "Invoice" route, since it allows userland'ish restrictions.
Is it true that all of the up-to-now implemented ways to do Invoice are (forced) template based?
Is it true that everything based on RendererInterface does require a template?
Is final class ServiceInvoice the place where templates-are-mandatory is hardcoded? Or where would be the place to build a hook on?
I'm not sure if there is a benefit in a template for this kind of playout, but maybe I'm wrong.
Best wishes
Manu
The text was updated successfully, but these errors were encountered:
Yes, all public invoice renderer are template based, but you don't have to use a template when creating the actual invoice. You can do whatever you want in your invoice renderer.
The template is just the way to tell Kimai that it should use your renderer.
Create an empty file indesign.xml and then implement a renderer:
public function supports(InvoiceDocument $document): bool
{
return $document->getFilename() === 'indesign.xml';
}
public function render(InvoiceDocument $document, InvoiceModel $model): Response
{
// do whatever you want, simply ignore the $document... you could even
// send the invoice data to a web service and let them create the invoice
// the only "limitation" is: you have to return some kind of response
$response = new Response();
// ....
return $response;
}
Is final class ServiceInvoice the place where templates-are-mandatory is hardcoded? Or where would be the place to build a hook on?
I see thanks.
So Kimai seeing the possibility of using a template makes Kimai include it in the choice list, even though that template is empty. There's the hook!
Is final class ServiceInvoice the place where templates-are-mandatory is hardcoded? Or where would be the place to build a hook on?
I don't think that I understand this question.
I saw that I cannot change the template behaviour without going into Kimai code (and didn't know I can trick it like you say), so I thought there is no way to build on the existing methods.
Hi Kevin
Thanks for this extensive hero demo of a plugin.
I was able to achieve some things with it, and learn how to survive better, in general...
Still, Symfony is a long way to go.
I'm now trying to re-implement my old Indesign XML Exporter from V1.
But at this stage I think I need to ask directly, since I seem to hit a solid wall, and from the past hours of trial'n'error it seems wise:
I extended the plugin with an exporter, that I think will serve as a minimum to get Indesign XML out in the end. However I also tried the "Invoice" route, since it allows userland'ish restrictions.
RendererInterface
does require a template?final class ServiceInvoice
the place where templates-are-mandatory is hardcoded? Or where would be the place to build a hook on?I'm not sure if there is a benefit in a template for this kind of playout, but maybe I'm wrong.
Best wishes
Manu
The text was updated successfully, but these errors were encountered: