Documents table
The new Documents table allows you to include texts, images or programming codes (scripts) into your accounting file.
This table is normally automatically created when attaching some documents to the Balance sheet, using the Account1 - Balance sheet command or the Account1 - Balance sheet with groups command -> Attachments section.
The Documents table has the following columns:
- Id column
This is the document's name.
Documents beginning with the "_" sign have specific meanings.- "_budget.js"
You can enter specific functions created for the Budget table.
- "_budget.js"
- Description
A short file description (optional) - Attachments
Contains the file.
If you click on the cell, an icon will appear to add or edit the file content.
Including a logo when printing the invoices
- Add a new row
- In the Id column, write 'logo'
- In the Attachment column, double-click on the cell, or select the Edit symbol, select the type of Image document and select the picture you want to insert in the printout.
The logo must be an image with a width of 120px and height of 100px.
You can also add other images, to be used in customized templates.
HTML Editor
Adding the ${...} field
The ${...} field allows the user to add dynamic text to the document, for instance an account's balance or a Banana table. The Banana API interface is available at the following web address https://www.banana.ch/doc8/en/node/4714
The command can be added manually or through the command Edit - Add script
Printing the current balance of account 1020
${Banana.Converter.toLocaleNumberFormat(Banana.document.currentBalance('1020','','').balance);}
Output of the Accounts table, columns: Account, Group, Description, Balance (command not yet available)
${HTML Banana.document.table("Accounts").toHtml(['Account','Group','Description','Balance'],true);}
It is possible to write the javascript code in a separate document and include the script through the command Banana.include.
The scripts can be saved in the Documents table or in a local file.
${Banana.include("documents:myscript1");rtnValue} ${Banana.include("c://temp//myscript16.js");rtnValue}
Adding a page break
The command can be added manually or through the comand Edit - Add page break
Text in the first page
${PAGEBREAK}
Text in the second page
The command ${PAGEBREAK} is not yet available, the current command to add a page break is:
<!--pagebreak-->