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

How to handle and/or store money values in web applications?

I'm working with PHP in Laravel 4 and MySQL and I'm not sure how to handle monetary values. I want to display them, using this format : 120,50€ 1.000,50€ The amount field is of type DECIMAL(12,2). Should I save the amount like 12050 or like…
1
vote
3 answers

PHP: Calculate with cents

I got the following problem: I got values like 2,50 1 2,99 Now I would like to separate them into 2 parts like this: 2 and 50 1 and 00 2 and 99 $euro = explode('.', $item->price)[0]; if(array_key_exists(1, explode('.', $item->price)))…
MyFault
  • 427
  • 1
  • 6
  • 21
1
vote
2 answers

Convert currency $232,680.00 to decimal

What will be best way to get decimal value from $232,680.00 Is it possible without regular expression. Also this does not work - decimal.TryParse(Response.assess_market_value, NumberStyles.Currency, CultureInfo.InvariantCulture, out…
Sachin Prasad
  • 5,365
  • 12
  • 54
  • 101
1
vote
1 answer

get all currency filter items in an Angular view

I'm currently working in a logic that should change all prices in a view according to the user selected currency (dls, eur, brl), I was wondering about if it is possible to get all the elements in a view in where the "currency" filter get's applied.…
Franco Aguilera
  • 617
  • 1
  • 8
  • 25
1
vote
0 answers

How to get average on Mongoid when using Money-Rails

I'm using Money-Rails as field like so: class Product ... field :price_GBP, type: Money ... end And I'm trying to get the average for all price_GBP documents. If the price_GBP field were a float or integer I would something like this: avg =…
WagnerMatosUK
  • 4,309
  • 7
  • 56
  • 95
1
vote
1 answer

Algorithm for issuance of delivery

I need to get inherited class of DispenseAlgorithm. It must realize algorithm for calculate issuance of delivery. The algorithm must provide even nominals consumption . public abstract class DispenseAlgorithm { public abstract Dictionary
user266003
1
vote
2 answers

How to wrap woocommerce currency symbol in span?

How to wrap woocommerce currency symbol in span? The question pretty much sums it all up. I want to style woocommerce currency symbol individually and i can't do it since it is outputted as text content with the price. Please if anyone can help me,…
1
vote
1 answer

How to compute compounded interest rate?

I have the following scenario where i invest variable amount of principal every month, Investment Month $300 Jan $200 Feb $100 Mar and i get a return of, Returns Month $1000 Apr How do i calculate the nominal annual…
josh
  • 13,793
  • 12
  • 49
  • 58
1
vote
1 answer

Filling currency missing data in Pandas Dataframe

I am extracting currency data from Quandl: import Quandl df = Quandl.get("CURRFX/USDEUR", collapse="daily") df = df.tail(10).reset_index() Running the code above, you can see that currency data is of course not available during the weekends. The…
chopin_is_the_best
  • 1,951
  • 2
  • 23
  • 39
1
vote
4 answers

Remove "$" before ASP.Net RangeValidator script executes

How can I force the input's onchange script to run before the RangeValidator's script? I want to prevent a failed validation when the user enters a dollar sign or comma. function cleanUp(str) { re = /^\$|,/g; return str.replace(re, ""); //…
Robert Claypool
  • 4,262
  • 9
  • 50
  • 61
1
vote
1 answer

Change locale dynamically according to a dynamic currency value

End-users are provided with a list of currencies. One of which of their interest may be selected by them at any time. As such, a locale used in java.text.NumberFormat needs to be changed based on the currency selected. This does not appear to be…
Tiny
  • 27,221
  • 105
  • 339
  • 599
1
vote
1 answer

Money format - how do I use it?

I'm a junior in high school. Having a tough time figuring out how to use money format. I'm doing an exercise in A Guide to Programming in Java (Second Edition) where I have to prompt the employees for the number of burgers, fries, and sodas. Fries…
1
vote
1 answer

webservicex for Currency Convertor don't work

I am trying to develop an e-commerce website. To manage multi-currency, I would like to use webservice for automatic conversions. so I tried this webservice: http://www.webservicex.com/CurrencyConvertor.asmx?WSDL with this code : try …
strauss
  • 259
  • 3
  • 12
1
vote
2 answers

Python: getting prices of smartphones from website

I want to get the prices of smartphones from this website, http://tweakers.net. It's a Dutch site. The problem is that the prices are not collected from the website. The textfile 'TweakersTelefoons.txt' contains 3 entries:…
1
vote
1 answer

Money Rails - Order Of Amount And Currency

Does the money-rails gem require a specific order of price and currency when initializing an object? For example, take a look at the following: Object.new(currency: 'JPY', price: 25) => # If we…
Artem Kalinchuk
  • 6,502
  • 7
  • 43
  • 57