Solved

Prices / currency calculation in a view

Posted on 2004-08-09
2
284 Views
Last Modified: 2013-12-18
I would like to do the following in a view formula: have it display a price (which is entered on the document by the user), calculate the tax (7% Canadian GST), and add it to the price for a total.

i.e. to have the view column formulate something like the following: $1,295.00 + $90.65 = $1,385.65 (if the "price" field contains $1,295.00)

The problem I am having is that the view column converts the currency amount to a plain number (i.e. $1,295.00 to 1295), but when I configure the column for currency it will not accept the any text strings (" + ", " = ", etc.).

Is there any way to get the view column to calculate and display like this -- $1,295.00 + $90.65 = $1,385.65 ?

-Ke
0
Comment
Question by:kkiddie
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 15

Accepted Solution

by:
Bozzie4 earned 200 total points
ID: 11759742
You can, using a string (you'll need to adapt the rounding rules to what applies in Canada) :

price := mypricefield;
tax := price*7/100;
total := @round(price + tax;1/100);
@text( price; "C,2")+ " + " + @text( tax; "C,2") + " = " + @text( total; "C,2")

But you will probably want these values in your documents too, so it's better to do these calculations in fields in your documents !

cheers,

Tom

0
 

Author Comment

by:kkiddie
ID: 11761967
Thanks, Tom. It works.

I should have read more of the @Text help, I guess the answer was there... Still it is helpful for me as a beginning coder to see your approach.

Cheers,

-Kendall
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For Desktop Techs: How to retain a user's Notes configuration data when swapping out the end user's computer. (Assuming that you are not upgrading to a completely different version of Notes client) All you need to do is: 1) install Notes o…
  In today’s Arena we can’t imagine our lives without Internet as we are highly used to of it. If we consider our life style just for only 2 min we found that face to face communication is swapped by e-communication.  Every Where from Works place to…
This is a high-level webinar that covers the history of enterprise open source database use. It addresses both the advantages companies see in using open source database technologies, as well as the fears and reservations they might have. In this…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…

688 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question