Adapt Existing Invoice Layouts

In this article

In Banana Accounting Plus you can take an existing invoice layout, modify it and use it as a new custom layout.
A layout is an Extension that is specific for printing an invoice.

The following steps describe how to adapt to your needs the existing [CH10] Layout with Swiss QR Code and [UNI11] Layout 11 Programmable Invoice layouts.

  1. Choose the layout to start from
  2. Save the layout files
  3. Modify the layout
  4. Add your layout to the Banana Extensions
  5. View an invoice with the custom template

Choose the layout to start from

On GitHub you can find the following layouts:

These layouts extensions are packed into .sbaa files that include all the required files needed to run the extensions.

Save the layout files

Choose the layout you want to start from and download all the files included in the .sbaa package on your computer.

  • Open the links above.
  • Right click on the page.
  • Select Save page.

All the files must be saved in the same directory.

Modify the layout

  • Open the local file ch.banana.ch.invoice.ch10.js or ch.banana.uni.invoice.uni11.js with a text editor program.
    • Right click on the file.
    • Open with and select the text editor program.
  • Change the @id with a new one.
    Each new invoice layout must have a different @id text.
  • Change the @description with a new one.
    The description will appear in the print dialog window when selecting the invoice layout.
  • Modify then the script as you want.
    Find more information about the content of the Json Object of the invoice.
  • Save the file.

Add your layout to the Banana Extensions

At this point you can choose the way you want to add the layout to the Banana Extensions.

You have two options:

  • Install the layout without recreating a new package.
    • This can be useful if you don't need to share the layout with someone else, and also if you want to test your changes faster.
    • From Banana, menu Extensions → Manage Extensions.
    • Click on the button Add from file... and choose the file you just downloaded and modified (ch.banana.ch.invoice.ch10.js or ch.banana.uni.invoice.uni11.js).
  • Create a new Extension Package (.sbaa file).
    • This can be useful if you need to share the layout with someone else.
    • Use the following manifest and QRC files and adapt them as you need:
    • From Banana, menu Extensions → Manage Extensions.
    • Click on the button Add from file... and choose the file .sbaa you just created.

View an invoice with the custom layout

  • From Banana, menu Reports Customers → Print Invoices select the layout you just added.
  • Confirm with Ok to see the preview.

 

Help us improve the documentation

We welcome feedback on how to improve this page.

Tell us what theme needs a better explanation or how to clarify a topic.

Share this article: Twitter | Facebook | LinkedIn | Email