Extension's Types

Documentação •
Neste artigo

The Extension type is defined within the attribute @task.
There are many types, and some of them are started in different ways.

Every extension need a specific type and a startup function. 

  • Types: app.command, export.file, export.rows, export.transactions, report.general
  • Startup function: exec()
  • How to run it: 
    • File based Apps are started from the menu App.
    • Embedded Apps are run with the button within the Document table

File Creator Extensions

File Creator Extensions are used to create a Banana Accounting file by importing and transforming the data. 

General extension

The General extension type is used for anything that is not specific. It can input data, prepare report or modify the accounting.

  • // @task = app.command

The extension is shown in the Menu extension.

You can run the extensions in two way:

  • Menu > Extensions settings > Execute
  • Menu Extension > the specific extension command 

Export extension

Export extensions create and return a content that is than saved to a file.

  • @task: import.transactions

Import extensions

The purpose is to translate the content of a file to a Banana Compatible format.
Import extensions are displayed in the Menu Action > Import in to Accounting.

There are different type:

  • import.transactions
    • @task: import.transactions
    • Startup function: excec(fileContent) with the content of the file as parameter. The function should return a comma separated file.
    • How to run it:
      • Select from the menu Actions the command Import to accounting...
      • As Import type select Transactions
      • Select an import app from the list
      • Click Browse to select the file with the data to import in Banana
  • import.rows
  • import.accounts
  • import.categories
  • import.exchangerates
  • import.vatcodes

Invoice Dialog extensions

Invoice Dialog extensions is a special type that is called by the Invoice & Expense application to edit or update the content of an invoice or estimate. 

Report extensions

Report extensions purpose it to create a report.

  • The report startup function is called by the specific function in Banana, for example the print invoice function.
  • The function should return a Banana.Report document.
  • The result is displayed on the preview windows.

There are different type of report:

  • report.customer.invoice
    • Type: report.customer.invoice
    • Startup function printDocument(jsonInvoice, repDocObj, repStyleObj)
    • How to run it:
      • Accounting: menu Reports > Customers the command Print invoices...
      • Inoice & Estimate : menu Reports > Print invoices...
  • report.customer.statement
    • Type: report.customer.statement
    • Startup function printDocument(jsonInvoice, repDocObj, repStyleObj)
    • How to run it:
      • Select from the menu Reports > Customers the command Print statements...
  • report.customer.reminder
    • Type: report.customer.reminder
    • Startup function printDocument(jsonInvoice, repDocObj, repStyleObj)
    • How to run it:
      • Select from the menu Reports > Customers the command Print reminders...

Payment extensions

Payment extensions are used in the accounting to enter payment data and create payments orders.  

 

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