money

tsql casting to money rounds up

When casting a varchar value to MONEY it is rounding the value to the nearest 0.10, how do I prevent this rounding up? UPDATE: I found the problem. In a subquery, the value is being CAST from varchar to FLOAT and then I was trying to CAST from FLOAT to MONEY. ...

ASP.NET GridView: How to Control the Format of a Column in Edit Mode?

Given the following GridView: <asp:GridView runat="server" ID="GridMenuItemAttributes" DataKeyNames="MenuItemAttributeID" AutoGenerateColumns="false" OnRowCommand="GridMenuItemAttributes_RowCommand" DataSourceID="DSMenuItemAttributes" OnRowEditing="GridMenuItemAttributes_RowEditing" > <Columns> <asp:BoundField HeaderText="D...

Computed column based on another computed column?

Hello. I have a computed column called Cost that returns money. I want to have another column that returns (Cost * 2), but it doesn't allow me. ...

Should I do money calculations in Javascript or as an AJAX call?

Hi, I'm building a webapp using JQuery, Stripes, Spring and JPA (Hibernate). I have a page that allows users to enter a number of order line items and each time onblur occurs in the price field, I have a JQuery event bound to the field which sums all the price fields (this is a subtotal), calculates 10% tax and adds the tax to the subt...

Django: How should I store a money value?

I'm running into a paradigm problem here. I don't know whether I should store money as a Decimal(), or if I should store it as a string and convert it to a decimal myself. My reasoning is this: PayPal requires 2 decimal places, so if I have a product that is 49 dollars even, PayPal wants to see 49.00 come across the wire. Django's Decim...

Problem with Informix JDBC, MONEY and decimal separator in string literals

I have problem with JDBC application that uses MONEY data type. When I insert into MONEY column: insert into _money_test (amt) values ('123.45') I got exception: Character to numeric conversion error The same SQL works from native Windows application using ODBC driver. I live in Poland and have Polish locale and in my country comma...

Money vs Decimal datatypes when using LINQ to SQL

There are lots of discussion about using MONEY or DECIMAL datatypes in SQL Server for holding financial data. It seems all it is about possible lost of precision when using MONEY datatype. If I understand it right, this situation may take place when we do calculation with these values in stored procedures using T-SQL. Do I assume righ...

What are the alternatives to paypal for non-supported countries?

Hello, Not sure whether to ask this question here but here is the question. What are the alternatives to paypal for countries whom paypal does not support? For example, I am from Pakistan and i am looking for easy way like paypal to transfer and receive amounts from the services buyers whom i render my freelance service. Thanks ...

Money data type for .NET?

Looking for a good Money data type for .NET that supports currencies and exchange rates (with related behaviour & operations). Note: I started searching for the source code seen in print in the book Test-Driven Development By Example by author Kent Beck - he develops a nice Monetary concept. Unable to find the complete source online. ...

storing money amounts in mysql

I want to store 3.50 into a mysql table. I have a float that I store it in, but it stores as 3.5, not 3.50. How can I get it to have the trailing zero? ...

Scholarships for open-source code?

So I'm attending college in the fall, thus my dad won't be quiet about the scholarship thing. I've wrote two wordpress plugin and a jQuery plugin, so I was wondering if there are any legit scholarships I could enter because of these? Thanks for any advice =D ...

Is SQL Server 'MONEY' data type a decimal floating point or binary floating point?

I couldn't find anything that rejects or confirms whether SQL Server 'MONEY' data type is a decimal floating point or binary floating point. In the description it says that MONEY type range is from -2^63 to 2^63 - 1 so this kind of implies that it should be a binary floating point. But on this page it lists MONEY as "exact" numeric. Wh...

Passing money from a customer to a 3rd party directly (Paypal Payments Pro)

Hi All, Let us assume that there are three parties. Organization X, which provides a SaaS, organization Y, which is using the X's service, and Consumer Z which is using X's service to make purchase from Y. This is similar to something like EBay for instance in a way. Now I would like to have Y and Z directly transfer money between them ...

Drupal: module to implement credit system

Hello. I wonder, which Drupal modules I can use to implement the following system: User has X amount of credits on his account (I think CCK can store this value). He can create specific Nodes (requests for admin). Each Node has a Type (Taxonomy defined, may be. Or via CCK). Each Type has associated number of credits. When user publishe...

Doing a Math.Round(x,2) on a decimal value, but need to ensure 2 numbers after decimal as its money

Some values are returning 2.0 but I need it to be 2.00 as this is a money value that is displayed to the web page. I am doing: Math.Round(value, 2); Is there a way to force it to 2 numbers after the decimal? ...

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 on nokia and other Java enabeld devices. Are there any tutorials\matereals on how to do suc...

need help to figure out average price markup on products, I have cost and selling price

I have a database that has products in it, with both the cost and selling price. I want to create a simple report that will group similar costing, and figure out how much markup there is. I will then use this to apply the markup on new products. So my database looks like: productid, costPrice, sellingPrice 123, 9.99, 14.99 I have n...

Is generic Money<TAmount> a good implementation idea?

I have a Money Type that allows math operations and is sensitive to exchange rates so it will reduce one currency to another if rate is available to calculate in a given currency, rounds by various methods. It has other features that are sensitive to money, but I need to ask if the basic data type used should be made generic in nature. ...

How to let the user choose between typing price inclusive VAT or exclusive VAT in TextField?

I am implementing an back-office application where the user type in prices for products. Sometimes it is preferred to type the price inclusive value-added-tax, VAT and sometimes exclusive VAT. How do I best let the user choose between the inclusive or exclusive VAT in a usability perspective? I could have two TextFields above eachother...

How to get a good price on dev books

Does anyone have any tips for getting a good price on new/used programming-related books? I've looked at some of the more popular books (like DDD and GoF), and even used they can be pretty pricey. I'm not saying they aren't worth it, but I feel like there might be a more focused book store or exchange or something just for devs and/or ...