# Decimal Processing

**URL:** <https://forum.shopware.com/t/decimal-processing/61758>\
**Category:** Programmierung\
**Tags:** widgets\
**Created:** [13. September 2019 um 11:16 UTC](https://forum.shopware.com/t/decimal-processing/61758 "2019-09-13T11:16:57Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![ketib](https://avatars.discourse-cdn.com/v4/letter/k/bb73d2/32.png) [@ketib](https://forum.shopware.com/u/ketib)\
**Post date:** [13. September 2019 um 11:16 UTC](https://forum.shopware.com/t/decimal-processing/61758/1 "2019-09-13T11:16:57Z")

</div>

Hi everyone, I have adjusted the backend theme so that I can enter more than 2 decimal places when editing an article.

This also works and is also stored correctly in the database.

Now I have the problem that in the fast editing the value is still rounded, although I have already increased decimal precision in all places to 4 which I have found by searching and toFixed is also on 4.

Does anyone have an idea how I can adapt the fast editing so that the price is not rounded to 2 decimal places? I think the problem lies with Extjs as I leave the field, the price is rounded to 2 decimal places.&nbsp;[https://dltutuapp.com/tutuapp-download](https://dltutuapp.com/tutuapp-download)&nbsp;[https://showbox.run/](https://showbox.run/) [https://kodi.software/](https://kodi.software/)

---

<div class="post-metadata">

**Author:** ![ahmadsaad](https://avatars.discourse-cdn.com/v4/letter/a/65b543/32.png) [@ahmadsaad](https://forum.shopware.com/u/ahmadsaad)\
**Post date:** [16. September 2019 um 14:49 UTC](https://forum.shopware.com/t/decimal-processing/61758/2 "2019-09-16T14:49:28Z")

</div>

Hallo,

you must change it hier :

[https://github.com/shopware/shopware/blob/5.6/engine/Shopware/Components/MultiEdit/Resource/Product/DqlHelper.php#L460](https://github.com/shopware/shopware/blob/5.6/engine/Shopware/Components/MultiEdit/Resource/Product/DqlHelper.php#L460)

offcours you can use the filter event hier:

[https://github.com/shopware/shopware/blob/5.6/engine/Shopware/Components/MultiEdit/Resource/Product/DqlHelper.php#L518](https://github.com/shopware/shopware/blob/5.6/engine/Shopware/Components/MultiEdit/Resource/Product/DqlHelper.php#L518)

VG,

Tel.: +49 755&nbsp;- 183 990 00 | Email: [info@enbit.de](mailto:info@enbit.de) | Web:&nbsp;[http://enbit.de/](http://enbit.de/)

---

<div class="post-metadata">

**Author:** ![vicycleeight](https://avatars.discourse-cdn.com/v4/letter/v/ee7513/32.png) [@vicycleeight](https://forum.shopware.com/u/vicycleeight)\
**Post date:** [21. Februar 2021 um 12:43 UTC](https://forum.shopware.com/t/decimal-processing/61758/3 "2021-02-21T12:43:15Z")

</div>

I started learning processing since a short time ago and I came across a problem; When deviding 199.999 by 200&nbsp;I want to outcome to be with 2 decimals&nbsp;(so the outcome should be 1 rounded of). Without formatting the outcome is 0.999995.

Code for formatting to String with 2 decimal:

```
float money = 199.999;
int munten = 200;

String calc1 = nf(money/munten,0,2);
println(calc1);

float calc2 = float(calc1);
println(calc2);
```

---

<div class="post-metadata">

**Author:** ![vicycleeight](https://avatars.discourse-cdn.com/v4/letter/v/ee7513/32.png) [@vicycleeight](https://forum.shopware.com/u/vicycleeight)\
**Post date:** [21. Februar 2021 um 12:43 UTC](https://forum.shopware.com/t/decimal-processing/61758/4 "2021-02-21T12:43:45Z")

</div>

I started learning processing since a short time ago and I came across a problem; When deviding 199.999 by 200&nbsp;I want to outcome to be with 2 decimals&nbsp;(so the outcome should be 1 rounded of). Without formatting the outcome is 0.999995.

Code for formatting to String with 2 decimal:

```
[get-vidmate.com](https://get-vidmate.com) [instasave.onl](https://instasave.onl)float money = 199.999;
int munten = 200;

String calc1 = nf(money/munten,0,2);
println(calc1);

float calc2 = float(calc1);
println(calc2);
```

---

<div class="post-metadata">

**Author:** ![sadatvid](https://avatars.discourse-cdn.com/v4/letter/s/ac8455/32.png) [@sadatvid](https://forum.shopware.com/u/sadatvid)\
**Post date:** [30. November 2021 um 08:53 UTC](https://forum.shopware.com/t/decimal-processing/61758/6 "2021-11-30T08:53:02Z")

</div>

Thanks, i was very confused about it.[.](https://get-vidmate.com) [.](https://instasave.onl/)
