I think you have to do this:

<@ASSIGN q "<@CALC 'floor(<@ARG QTY> / 12)'>">



Brian Humes
Director, Interactive
JohnsonRauhoff
269-428-9257 (direct)
269-428-3377 (main)
269-428-3312 (fax)
www.johnson-rauhoff.com
[EMAIL PROTECTED]




On Oct 17, 2008, at 10:50 AM, WebDude wrote:

Sorry if I am dense, Beverly, but I am not able to get this to work. It kind
of half works.

Here is what I am doing...

<@ASSIGN r "<@CALC '<@ARG QTY> % 12'>">
<@ASSIGN q "<@CALC '<@ARG QTY> / 12'>">

<@CALC "(<@VAR q> * 26.00) + ( This is a search for <@VAR r> which returns
the <@COLUMN shipcost.price> )">

Now, if I plug in the number 1 (quantity 1) This would look like this...

R = 1
Q = 0.0833333333333333

Thus I get...

0.0833333333333333 * 26.00 + (14.50) = 16.6666666666667
Answer should be 14.50

And if plug in  the number 13 (quantity 13) I get...

R = 1
Q = 1.08333333333333

Thus I get...

1.08333333333333 * 26.00 + (14.50) = 42.6666666666666
Answer should be 40.50



John Muldoon
Corporate Incentives
3416 Nicollet Ave S
Minneapolis, MN 55408-4552
612.822.2222
[EMAIL PROTECTED]

http://cipromo.com


-----Original Message-----
From: Beverly Voth [mailto:[EMAIL PROTECTED]
Sent: Friday, October 17, 2008 8:47 AM
To: witango-talk@witango.com
Subject: Re: Witango-Talk: One for the Math Gurus

Use the MODULO function to get the remainder.

    r = QTY % 12

Along with the quotient.

    q = QTY / 12

    (q * 26.00) + ( {lookup what the price is for "r" items} )



Beverly


On 10/17/08 9:17 AM, "WebDude" <[EMAIL PROTECTED]> wrote in whole or in
part:

Having a hard time wrapping my head around this one. Any help would be
appreciated.

Let's say we have bottles of perfume for sale. For shipping, we can
fit 12 bottles into a box. Each box is sent separately via a courrier. The courrier charges x amount for each box plus weight. To make a long
story shorter, in this scenario, we have different charges for
quantities of bottles within a box. So, for a specific zone, we charge
like so...

Quantity        Price
1  $14.50
2  $15.50
3  $16.50
4  $18.50
5  $18.75
6  $19.00
7  $20.00
8  $21.00
9  $22.00
10  $23.00
11  $25.00
12  $26.00

Now the problem is the thirteenth bottle. We need to charge 26.00 + 14.50.
14th bottle would be 26.00 + 15.50.
15th bottle would be 26.00 + 16.50, etc.
And to continue following this format...
24 bottles would be 26.00 + 26.00
25 bottles would be 26.00 + 26.00 + 14.50
26 bottles would be 26.00 + 26.00 + 15.50
27 bottles would be 26.00 + 26.00 + 16.50, etc.

There is a formula in there somehow, but I am having a devil of a time
trying to figure it out. Any help would be appreciated.

Thanks!


_____________________________________________________________________ _ __ TO UNSUBSCRIBE: Go to http://www.witango.com/developer/ maillist.taf

______________________________________________________________________ __
TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf
______________________________________________________________________ __
TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf


________________________________________________________________________
TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf

Reply via email to