Skip to main content

Notifications

Business Central forum
Suggested answer

Sales Prepayments, rounding error.

Posted on by 2,983

I think there is a bug in the prepayments functionality, and it's a bit hard to reproduce, but this has happened to us a few times, and it's a dead end.

1. Create a Sales Order with a Product type Sales Line, Qty 3, Unit Price 350 Total Price 1050, Total with Tax 1123,50 (7% Tax)

2. Post shipment for Qty 1

3. Post another Shipment for Qty 1

4. Post last Shipment for Qty1, so we have 3 shipments in total

5. Now make 1 prepayment for 350

6. Create another prepayment for 350, so we have 2 prepayments of total 700

7. Create Sales Invoice, and Create lines from Shipment lines. Bring all 3 posted Shipment Lines

8. Now when you post the invoice, you get an error. Prepayment Amount must be at least 700.  As the Prepayment Amount has been distributed among 3 invoices Lines, the total prepayment amount is 699,99 so there is a rounding issue here. 700/3 = 233,33, so 1 cent missing

The system should distribute 233,33 for 2 lines, and 233,34 to the remaining line.

Categories:
  • Suggested answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Sales Prepayments, rounding error.

    Ghetz,

    I am using BC 19 for my testing as this Forum is BC. There is a NAV Forum but no worries. My NAV version 2018 is down right now. BC takes the prepayment and inserted a single negative line when reversing. It does not apply to each Shipment line.

    Sorry maybe someone has a NAV 2018 they can test in CRONUS. I will say that if you can retest but make one change on the Sales Order and Check the box Compress Prepayment in the Prepayment Fast Tab.

    Thanks,

    Steve

  • Ghetz Profile Picture
    Ghetz 2,983 on at
    RE: Sales Prepayments, rounding error.

    Wow.. can you tell me your exact version? I have this error in NAV 2018 and also I'm business central...

    Can you please check de prepayment Amount of each line in the Invoice please? I'm wondering how they were distributed. The field is not visible by default so I select a invoice line and do Ctrl alt F1.. as you can see in my screenshot, in my case all lines have prepayment amount 233,33 €

    pastedimage1635964752589v6.png

  • Suggested answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Sales Prepayments, rounding error.

    Ghetz,

    OK, redo testing:

    Sales Order with 3 Items, 350/each, 700 prepay -

    pastedimage1636053185695v1.png

    Pay prepayment Invoice and Ship 3 times. Use Sales Invoice to Get Shipment Lines - 

    pastedimage1636053817421v7.png  pastedimage1636053858013v8.png  pastedimage1636053895277v9.png

    No issues.

    Steve

  • Ghetz Profile Picture
    Ghetz 2,983 on at
    RE: Sales Prepayments, rounding error.

    Steve, the prepayment in my example is not 100%

    Please try the Amounts in my example.. unit price 350 euros and prepayment amount exactly 700 euros.

    In your example, the total prepayment amount is 30, so there will be no rounding required (30/3 = 10)

    In my example there will be rounding involved and will trigger the error (700/3 = 233,33)

  • Suggested answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Sales Prepayments, rounding error.

    Ghetz,

    OK, in CRONUS, I did the following:

    1. Create a Sales Order with a Qty = 3

    2. Create Prepayment Invoice for 100% and posted and collected the funds

    3. Post Shipped 3 times, Qty = 1 each time

    4. Sales Invoice, Get Shipment Lines

    pastedimage1635976706817v1.png

    5. Posted Sales Invoice

    pastedimage1635976729108v2.png

    pastedimage1635976759236v3.png

    The Prepayment was reversed without error.

    Have you tried processing the same scenario in a CRONUS company? 

    Thanks,

    Steve

  • Ghetz Profile Picture
    Ghetz 2,983 on at
    RE: Sales Prepayments, rounding error.

    Steve, I've edited my previous post, and added some screenshots for clarification. You can simply create a single sales Line, and make partial shipments (Qty to Ship = 1 and Post Shipment). You post ship the same line 3 times. Then you post a prepayment of 700 euros. And finally you combine the 3 shipment lines in a Sales Invoice.

    Thanks for your help.

  • Suggested answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Sales Prepayments, rounding error.

    Ghetz,

    Question... You are using Combine Shipment Lines feature which leads me to you are pulling in multiple Sales Order Shipped lines, which includes a prepayment Sales Order, yes? Please confirm before I test in Cronus.

    Steve

  • Ghetz Profile Picture
    Ghetz 2,983 on at
    RE: Sales Prepayments, rounding error.

    Thanks for your answer Steve,

    I'm a partner developer myself. I believe this is a bug, and that it needs to be fixed by Microsoft.

    I just want to confirm if anyone can test this in their system so we can confirm it's a bug.

    I think it very easy to reproduce this error. The concept is simple; and the bug must be in the "Manually combine shipments" functionality.

    docs.microsoft.com/.../sales-how-to-combine-shipments-on-a-single-invoice

    Sending some screen shots, to better explain the problem.

    I have 1 Sales Order with 1 Sales Line Quantity 3 units, and posted in 3 shipments. Prepayment Amount of 700 euros:

    pastedimage1635964464267v1.png

    Now I combine this 3 shipment lines, in a Sales Invoice

    pastedimage1635964680767v4.png

    pastedimage1635964716655v5.png

    Here is the bug. The system must distribute 700 euros among the 3 lines, but in stead each line is assigned 

    pastedimage1635964752589v6.png

    So when posting the invoice, system throws an error:

    pastedimage1635964797238v7.png

  • Suggested answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Sales Prepayments, rounding error.

    Ghetz,

    Though I have never come across this error before, I might suggest that first you have your Partner tell you why the error occurred so you can solve the reason. My gut tells me that since prepayment spreads the prepayment over the Sales Lines it should round one of the lines to equal the total but BC thinks otherwise. You will need a DEV person to tell you why and I am sure this can be resolved with your Partner Developer. Prepayment is not related to tolerance.

    Thanks,

    Steve

  • Suggested answer
    Inge M. Bruvik Profile Picture
    Inge M. Bruvik 32,744 Moderator on at
    RE: Sales Prepayments, rounding error.

    Maybe you need to set a payment tolerance?

    docs.microsoft.com/.../finance-payment-tolerance-and-payment-discount-tolerance

    I have not tested it myself but i would not be surprised if the payment tolerance comes into place here so it might be worth a try to set the tolerance and see if that solves your issue.

Helpful resources

Quick Links

Dynamics 365 Community Update

Welcome to the inaugural Community Platform Update. As part of our commitment to…

Dynamics 365 Community Newsletter - August 2024

Catch up on the latest D365 Community news

Community Spotlight of the Month

Kudos to Mohana Yadav!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,115 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 227,971 Super User 2024 Season 2

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans