I need help creating a SIMPLE solution for Retail rounding.
Below are is an Example of Detail lines in a DataSheet Form that represents the price for an Item.
QuantityXUnitRate = Quantity * (UnitRate*Pct)
$14.0049 = 1 * $10.53 * 1.33
$14.0049 = 1 * $10.53 * 1.33
I need the price to end with a Currency Decimal of $$$$$.x9 for all prices.
The example above rounds to $14.00 for with 2 digit rounding or if I use 3 digit rounding $14.01.
I need it to be rounded with a .x9 either $13.99 or $14.09 or to the nearest .x9.
Subsequently, every Detail line we calculate in the Datasheet needs to end with an .x9 for Retail Pricing.
There are thousands of different UnitRates (costs), and the Pct (Percent of Markup) can also change.
Additionally, I sum the Detail Lines and the Totals need to match.
One of the Sum Fields is Calculated as
=Sum(IIf([taxable]=True,Nz([QuantityXUnitRate]),0))
This ends up Totaling to $28.01 which is wrong for 3 Digit rounding of the Detail Line, because $14.01+ $14.01 = $28.02.
I also tried Rounding
=Sum(IIf([Taxable]=False,Nz(Round([QuantityXUnitRate]),0),0))
and after that I still got the wrong amount $28.00.
I tried this with ‘2’ instead of ‘0’ with no difference
=Sum(IIf([Taxable]=False,Nz(Round([QuantityXUnitRate]),2),2)),
I know one of the ‘2’ refers to the Nz and the other to Rounding, but I not sure which is which at this point.
If the last significant digit need to be .09 or .19 or .29 or .39 or .49 or.59 or.69 or.79 or.89 or.99 then everything should Sum up correctly or I hope.
Here is another Example
QuantityXUnitRate = Quantity * (UnitRate*Pct)
$14.0049 = 1 * $10.53 * 1.33
$22.2642 = 1 * $16.74 * 1.33
However, I get the correct Detail Line of $14.01 and $22.26
and using =Sum(IIf([taxable]=False,Nz([QuantityXUnitRate]),0)) same as above, I get the correct amount $36.27.
Can some please help make a with a SIMPLE solution where all Decimals end up with a .x9 and then I’ll tackle the Sum if necessary.
Thanks in advance.
Below are is an Example of Detail lines in a DataSheet Form that represents the price for an Item.
QuantityXUnitRate = Quantity * (UnitRate*Pct)
$14.0049 = 1 * $10.53 * 1.33
$14.0049 = 1 * $10.53 * 1.33
I need the price to end with a Currency Decimal of $$$$$.x9 for all prices.
The example above rounds to $14.00 for with 2 digit rounding or if I use 3 digit rounding $14.01.
I need it to be rounded with a .x9 either $13.99 or $14.09 or to the nearest .x9.
Subsequently, every Detail line we calculate in the Datasheet needs to end with an .x9 for Retail Pricing.
There are thousands of different UnitRates (costs), and the Pct (Percent of Markup) can also change.
Additionally, I sum the Detail Lines and the Totals need to match.
One of the Sum Fields is Calculated as
=Sum(IIf([taxable]=True,Nz([QuantityXUnitRate]),0))
This ends up Totaling to $28.01 which is wrong for 3 Digit rounding of the Detail Line, because $14.01+ $14.01 = $28.02.
I also tried Rounding
=Sum(IIf([Taxable]=False,Nz(Round([QuantityXUnitRate]),0),0))
and after that I still got the wrong amount $28.00.
I tried this with ‘2’ instead of ‘0’ with no difference
=Sum(IIf([Taxable]=False,Nz(Round([QuantityXUnitRate]),2),2)),
I know one of the ‘2’ refers to the Nz and the other to Rounding, but I not sure which is which at this point.
If the last significant digit need to be .09 or .19 or .29 or .39 or .49 or.59 or.69 or.79 or.89 or.99 then everything should Sum up correctly or I hope.
Here is another Example
QuantityXUnitRate = Quantity * (UnitRate*Pct)
$14.0049 = 1 * $10.53 * 1.33
$22.2642 = 1 * $16.74 * 1.33
However, I get the correct Detail Line of $14.01 and $22.26
and using =Sum(IIf([taxable]=False,Nz([QuantityXUnitRate]),0)) same as above, I get the correct amount $36.27.
Can some please help make a with a SIMPLE solution where all Decimals end up with a .x9 and then I’ll tackle the Sum if necessary.
Thanks in advance.