Comments (3)
Yes, it is a native component to the app already. The only missing piece currently is the UI implementation.
You can inspect the react UI for this particular feature here:
This PR should work with the current API and you can see how this would work in practice.
from invoiceninja.
The foundations of this have already been created in the application.
I have built a twig templating engine which can accept an array of objects (say tasks) and these can then be pushed through your own Twig Template Document to generate a PDF document as required.
The only thing that is yet to be included is the option to also push documents/attachments through the template engine, however there is associated functionality which can be reused to insert images onto these documents.
ie
$dom = new \DOMDocument('1.0', 'UTF-8');
$container = $dom->createElement('div');
$container->setAttribute('style', 'display:grid; grid-auto-flow: row; grid-template-columns: repeat(2, 1fr); grid-template-rows: repeat(2, 1fr);justify-items: center;');
/** @var \App\Models\Document $document */
foreach ($this->entity->documents()->where('is_public', true)->get() as $document) {
if (!$document->isImage()) {
continue;
}
$image = $dom->createElement('img');
$image->setAttribute('src', "data:image/png;base64,".base64_encode($document->compress()));
$image->setAttribute('style', 'max-width: 50%; margin-top: 20px;');
$container->appendChild($image);
}
$dom->appendChild($container);
$html = $dom->saveHTML();
$dom = null;
return $html;
We are yet to release the template engine, however when it is, your use case would be supported.
from invoiceninja.
Is there a roadmap or issue where progress of the template engine can be tracked, or read more?
Am I right in assuming the templating engine will be a native part of the core Invoice Ninja project? And is it a generic engine to grab any record (invoice, task, client), with customisable filters/search criterea, and produce a PDF?
from invoiceninja.
Related Issues (20)
- Product variants
- Invoices list won't display HOT 3
- Ability to change the view_url default landing page. HOT 1
- On Payment Links show payment options in a dropdown list HOT 1
- Support Plaid banking aggregator HOT 2
- Down Payment (Advance payment) invoice HOT 1
- The variable $client->payment_balance is not showing the correct amount. HOT 6
- `composer install` fails
- Ability to quick rent & return items by QR Code scan
- Add support for Datafast
- REACT 5.8.41 HOT 8
- System Log Details
- Default Tax Category Option
- Tax Report amount does not match invoice issue - custom fields HOT 1
- Tasks indicate they are invoiced, but never invoiced. HOT 3
- Payment link v2 not sending login email HOT 3
- Invoice numbers are not padding properly when using single digit number pattern HOT 1
- Client portal registration correct name field to Company Name HOT 2
- Relations between Clients and Bill-to
- Ability to adjust status of a SENT invoice
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 invoiceninja.