Wanted: More Math Functions (or, Can You Solve This?)
This WebDNA talk-list message is from 1997
It keeps the original formatting.
numero = 14029
interpreted = N
texte = HeHe ... of course I can solve it! :)>I'm trying to come up with a formula that will convert our US prices to our>Canadian prices.>>For higher priced items, we take the US price, multiply by 1.4, and round>up to the nearest 95 cents (eg, $6.95 would go to $9.95).This will work:[format thousands 14.2f][math][format thousands14.0f][math](usprice*1.4)-0.45[/math][/format]+.95[/math][/format]>For lower priced items, we take the US price, multiply by 1.4, and round up>to the nearest 5 cents (eg, $2.95 would go to $4.15).This will work:[format thousands 14.2f][math][format thousands14.1f]usprice*1.4[/format]+.05[/math][/format]... and to put both of them together with a price break betweenhigher priced items and lower priced items of US$9.95 andUS$9.96, do something like this:[showif [usprice]>9.95][format thousands 14.2f][math][formatthousands14.0f][math](usprice*1.4)-0.45[/math][/format]+.95[/math][/format][/showif][hideif [usprice]>9.95][format thousands 14.2f][math][format thousands14.1f]usprice*1.4[/format]+.05[/math][/format][/hideif]Sincerely, Ken GromeWebDNA Solutions808-737-6499
Associated Messages, from the most recent to the oldest:
|
- Re: Wanted: More Math Functions (or, Can You Solve This?) (bob 1997)
- Re: Wanted: More Math Functions (or, Can You Solve This?) (bob 1997)
- Re: Wanted: More Math Functions (or, Can You Solve This?) (Grant Hulbert 1997)
- Re: Wanted: More Math Functions (or, Can You Solve This?) (bob 1997)
- Re: Wanted: More Math Functions (or, Can You Solve This?) (bob 1997)
- Re: Wanted: More Math Functions (or, Can You Solve This?) (Grant Hulbert 1997)
- Re: Wanted: More Math Functions (or, Can You Solve This?) (bob 1997)
- Re: Wanted: More Math Functions (or, Can You Solve This?) (Grant Hulbert 1997)
- Re: Wanted: More Math Functions (or, Can You Solve This?) (bob 1997)
- Re: Wanted: More Math Functions (or, Can You Solve This?) (Michael Winston 1997)
- Re: Wanted: More Math Functions (or, Can You Solve This?) (Grant Hulbert 1997)
- Wanted: More Math Functions (or, Can You Solve This?) (Michael Winston 1997)
- Wanted: More Math Functions (or, Can You Solve This?) (Kenneth Grome 1997)
- Re: Wanted: More Math Functions (or, Can You Solve This?) (Grant Hulbert 1997)
|
HeHe ... of course I can solve it! :)>I'm trying to come up with a formula that will convert our US prices to our>Canadian prices.>>For higher priced items, we take the US price, multiply by 1.4, and round>up to the nearest 95 cents (eg, $6.95 would go to $9.95).This will work:[format thousands 14.2f]
[math][format thousands14.0f]
[math](usprice*1.4)-0.45[/math][/format]+.95[/math][/format]>For lower priced items, we take the US price, multiply by 1.4, and round up>to the nearest 5 cents (eg, $2.95 would go to $4.15).This will work:[format thousands 14.2f]
[math][format thousands14.1f]usprice*1.4[/format]+.05[/math][/format]... and to put both of them together with a price break betweenhigher priced items and lower priced items of US$9.95 andUS$9.96, do something like this:[showif [usprice]>9.95][format thousands 14.2f]
[math][formatthousands14.0f]
[math](usprice*1.4)-0.45[/math][/format]+.95[/math][/format][/showif][hideif [usprice]>9.95][format thousands 14.2f]
[math][format thousands14.1f]usprice*1.4[/format]+.05[/math][/format][/hideif]Sincerely, Ken GromeWebDNA Solutions808-737-6499
Kenneth Grome
DOWNLOAD WEBDNA NOW!
Top Articles:
Talk List
The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...
Related Readings:
Roundup function? (1997)
[Sum] function? (1997)
emailer w/F2 (1997)
New command suggestion (1997)
[WebDNA] variable name limit - clarification (2009)
Math, Multiple Equasions and Show/Hide (1998)
2.0Beta Command Ref (can't find this instruction) (1997)
Links inside of Text Areas (2000)
[WebDNA] test (2010)
[WebDNA] DNA hosting and/or Image server Hosting. (2011)
[WebDNA] [BULK] Web Merchant Authorize net issues (2011)
Incorrect Store Totals (2005)
More on EudoraPro Email (1998)
webcatalog [date] bug (1999)
Credit Card Processing (2000)
[LOOKUP] (1997)
updating a series of records via a text file? (1999)
Webcatalog and IIS4b2 (1997)
Shipping cost out of synch (1998)
Prevent multiple appends with Reload Button (1997)