web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Suggested Answer

Sales Prepayments, rounding error.

(0) ShareShare
ReportReport
Posted on by 3,013

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.

I have the same question (0)
  • Suggested answer
    Dirk Profile Picture
    on at

    Hi,

    I am not sure I understand the process correctly.

    I understand you create the SO in step 1.

    But then ... do you post the prepayment invoice for that SO, with Prepayment % = 100 ?

    Is the entire process done in an unchanged NAV/BC environment or are there customizations involved?

    Thanks

  • Ghetz Profile Picture
    3,013 on at

    Thanks for your answer Dirk,

    We have no customizations. In this example we post 2 prepayment invoices of 350€ each, but you could also post a single prepayment of 700€, the final result will be the same. So it's not a 100% prepayment, It's a partial prepayment by Amount.

    The key to reproduce the bug is to post multiple shippings. So line Quantity is 3, and we post 3 shipments with Quantity 1 each.

    Then you create a Sales Invoice, and create the lines from the posted shipments, as described here:

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

    When you manually combine shipments into an invoice, the posted prepayment amount is distributed among the invoice lines, but the sum is different to the total amount; so system throws an error during posting. I believe there is rounding bug in this process.

  • Suggested answer
    Inge M. Bruvik Profile Picture
    1,111 Moderator on at

    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.

  • Suggested answer
    Community Member Profile Picture
    on at

    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

  • Ghetz Profile Picture
    3,013 on at

    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
    on at

    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
    3,013 on at

    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
    on at

    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
    3,013 on at

    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
    on at

    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

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 2,606

#2
YUN ZHU Profile Picture

YUN ZHU 931 Super User 2025 Season 2

#3
Jainam M. Kothari Profile Picture

Jainam M. Kothari 773 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans