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)
- Cross-Company Configuration
- Update Send Time for all existing recurring invoices
- Installation via composer
- i want to pay the 30$ a year for this, and get whitelable unlimted. i need you to know if it works offline
- Import and sync payments for european bank accounts - CAMT - MT940 - SWIFT - XML HOT 3
- Client On-boarding Forms/CRM HOT 1
- Add view invoice button to payment email template HOT 5
- Client portal custom CSS script not loaded on layout/clean.blade.php template HOT 1
- xInvoice ApplicableTradeTax wrong when using discount on article HOT 4
- Archive tasks once invoiced
- Translation Error in Customer Dashboard for German Translation HOT 4
- Mollie Integration (Add Sepa Direct Debit support)
- Send E-Invoice without XML (only 1 attachment the XML embeded in PDF) HOT 4
- [Request] RTL support HOT 21
- [Question] Tax withholding and extra columns
- Small transactions below integer value 1 (lets say 0.99 cents) become a debit instead of credit HOT 1
- Option for Recurring invoices to not send on weekends.
- Option to not considered invoice paid when stripe is processing
- Simplified Chinese language adding request HOT 1
- Self Updater fails to apply update but claims it was successful
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.