# Problem with Cart sum when i've decimal

**URL:** <https://forum.bubble.io/t/problem-with-cart-sum-when-ive-decimal/218707>\
**Category:** Database\
**Created:** [August 5, 2022, 11:11am UTC](https://forum.bubble.io/t/problem-with-cart-sum-when-ive-decimal/218707 "2022-08-05T11:11:42Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![kevinblart](https://avatars.discourse-cdn.com/v4/letter/k/71e660/32.png) [@kevinblart](https://forum.bubble.io/u/kevinblart)\
**Post date:** [August 5, 2022, 11:11am UTC](https://forum.bubble.io/t/problem-with-cart-sum-when-ive-decimal/218707/1 "2022-08-05T11:11:42Z")

</div>

Hi all, i’m a new Bubble, i’ve buy a template and modify him to have that i want but i’ve problem with the checkout.

When have any number wih decimal my sum is wrong, but if haven’t decimal’s numbers the sum is ok.  
I don’t unterstand why and how solde this problem.  
If you need some informations, I stay at your disposal.  
Thanks for your time.

---

<div class="post-metadata">

**Author:** ![adamhholmes](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/adamhholmes/32/100510_2.png) [@adamhholmes](https://forum.bubble.io/u/adamhholmes)\
**Post date:** [August 5, 2022, 11:13am UTC](https://forum.bubble.io/t/problem-with-cart-sum-when-ive-decimal/218707/2 "2022-08-05T11:13:31Z")

</div>

Yes, we need more information…

Maybe some specific details about the way you’re calculating the price, your workflows, and page settings etc…

and some screenshots might help (or a read only link to your editor if you want some much quicker help).

---

<div class="post-metadata">

**Author:** ![kevinblart](https://avatars.discourse-cdn.com/v4/letter/k/71e660/32.png) [@kevinblart](https://forum.bubble.io/u/kevinblart)\
**Post date:** [August 5, 2022, 11:16am UTC](https://forum.bubble.io/t/problem-with-cart-sum-when-ive-decimal/218707/3 "2022-08-05T11:16:38Z")

</div>

I’ll come back to you with this information while I gather it all.  
Thanks 👍

---

<div class="post-metadata">

**Author:** ![kevinblart](https://avatars.discourse-cdn.com/v4/letter/k/71e660/32.png) [@kevinblart](https://forum.bubble.io/u/kevinblart)\
**Post date:** [August 5, 2022, 11:34am UTC](https://forum.bubble.io/t/problem-with-cart-sum-when-ive-decimal/218707/4 "2022-08-05T11:34:10Z")

</div>

![checkout-withsomeInofs](https://us1.discourse-cdn.com/bubble/original/3X/e/0/e0c3cf86bb4071d98d3dc2d56953df7a876c66c7.png)  
 ![Design-Config1](https://us1.discourse-cdn.com/bubble/original/3X/c/5/c5236ed21e68807fb74279d75a12591a95cf1643.png)  
 ![Design-Config2](https://us1.discourse-cdn.com/bubble/original/3X/9/3/93e1ff6fde379cb2e244f41d63315035970e4569.png)  
 ![Design-Config3](https://us1.discourse-cdn.com/bubble/original/3X/5/1/5112562d6496e79bec12f853f941d41aba7167c7.png)  
 ![Workflow-Step1](https://us1.discourse-cdn.com/bubble/original/3X/c/6/c6b40304dc28a553212f72f2497a93bd1efefd3c.png)  
 ![Workflow-Step2](https://us1.discourse-cdn.com/bubble/original/3X/8/b/8b8256cb48b92752c184da4bdf978882bca48cbc.png)  
 ![Workflow-Step3](https://us1.discourse-cdn.com/bubble/original/3X/2/d/2d2e7174e33163cda3896b43769693c2e99a0691.png)

Another anormal case:  
He think cart is 0

 ![Problem1](https://us1.discourse-cdn.com/bubble/original/3X/a/e/ae703c1123848c0ded5495f09b711eebe9a3ae06.png)

But if i checked Delivery

 ![Problem1-WhenDeliveryIsChecked](https://us1.discourse-cdn.com/bubble/original/3X/a/9/a9f559b497f8340e20de4e5f335cfa54c167f343.png)

For the ReadOnly Link, how i need to do exactly? Just switch this checkbox?

 ![ReadOnly](https://us1.discourse-cdn.com/bubble/original/3X/6/0/60367441afde5305ee13f61b84458f377c58a025.png)

---

<div class="post-metadata">

**Author:** ![rpetribu](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/rpetribu/32/90852_2.png) [@rpetribu](https://forum.bubble.io/u/rpetribu)\
**Post date:** [August 5, 2022, 1:03pm UTC](https://forum.bubble.io/t/problem-with-cart-sum-when-ive-decimal/218707/5 "2022-08-05T13:03:12Z")

</div>

But in the images you shared with us, both sums are right in the App 🤣

> [@kevinblart](#):
>
> For the ReadOnly Link, how i need to do exactly? Just switch this checkbox?

Yes!

---

<div class="post-metadata">

**Author:** ![adamhholmes](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/adamhholmes/32/100510_2.png) [@adamhholmes](https://forum.bubble.io/u/adamhholmes)\
**Post date:** [August 5, 2022, 1:12pm UTC](https://forum.bubble.io/t/problem-with-cart-sum-when-ive-decimal/218707/6 "2022-08-05T13:12:08Z")

</div>

How are you calculating the ‘total\_with\_tax’s value’?..

---

<div class="post-metadata">

**Author:** ![kevinblart](https://avatars.discourse-cdn.com/v4/letter/k/71e660/32.png) [@kevinblart](https://forum.bubble.io/u/kevinblart)\
**Post date:** [August 5, 2022, 1:23pm UTC](https://forum.bubble.io/t/problem-with-cart-sum-when-ive-decimal/218707/7 "2022-08-05T13:23:50Z")

</div>

Have modify the formula for test and beacause don’t need tax

 ![totalWithTax](https://us1.discourse-cdn.com/bubble/original/3X/d/a/da6fe1653f991b89342c6bb1c52b96169a7ecf22.png)

---

<div class="post-metadata">

**Author:** ![adamhholmes](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/adamhholmes/32/100510_2.png) [@adamhholmes](https://forum.bubble.io/u/adamhholmes)\
**Post date:** [August 5, 2022, 1:26pm UTC](https://forum.bubble.io/t/problem-with-cart-sum-when-ive-decimal/218707/8 "2022-08-05T13:26:31Z")

</div>

First thing I’d do is check in the debugger to see what’s going on…

Obviously the way you’re calculating that value is wrong… so the debugger will help to show you where the error is…

So I’d start there and try to trace the issue…

---

<div class="post-metadata">

**Author:** ![kevinblart](https://avatars.discourse-cdn.com/v4/letter/k/71e660/32.png) [@kevinblart](https://forum.bubble.io/u/kevinblart)\
**Post date:** [August 5, 2022, 1:29pm UTC](https://forum.bubble.io/t/problem-with-cart-sum-when-ive-decimal/218707/9 "2022-08-05T13:29:24Z")

</div>

Yes in the app is always good, but in my data, i don’t have the good Sum.

Now is just when i choice “Livraison” (Delivery) have problem, i don’t know how, but now with “A retirer sur place” (Pick-up) all is good 😅

---

<div class="post-metadata">

**Author:** ![kevinblart](https://avatars.discourse-cdn.com/v4/letter/k/71e660/32.png) [@kevinblart](https://forum.bubble.io/u/kevinblart)\
**Post date:** [August 5, 2022, 1:33pm UTC](https://forum.bubble.io/t/problem-with-cart-sum-when-ive-decimal/218707/10 "2022-08-05T13:33:47Z")

</div>

Thanks, I’ll start looking there.

Probably a rookie mistake, these are my first steps in this field and my shitty English doesn’t help me. I am not yet familiar with all the tools

---

<div class="post-metadata">

**Author:** ![kevinblart](https://avatars.discourse-cdn.com/v4/letter/k/71e660/32.png) [@kevinblart](https://forum.bubble.io/u/kevinblart)\
**Post date:** [August 5, 2022, 2:27pm UTC](https://forum.bubble.io/t/problem-with-cart-sum-when-ive-decimal/218707/11 "2022-08-05T14:27:55Z")

</div>

👍 👍 👍

I managed to get the right result even if I didn’t really solve the basic problem, let me explain:

I bypassed the tax calculation step (total\_with\_tax & total\_with\_tax\_delivery) because I don’t need it and I just retrieve the information directly from the source.

 ![shunter](https://us1.discourse-cdn.com/bubble/original/3X/3/7/3798f3f6bf3cbeedf2874b9462d0850c18ae231d.png)

Before:

 ![Workflow-Step2](https://us1.discourse-cdn.com/bubble/original/3X/8/b/8b8256cb48b92752c184da4bdf978882bca48cbc.png)

GREAT THANKS FOR YOUR HELP ! 👌 👍
