Hi,
I want to create a new invoice template without to change the older 4. I copied bold.js to new_template.js but I cant see the new template under WEB GUI. Can you help me please.
Thanks
Hi,
I want to create a new invoice template without to change the older 4. I copied bold.js to new_template.js but I cant see the new template under WEB GUI. Can you help me please.
Thanks
The easiest solution is to use the UI and save your changes as the custom template.
If you’d like to add a file to storage/templates you’ll also need to add a matching record to the invoice_designs table and then clear the cache by adding ?clear_cache=true to the end of the URL.
Thank you very match for your support.
I’m working on custom invoice template now und have some questions:
What are single variable of these fields?
Thanks
This will be corrected in the next release. To fix this change the call to ‘uctrans’ to ‘trans’ towards the end of the getInvoiceLabels function in app/Models/Account.php
You can access most variables using dot notation with “Value” at the end. For example, $invoiceNumberValue or $account.address1Value. You’ll need to use the database table schema as a guide for available fields, we’re working on documentation.
Excellent! It works.
My invoice template is almost ready. I still have one problem. In germany one have to show a period of Service on the bill.
Example: period of Service: March 2015
How can I get a variable (March 2015) date(‘F Y’); if the invoice was created in March 2015?
Thanks
Date variables aren’t currently supported. You’d have to add it manually, for example in the ‘note to client’ section.
Hello,
I was able to create a beatiful invoice template. Pdfmake is a nice tools for that purpose.
I also would like to thank you for greate support. This project is very promising.
Bye
johann8, how did you manage the problem with the PLZ variables (I live in Austria and have the same problem) - could you post the corresponding part of your template here?
Oh, and “period of service” is also a needed item in Austria. Hillel, should I open a bug report (feature request) for this one?
And for the template part - wouldn’t it be easy to add a “clone” button to the /company/advanced_settings/customize_design page where you can easily clone a design that “nearly” fits?
This would ask for a new name, and create that storage/templates/$name.js file, and the corresponding db entries?
(Another issue/feature request?)
Thanks,
Christian
Hallo Christian,
"columns": [
{
"text": [
"$client.nameValue",
"\n",
"$client.address1Value",
"\n",
"$client.postal_codeValue",
" ",
"$client.cityValue"
],
"fontSize": 11,
"margin": [
0,
-3,
0,
90
]
},
Grüße Johann
Danke!
Does somebody know how to add items to an existing invoice without creating a new one ?
I use the php sdk wrapper.
it always makes a new one.
$client = Client::(20);
$client->createInvoice();
addInvoice($client, $price, $checkout);
////
////
function addInvoice($client, $price, $checkout){
$invoice = $client->createInvoice();
$invoice->addInvoiceItem(‘ITEM’, ‘RestaurantAPP’, $price);
$invoice->due_date = $checkout;
$invoice->save();
}
You need to load an existing invoice, it looks like you’re always calling creatInvoice.
“You need to load an existing invoice, it looks like you’re always calling creatInvoice.”
How do you do that is there any template code ?
$invoice = Invoice::find(1);
thats the client_id that you gave in the ‘find’ function right?
No, it’s the invoice id.
But when i give this code he gives this error?
$invoice = Invoice::find(21);
$invoice->addInvoiceItem(‘ITEM’, 'HotelReservatie ', 16);
$invoice->save();
Fatal error: Uncaught Exception: <!DOCTYPE html> <html> <head> <meta charset=“UTF-8” /> <meta http-equiv=“refresh” content=“1;url=http://localhost/ninja/public” /> <title>Redirecting to http://localhost/ninja/public</title> </head> <body> Redirecting to http://localhost/ninja/public. </body> </html> in C:\xamp3\htdocs\ninja\vendor\invoiceninja\sdk-php\src\InvoiceNinja\Models\AbstractModel.php:165 Stack trace: #0 C:\xamp3\htdocs\ninja\vendor\invoiceninja\sdk-php\src\InvoiceNinja\Models\AbstractModel.php(37): InvoiceNinja\Models\AbstractModel::sendRequest(‘localhost/ninja…’) #1 C:\xamp3\htdocs\ninja\test.php(13): InvoiceNinja\Models\AbstractModel::find(‘21’) #2 {main} thrown in C:\xamp3\htdocs\ninja\vendor\invoiceninja\sdk-php\src\InvoiceNinja\Models\AbstractModel.php on line 165
Are there any details in the app’s error log in storage/logs/laravel-error.log
nothing but isnt there any example of an creating an invoice with an existing client_id