Module NumberWords

From Dolibarr ERP CRM Wiki
Jump to navigation Jump to search

Return to developer
documentation index

File Doc dev.png

Return to user
documentation index

File Doc user.png

Informations

Module name Number to Words
Editor / Editeur NLTechno - www.nltechno.com
Download or buy page / Page achat ou téléchargement www.dolistore.com
Status / Statut / Estado Stable
Prerequisites / Prérequis Dolibarr min version 5.0   
Last update date / Date mise à jour fiche / Fecha última actualización 2019-08-12
Note / Nota

Features

With this module, Dolibarr is able to translate decimal number or amount into full text strings ("110 dollars" will give "one hundred and ten dollars")

Install

  • Download archive file of module (.zip file) from web site www.dolistore.com or from any other source.
  • Install module into the custom folder of Dolibarr:
    • Go to Home - Setup - Modules - Deploy/install external app/module
    • Upload the file. Note: If it fails, you can manually unzip the file into the custom directory from command line: Go into the *custom* directory and uncompress file with command
unzip modulefile.zip
  • Module is ready to be activated and used.

Setup

To use this module, you must first enable it using an administrator account, via the menu option "Home - Setup - Modules".

Choose the tab where the module is listed. Then click on "Activate".

The module is now activated.

If an icon appears at end of the line for the module, click on it to access the setup page specific to the module.

Then see "Usage"

Usage

If you are an end user

you can add following key

  • __AMOUNT_TEXT__
  • __AMOUNT_WO_TAX_TEXT__
  • __AMOUNT_VAT_TEXT__
  • __AMOUNT_CURRENCY_TEXT__
  • __AMOUNT_CURRENCY_WO_TAX_TEXT__
  • __AMOUNT_CURRENCY_VAT_TEXT__

in any "free text for PDF" area in setup of invoices, orders, proposals... This string will be replaced with the amount with tax, without tax or for vat in full clear alphabetic text.

If you use ODT templates, the key to use inside your ODT file are

  • {__AMOUNT_TEXT__}
  • {__AMOUNT_WO_TAX_TEXT__}
  • {__AMOUNT_VAT_TEXT__}
  • {__AMOUNT_CURRENCY_TEXT__}
  • {__AMOUNT_CURRENCY_WO_TAX_TEXT__}
  • {__AMOUNT_CURRENCY_VAT_TEXT__}

If you are a developer

You can also use, anywhere in the code, the method

$langs->getLabelFromNumber($mynumber,0|1)

to get full text string of a number (if second parameter is 0) or an amount (if second parameter is 1).

Development

Development of this module is not included inside the standard GIT repository of Dolibarr but inside a repository dedicated to modules not supported by the Dolibarr development team but supported by NLTechno on platform Git by Framasoft:

Note this is a private repository, so to contribute and/or get sources, you must create an account on https://git.framasoft.org web site.