Comments (3)
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 don't think that I understand this question.
from demobundle.
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.
I'll go on. Thanks
from demobundle.
Thanks for the note on the webhook. Extremely powerful indeed.
from demobundle.
Related Issues (4)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from demobundle.