添加新功能
文件表格
文件表格允许您在会计文件中加入文本文件、图像 (包括Logo/商标) 或脚本。
用户可以两种不同的方式添加:
- 点击工具栏菜单 → 添加 → 添加文件表格。
- 这是在程序需要保存文件时自动创建的 (例如:通过报表菜单 →附件的部分,在生成的报表或按组生成的报表中添加 Logo/商标或附件)。
文件表格内包含有下面的列:
- 识别号码列
此列指的是文件的名称。其是自由文本,在表中应该是唯一的。- 以'_'开头的文件用于特殊程序功能。
- 例如 "_预算.js"
您可以插入自己为预算表格所创建的功能。
- 例如 "_预算.js"
- dlgmanageaddons的识别号码是用来保存作为Logo/商标的图片。
- attachment_ Id 用于资产负债表中的附件。
- 以'_'开头的文件用于特殊程序功能。
- 摘要列
对文件的简要描述 (选项)。 - 附件列
包含文件。通过点击单元格,可以查看或修改文件的内容。
可能的内容有以下几种类型:- 图片 (image/png, image/jpg)
- 普通文本 (text/plain)
- html格式化的文本 (text/html)
- Markdown格式的文本 (text/markdown)
- 用javascript编程 (text/javascript)
- CSS表格式样 (text/css)
添加一个新的文件
要在文件表格中插入一个新的文件:
- 添加新的一行。
- 在识别号码列中,填写文件名称。
- 在摘要列中,填写您所需的文字。
- 在附件列中,双击单元格,或单击该单元格右上角编辑文件的符号,选择您想添加的文件类型。
您也可以参阅:
Markdown编辑器
在Banana财务会计+中,除了html语言外,现在还可以用markdown语言插入资产负债表的附件。这对于在附件中插入表格是非常方便的。
在Banana财务会计+中,只有高级计划才有此功能。
Markdown是一种允许使用标准文本编辑器和易于编写和阅读的语法来创建格式化文本的语言。
在Banana+中,可以在文件表格的附件中使用这种语言,并且支持 GitHub Flavored Markdown 的规范。
文档发布在github.com上:
添加一个Markdown文档
- 选择文件表格。
- 添加一个新的行。
- 在识别号码列中,输入一个能识别该文件的名称。
- 在摘要列中,写上所需的文字。
- 在附件列中,双击单元格或选择编辑符号,选择Markdown文本类型。
创建一个表格的 Markdown 语法示例
要在markdown中创建表格,列的内容必须是一个垂直的斜线符号,前面和后面是一个空格" | "。
要对齐列,必须创建一行含以下要素:
- 左边:简单的连字符 (最少三个连字符)。
- 中心:破折号前面和后面都有冒号 ":---:"。
- 右:破折号后面是冒号 "---:"。
# Notes to the Balance (Example)
The financial statements of Example have been prepared in accordance with the International Financial Reporting Standards (IFRS).
## Cash Positions
| Account | Description | Current Year | Previous Year |
| :---: | --- | ---: | ---: |
| 1000 | Cash | 23'000.00 | 17'000.00 |
| 1020 | Bank account| 9'000.00 | 1'000.00 |
| | **Total** | **32'000.00** | **18'000.00** |
## Other Fixed Assets
| Account | Description | Current Year | Previous Year |
| :---: | --- | ---: | ---: |
| 1000 | Machinery | 13'000.00 | 17'000.00 |
| 1020 | Furniture | 5'000.00 | 4'000.00 |
| | **Total** | **18'000.00** | **21'000.00** |
HTML 编辑器
添加 ${...} 字段
允许用户向文件添加动态文本,例如账户的余额。您可以在下面的这个链接中查看 Banana API 的界面: https://www.banana.ch/doc/en/node/4714
该命令可以手动添加或通过编辑菜单 → 添加脚本的命令来添加。
打印当前账户余额 1020
${Banana.Converter.toLocaleNumberFormat(Banana.document.currentBalance('1020','','').balance);}
账户表的输出,列:账户,组,摘要,余额
${HTML Banana.document.table('Accounts').toHtml(['Account','Group','Description','Balance'],true);}
可以在单独的文档中编写JavaScript代码,并通过Banana.include的命令来包含脚本。
脚本可以保存在文件表格或本地文件中。
${Banana.include('documents:myscript1');rtnValue}
${Banana.include('c://temp//myscript16.js');rtnValue}
添加分页符
该命令可以手动添加或通过编辑菜单 → 添加分页符的命令来添加。
Testo nella prima pagina
${PAGEBREAK}
Testo nella seconda pagina
解决问题
- 要复制示例代码,请使用复制命令,而不是CTRL+C / CMD+C。这样可以确保只复制没有html格式的文本。
- 如果${...}字段不起作用,确保没有html格式化 (如<span>...</span>元素或其它东西),必要时从HTML源代码中删除。
Embedded Extension
Embedded Extensions are extensions written in JavaScript and saved directly in the Documents table of the accounting file. They work exclusively in that specific file without requiring installation. Once created, they are immediately ready to use.
Add an Embedded Extension
- Open an accounting file in Banana Accounting Plus.
- Ensure the Documents table is enabled:
- Add the extension in the Documents table:
- In the ID column enter a name for the extension.
- In the Description column enter a comment.
- In the Attachments column, attach the JavaScript code with a double click on the cell or select the edit symbol in the top right corner, then select Javascript code and confirm with OK.
- An editor where you can write your javascript code opens.
- When you are finished, confirm with OK, and save the accounting file.
Run the Extension
You have two options to run the embedded extensions:
- From the Documents table, click the run symbol in the Attachments cell containing your code.
- From the Extensions menu, select the extension from those listed.
More information
Documentation for developers:
Simple table (Add fonctionalities)
The programme adds a table consisting of these columns to the existing file.
- Id
- Description
- Notes
This is used to add codes for projects, for example, or other information that you want to encode.
In other tables, a column can then be added that links to this table.
Joining Tables
Add Link Column
In Banana Accounting Plus, you can create links between columns of different tables using the RowId column.
The command Tools > Add/Remove Functionalities > Add Columns for linking tables creates a link column in the current table, with another existing table.
The Description column is automatically added, but if it is not needed, it can be deleted or hidden.
The command only works if the table to be linked contains the "RowId" column.
Choose Table Dialog
A list of tables containing the "RowId" column, which are not linked to any table, is displayed.
Choose the column after which (position) you want the link columns to be added.
Choose Column Dialog
All columns of the table are displayed.
Choose the column after which (position) you want the link columns to be added.
Link between Tables
To create a link between a column of one table and a different one, proceed as follows:
- Open the file where you want to add the table.
- Add the new table "e.g., Projects".
- In the Id column of the added table (Projects), enter the project code, and in the Description column, enter the project description.
- In the Transactions table, link the columns of the added table (Projects):
- From the Tools > Add/Remove Functionalities > Add Columns for linking tables menu.
In the dialog that opens, you can choose the position of the column. - Confirm by clicking the OK button.
- New link columns are added and displayed, starting with the name of the table.
- ProjectsId where the corresponding code from the RowId column is entered.
- ProjectsDescription (protected column) where the description corresponding to the entered code is displayed.
- When the content of the Projects table is changed by entering the Id in the other table, the description text will automatically be retrieved.
- From the Tools > Add/Remove Functionalities > Add Columns for linking tables menu.
- If descriptions in the added table (Projects) are changed, to automatically retrieve the new texts, recalculate or close and reopen the file.
The program automatically links columns that start with the same nameXml of a table and are followed by "Id" or "Description".
- Link columns can be created or added manually by assigning them specific names.
- Do not use these names for columns that should not be linked.