# Round GrandTotal

**URL:** <https://forum.litium.com/t/round-grandtotal/695>\
**Category:** Questions\
**Created:** [March 11, 2019, 9:52am UTC](https://forum.litium.com/t/round-grandtotal/695 "2019-03-11T09:52:25Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![benjaming](https://avatars.discourse-cdn.com/v4/letter/b/b2d939/32.png) [@benjaming](https://forum.litium.com/u/benjaming)\
**Post date:** [March 11, 2019, 9:52am UTC](https://forum.litium.com/t/round-grandtotal/695/1 "2019-03-11T09:52:25Z")

</div>

Is there any way to round the GrandTotal?  
I have tried to override the value in OrderTotalCalculator.CalculateFromCarrier but it still has decimals when created in Litium.

```
public class OrderTotalCalculator : Foundation.Modules.ECommerce.Plugins.Orders.OrderTotalCalculator
    {
        public override void CalculateFromCarrier(OrderCarrier orderCarrier, SecurityToken token)
        {
            base.CalculateFromCarrier(orderCarrier, token);
            orderCarrier.GrandTotal = RoundPrice(orderCarrier.GrandTotal);
        }

        private decimal RoundPrice(decimal price)
        {
            return Math.Round(price);
        }
    }

```

Anyone having a suggestion?

Litium version: 5.5.1

---

<div class="post-metadata">

**Author:** ![steve.redstorm](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.litium.com/steve.redstorm/32/14_2.png) [@steve.redstorm](https://forum.litium.com/u/steve.redstorm)\
**Post date:** [March 11, 2019, 10:01am UTC](https://forum.litium.com/t/round-grandtotal/695/2 "2019-03-11T10:01:15Z")

</div>

You should not send rounded order-total to payment provider.

---

<div class="post-metadata">

**Author:** ![benjaming](https://avatars.discourse-cdn.com/v4/letter/b/b2d939/32.png) [@benjaming](https://forum.litium.com/u/benjaming)\
**Post date:** [March 11, 2019, 10:34am UTC](https://forum.litium.com/t/round-grandtotal/695/3 "2019-03-11T10:34:54Z")

</div>

We want to change both the value on the order and the value we send to the payment provider.  
This is a request from our customer.

---

<div class="post-metadata">

**Author:** ![marten](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.litium.com/marten/32/11_2.png) [@marten](https://forum.litium.com/u/marten)\
**Post date:** [March 12, 2019, 7:37am UTC](https://forum.litium.com/t/round-grandtotal/695/4 "2019-03-12T07:37:56Z")

</div>

Try inheriting `Litium.Foundation.Modules.ECommerce.Plugins.Orders.OrderGrandTotalCalculator` instead.

---

<div class="post-metadata">

**Author:** ![benjaming](https://avatars.discourse-cdn.com/v4/letter/b/b2d939/32.png) [@benjaming](https://forum.litium.com/u/benjaming)\
**Post date:** [March 12, 2019, 8:02am UTC](https://forum.litium.com/t/round-grandtotal/695/5 "2019-03-12T08:02:49Z")

</div>

Seems to be working!

Thank you @marten

---

<div class="post-metadata">

**Author:** ![patric.forsgard](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.litium.com/patric.forsgard/32/10_2.png) [@patric.forsgard](https://forum.litium.com/u/patric.forsgard)\
**Post date:** [March 12, 2019, 9:22am UTC](https://forum.litium.com/t/round-grandtotal/695/6 "2019-03-12T09:22:45Z")

</div>

I’m not sure but it can be good to check with _Skatteverket_ if it is legal to round of the order/payment amounts like that. Example when you buy with card in Sweden the amount is not rounded of by the shop and instead you pay the cents also.

---

<div class="post-metadata">

**Author:** ![benjaming](https://avatars.discourse-cdn.com/v4/letter/b/b2d939/32.png) [@benjaming](https://forum.litium.com/u/benjaming)\
**Post date:** [March 12, 2019, 9:38am UTC](https://forum.litium.com/t/round-grandtotal/695/7 "2019-03-12T09:38:19Z")

</div>

Will pass this on to the customer @patric.forsgard
