2 /**********************************************************************
3 Copyright (C) FrontAccounting, LLC.
4 Released under the terms of the GNU General Public License, GPL,
5 as published by the Free Software Foundation, either version 3
6 of the License, or (at your option) any later version.
7 This program is distributed in the hope that it will be useful,
8 but WITHOUT ANY WARRANTY; without even the implied warranty of
9 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
10 See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
11 ***********************************************************************/
13 This file contains templates for all country specific functions.
14 If your locale needs special functionality provided by hook functions
15 copy this file to respective lang/xx_XX directory and edit templates below.
16 You can safely remove not used function templates.
18 Name it after language code e.g. hooks_en_US
20 class hooks_xx_XX extends hooks {
23 // Price in words. $doc_type is set to document type and can be used to suppress
24 // price in words printing for selected document types.
25 // Used instead of built in simple english price_in_words() function.
27 // Returns: amount in words as string.
29 function price_in_words($amount, $doc_type)
35 // Exchange rate currency $curr as on date $date.
36 // Keep in mind FA has internally implemented 3 exrate providers
37 // If any of them supports your currency, you can simply use function below
38 // with apprioprate provider set, otherwise implement your own.
39 // Returns: $curr value in home currency units as a real number.
41 function retrieve_ex_rate($curr, $date)
43 $provider = 'ECB'; // 'ECB', 'YAHOO' or 'GOOGLE'
44 return get_extern_rate($curr, $provider, $date);
48 // Generic function called at the end of Tax Report (report 709)
49 // Can be used e.g. for special database updates on every report printing
50 // or to print special tax report footer
53 function tax_report_done()