Questions tagged [currency]

Currency is a medium of exchange of value, usually referring to government issued denominations.

The Currency tag is relevant to any topic that involves the handling of currency, including accurate calculation, rounding schemes, best practices and display formatting. It is also applicable to discussions of how specific languages or libraries handle currency.

http://en.wikipedia.org/wiki/Currency

2964 questions
1
vote
1 answer

NSNumberFormatter to add currency symbol

I'm trying to use a NSNumberFormatter to display a money amount in an NSTextField. I would like to have the application display the dollar sign, but when the user replaces the existing value I would just type 12.34 instead of 12.34$, and let the…
yvesf
  • 31
  • 3
1
vote
1 answer

Storing currency as BigDecimal in Hibernate/JPA - decimal(19,2)

I changed the fields in my java application that hold currency values from double to BigDecimal to prevent strange double rounding issues like "0.20000000000001". This now created the SQL date types of decimal(19,2), which means 2 digits right of…
jan
  • 3,923
  • 9
  • 38
  • 78
1
vote
1 answer

Android select currency

I saw in the forum that others have the same problem, but no one explains how he solved. I have a TextView in my Activity, with a string in currency format For example, if the user has the phone set to U.S. English language, and yet want to…
1
vote
1 answer

Issues making use of money.js with accounting.js

I'd like to make use of money.js and accounting.js (for formatting currencies) to change the currency of a given price. I'd first like to get a simple example working before going any further. This article describes exactly what I'd like to…
Ian Muscat
  • 235
  • 3
  • 15
1
vote
4 answers

How to get money from users mobile phone using Java application?

How to get money from users phone using Java application? So I want to create simple casual game, I want to charge users if they want to pass some extra layers. I want to create an app first of all for android, it'll be opensource. Than to port in…
Rella
  • 65,003
  • 109
  • 363
  • 636
1
vote
2 answers

Culture currency format de-CH gives Fr. instead of CHF - How to get CHF?

I have changed the culture in an asp.net page to get the currency as Swiss Currency as following: <%@ Page Language="C#" AutoEventWireup="true" CodeFile="SalesProjects.aspx.cs" Inherits="admin_UsersManagement" Culture="de-CH" UICulture="de-CH"…
FeliceM
  • 4,163
  • 9
  • 48
  • 75
1
vote
2 answers

Cases in select statement MySQL

I am building a database for a GameCenter type application. The following is the start of a query to build a weekly leaderboard for a specific game. A 'score' is stored as an INT in a table 'Game' however another field, 'scoreFormat' indicates how…
James Baker
  • 331
  • 3
  • 8
  • 26
1
vote
1 answer

Formatting currency for AED

I'm currently doing a project for a client in Dubai, where the currency is AED. Throughout the project I used {0:c} assuming that setting the local in web-config would sort me out. I set the culture in web.config using:
Richard Garside
  • 87,839
  • 11
  • 80
  • 93
1
vote
1 answer

Subtract payment until amount due is zero

Using powershell I read in a text file that contains the check amount. I then create a query and get the amount due. The problem comes in because buyer could have multiple balances for different products. So they could write a check that covered A…
Grady D
  • 1,889
  • 6
  • 30
  • 61
1
vote
3 answers

NumberFormat.getCurrencyInstance() turning everything to zero?

I've been working on this for hours and can't find a solution... When I use this code: NumberFormat currencyFormatter = NumberFormat.getCurrencyInstance(Locale.US); …
DranoMax
  • 13
  • 3
1
vote
1 answer

Yii localization: Currency code?

Yii Framework provides a simple way to find the currency symbol for any given currency code (USD/EUR/JPY...), for example: Yii::app()->locale->getCurrencySymbol('USD'); But how do we find the currency code which corresponds to the locale in use?
mae
  • 14,947
  • 8
  • 32
  • 47
1
vote
2 answers

preg_match(): Compilation failed: nothing to repeat at offset 2

I can't figure out why my regular expression is breaking. I want it to match: $100,000 100,000 100000 (I know it doesn't match this, but I want it to) preg_match("/^\$?(?!0.00)\d{1,3}(,\d{3})*(\.\d\d)?$/", $string); So how can I make it match the…
Dylan Cross
  • 5,918
  • 22
  • 77
  • 118
1
vote
1 answer

how to set GBP as default currency for US customers in magento?

I have a magento store with multiple currencies. The product prices are displayed in the relevant currencies according to the IP addresses. I want to set up GBP as the default currency for US customers, i.e. instead of USD (as per the ip address)…
1
vote
2 answers

xpages currency incomplete entry failing

I have a form that accepts currency from several fields and depending on what I enter into one, it calculates others. For this most part the code below works (example being the invoice amount field)
cjames728
  • 193
  • 1
  • 12
1
vote
1 answer

Wordpress conditional shows "$0.00 text" instead of "just text"

I have the following code to show a table of coming events in my page: {is_future} #_EVENTLINK #d/#m/#Y #_EVENTNOOFDAYS #_EVENTTIMES {not_free}#_EVENTPRICEMAX{/not_free}…
user1433479
  • 135
  • 1
  • 5
  • 20