Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
price + tax rounding
#5
10.05 was an example price with tax included (including tax could cause the resulting price to be 20.09), that I would have to display in cart.

I'll just stick to my first example numbers. Let's say customer would like to order 2 products, with one having price with tax 344.94 (that is the price I am supposed to display). After adding two products with price 344.94 the total price will be 688.87 (which can be odd for customer as he's probably expecting 344.94 * 2 to be the resulting price).

And that is not the case as I have to calculate the total price without the tax, substract any existing discounts (not only percentages) and then again calculate tax and sum it together -> which in this case will give me 688.87 .
Reply


Messages In This Thread
price + tax rounding - by mlieqo - Sep-20-2019, 04:14 PM
RE: price + tax rounding - by metulburr - Sep-20-2019, 05:57 PM
RE: price + tax rounding - by mlieqo - Sep-20-2019, 07:00 PM
RE: price + tax rounding - by metulburr - Sep-20-2019, 07:32 PM
RE: price + tax rounding - by mlieqo - Sep-20-2019, 07:53 PM
RE: price + tax rounding - by snippsat - Sep-20-2019, 09:01 PM
RE: price + tax rounding - by navidmo - Sep-20-2019, 09:19 PM
RE: price + tax rounding - by mlieqo - Sep-20-2019, 09:31 PM
RE: price + tax rounding - by snippsat - Sep-20-2019, 10:01 PM
RE: price + tax rounding - by mlieqo - Sep-20-2019, 10:12 PM
RE: price + tax rounding - by DeaD_EyE - Sep-21-2019, 01:52 PM
RE: price + tax rounding - by mlieqo - Sep-21-2019, 04:53 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  need help rounding joseph202020 7 1,391 Feb-21-2023, 08:13 PM
Last Post: joseph202020
  from numpy array to csv - rounding SchroedingersLion 6 2,289 Nov-14-2022, 09:09 PM
Last Post: deanhystad
  Finding the price based on industry and number of transactions chandramouliarun 0 931 Jul-26-2022, 07:36 PM
Last Post: chandramouliarun
  class - calculate total price of copies 3lnyn0 1 1,593 Dec-12-2021, 11:43 PM
Last Post: BashBedlam
  Random data generation sum to 1 by rounding juniorcoder 9 3,557 Oct-20-2021, 03:36 PM
Last Post: deanhystad
  Rounding issue kmll 1 1,446 Oct-08-2021, 10:35 AM
Last Post: Yoriz
Exclamation Invalid syntax error(Predict Ethereum Price) lulu43366 2 3,208 Sep-24-2021, 01:24 PM
Last Post: lulu43366
  Not rounding to desired decimal places? pprod 2 2,604 Mar-05-2021, 11:11 AM
Last Post: pprod
  Decimal Rounding error project_science 4 2,802 Jan-06-2021, 03:14 PM
Last Post: project_science
  An important question is how to create a zigzag in price data? epsilon 0 1,326 Nov-18-2020, 08:06 PM
Last Post: epsilon

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020