Difference between revisions of "Module NumberWords"
(→Usage) |
(→Usage) |
||
Line 24: | Line 24: | ||
= Usage = | = Usage = | ||
− | + | ==If you are an end user== | |
+ | you can add following key | ||
{{NumberWordsKeys}} | {{NumberWordsKeys}} | ||
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. | 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. | ||
Line 30: | Line 31: | ||
{{NumberWordsKeysODT}} | {{NumberWordsKeysODT}} | ||
− | + | ==If you are a developer== | |
+ | You can also use, anywhere in the code, the method | ||
<source lang="php"> | <source lang="php"> | ||
$langs->getLabelFromNumber($mynumber,0|1) | $langs->getLabelFromNumber($mynumber,0|1) |
Revision as of 16:34, 8 August 2012
Informations
Module name | |
Editor / Editeur | NLTechno (www.nltechno.com) - http://www.dolistore.com/ |
Download or buy page / Page achat ou téléchargement | |
Status / Statut / Estado | Stable |
Prerequisites / Prérequis |
Dolibarr min version: 3.0.0 Dolibarr max version: {{{maxversion}}} |
Last update date / Date mise à jour fiche / Fecha última actualización | 2012-08-8 |
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
From the application
- Download the archive file of module (.zip file)
- Go on menu Home -> Setup -> Modules -> Deploy external module and submit the file.
- Module is then visible into list of available modules (Home -> Setup -> Modules) and can be activated.
Manually
- Download the archive file of module (.zip file)
- Put the file into the root directory of Dolibarr.
- Uncompress the archive file, for example with command
unzip modulefile.zip
- Module is then visible into list of available modules (Home -> Setup -> Modules) and can be activated.
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 a cog icon appears on module thumb or at end of the line of 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_EXCL_TAX_TEXT__
- __AMOUNT_VAT_TEXT__
- __AMOUNT_MULTICURRENCY_TEXT__
- __AMOUNT_MULTICURRENCY_EXCL_TAX_TEXT__
- __AMOUNT_MULTICURRENCY_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 ise inside your ODT file are
- {__AMOUNT_TEXT__}
- {__AMOUNT_EXCL_TAX_TEXT__}
- {__AMOUNT_VAT_TEXT__}
- {__AMOUNT_MULTICURRENCY_TEXT__}
- {__AMOUNT_MULTICURRENCY_EXCL_TAX_TEXT__}
- {__AMOUNT_MULTICURRENCY_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
The 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 DoliCloud team:
- GIT Repository: git clone https://github.com/DoliCloud/DoliMods.git
Note that the code of all modules developed by DoliCloud team are presents in the same repository (1 sub-directory of htdocs = 1 module). They are all Open Source modules.