Loading...
 

Currency Amount Tracker Field

This field is used to display amounts in currency, using local currency symbols, three-letter international currency codes, or codes of your own making (for a community currency, for instance). Country conventions for decimals and separating thousands can also be set.

Options

Parameter Value Default Description
amount any decimal 20.99 the calculation of the amount
sourceCurrency 3-letter ISO 4217 currency code CAD source currency,which currency is the amount in?. The three-letter currency code for Amount
exchangeRatesTrackerId number 50 the currency field of the tracker
samerow 0 or 1 0 Will display the next field or checkbox in the same row if set to 1
size number of charcters 17 The visible size of the field in characters
prepend any text none Text that will be displayed before the field
append any text none Text that will be displayed just after the field
locale language_country code, for example en_US or en_US.UTF-8 or en_US.ISO-8559-1 en_US This language code (ISO 639) + country code (ISO 6339) determines how decimals are displayed and what thousands separator is used
defaultCurrency 3-letter ISO 4217 currency code USD The three-letter currency code that will display as convert currency
symbol i or n n Set to i for international symbol, n for local
all_symbol 0 or 1 0 Set to 1 to show symbol for every item (default only shows currency symbol on first item in a list)

Examples

Image
locale set to fr_CA
(language = French
country = Canada)
Image
locale set to ja_JP
(language = Japanese
country = Japan)
Image
locale set to de_DE (Germany)
symbol set to i
all_symbol set to 1

Multi-currency

In Tiki19, this field was improved so it can track values in any currency, and on mouse-over, show the equivalent value in other currencies. This is very useful if you need to track items in many currencies. For example, you get paid in more than one currency, and you'd like to know the value in other currencies.

The exchange rates are stored in a tracker. You can set date ranges for exchange rates.

This field had a bunch of incremental fixes and enhancements in branch 20.x in September 2019, so if you intend to use seriously, you should probably get the Daily Build or from SVN.

Exchange rate example

Image

Examples

Examples
{currency amount=20.99 sourceCurrency=CAD exchangeRatesTrackerId=50 prepend= append= locale=en_US.UTF-8 defaultCurrency=USD symbol=n allSymbol=0}

Tiki22

All currency fields now have another index field named permName_base. It contains a numeric value of the amount converted to base currency. Base currency is the currency with rate = 1 in the currency tracker. If you need multiple base currencies, you could use multiple currency trackers each having a different rate = 1 currency. Then, some currency fields will use one currency tracker and others will use the other one.

Sorting: use the "_base" suffix currency field in a LIST context and sort on that.

victor.emanouilov 2020-04-15

https://gitlab.com/tikiwiki/tiki/-/commit/c512d9e12c360e5dce9dcddadf768d28c07c21a1

A couple of updates here that were needed before adding the range filters:

1. Added base currency field to the index - this is taken from the currency tracker - the currency unit that has conversion rate = 1. Each currency field now has its value indexed as text value (e.g. 123USD) and also has a "_base" suffix one that is a numeric value of the amount in the base currency. You should keep one and only one currency with rate = 1 in the currency tracker and that would be the base currency. We will use this later on when we sort and do other operations with currencies.

2. Extended math field to inherit indexable fields from its mirrored field. In case of a currency mirror, this will allow the math field to also have the "_base" suffix field in the index, so calculations of currencies will also store the base currency value in the index.

3. Extended currency field to support range filters - from/to value and from/to currency. This is similar to tracker filters and also similar to the currency field input, so it makes most sense to use it here. Chosen amount and currency is converted to the base currency and then "_base" index field is searched as a numeric range search.

Thus, all the updates here depend on the presence of a base currency with rate = 1 in the currency tracker.


Created by lindon. Last Modification: Monday 20 April, 2020 12:03:41 GMT-0000 by Marc Laporte.

Attached files

ID Name Comment Uploaded Size Downloads
77 Screenshot_20181101-142645.png An example of an exchange rate tracker, with CAD as the base rate Marc Laporte 167.11 Kb 0
53 de_DE.png German example lindon 11.11 Kb 1089
52 ja_JP.png Japan example lindon 9.54 Kb 1167
51 fr_CA.png fr_CA example lindon 10.12 Kb 1139

doc.tiki.org

Get Started

Admin Guide User Guide Bootstrap in Tiki

Keywords

Keywords serve as "hubs" for navigation within the Tiki documentation. They correspond to development keywords (bug reports and feature requests):

Accessibility (WAI and 508)
Accounting
Articles and Submissions
Backlinks
Banners
Batch
BigBlueButton audio/video/chat/screensharing
Blog
Bookmark
Browser Compatibility
Link Cache
Calendar
Category
Chat
Clean URLs
Comments
Communication Center
Compression (gzip)
Contacts (Address Book)
Contact us
Content Templates
Contribution
Cookie
Copyright
Credit
Custom Home and Group Home Page
Date and Time
Debugger Console
Directory of hyperlinks
Documentation link from Tiki to doc.tiki.org (Help System)
Docs
Draw
Dynamic Content
Dynamic Variable
External Authentication
FAQ
Featured links
File Gallery
Forum
Friendship Network (Community)
Gmap Google maps
Groups
Hotword
HTML Page
i18n (Multilingual, l10n, Babelfish)
Image Gallery
Import-Export
Install
Integrator
Interoperability
Inter-User Messages
InterTiki
Kaltura video management
Karma
Live Support
Login
Logs (system & action)
Look and Feel
Mail-in
Map with Mapserver
Menu
Meta Tags
Mobile Tiki and Voice Tiki
Mods
Module
MultiTiki
MyTiki
Newsletter
Notepad
Payment
Performance Speed / Load
Permissions
Platform independence (Linux-Apache, Windows/IIS, Mac, BSD)
Polls
Profiles
Profile Manager
Report
Toolbar
Quiz
Rating
Feeds
Score
Search engine optimization
Search
Search and Replace
Security
Semantic links
Shadowbox
Shadow Layers
Share
Shopping cart
Shoutbox
Slideshow
Smiley
Social Networks
Spam protection (Anti-bot CATPCHA)
Spellcheck
Spreadsheet
Stats
Surveys
Tags
Task
Tell a Friend, alert + Social Bookmarking
TikiTests
Theme CSS & Smarty
Trackers
Transitions
TRIM
User Administration including registration and banning
User Files
User Menu
Watch
WebDAV
Webmail
Web Services
Wiki History, page rename, etc
Wiki Syntax
Wiki structure (book and table of content)
Workspace
WSOD
WYSIWYCA
WYSIWYG
XMLRPC

Tiki Newsletter

Delivered fresh to your email inbox!
Newsletter subscribe icon
Don't miss major announcements and other news!
Contribute to Tiki