Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics NAV (Archived)

Posting Invoices - Don't want Amount recalculated on Sales Invoice Lines

Posted on by Microsoft Employee

We are moving from Nav 2.5 to Nav 2016 (Reimplementation - not an upgrade)

All of our sales information is loaded from an external system via dataports (now XMLPorts). This all works well. Our company has a line minimum which is set in the external system however we still need to see the values for Qty and UOM - we just don't want the this extended into the amount field when the minimum is in effect. Unfortunately, amount is recalculated when the order is posted.

Is there a simple way to override this without changing the Codeunit for Posting?

Thanks!

Sandra

*This post is locked for comments

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Posting Invoices - Don't want Amount recalculated on Sales Invoice Lines

    Fixed . . . here are the old and new lines. The new line is almost the same calculation that was used in Nav 2.5.

    // Old Line

    // "Line Amount" := ROUND(SalesLineQty * "Unit Price",Currency."Amount Rounding Precision");

    // New Line      

          "Line Amount" := ROUND("Line Amount" * SalesLineQty / Quantity,Currency."Amount Rounding Precision");

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Posting Invoices - Don't want Amount recalculated on Sales Invoice Lines

    Well I'm on to something - I found the point where it is recalculated so now I just need to figure out when to allow it and when to skip it to get the proper amounts. FYI the code is in CodeUnit 80 Sales-Post in the DivideAmount procedure.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Posting Invoices - Don't want Amount recalculated on Sales Invoice Lines

    The amounts are correct in the Sales Line Tables in Nav2016 . . . it's only during posting that it gets recalculated and I can't seem to pin down where the recalculation is occurring. Any other suggestions?

    Thank you for your help!

  • Suggested answer
    Indikauk Profile Picture
    Indikauk 1,759 on at
    RE: Posting Invoices - Don't want Amount recalculated on Sales Invoice Lines

    Hi, Smdaigle

    you can Check Sales Line Table & Sales Line Sub Form As well just to make sure there is no customization is done on that level.

    thanks

    indika

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Posting Invoices - Don't want Amount recalculated on Sales Invoice Lines

    Hi Indika,

    We only had 4 CodeUnits that were customized in our Nav2.5 installation - none related to Sales posting. I am not sure where else to look in the old version.

    I have looked at Code unit, 80 - Sales-Post in Nav2016 and have not yet located the code that updates the amount fields. I will keep looking but appreciate any pointers if you know where to look!

    Thanks,

    Sandra

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Posting Invoices - Don't want Amount recalculated on Sales Invoice Lines

    Hi Amol,

    The posting code unit, 80 - Sales-Post was not modified. It is the original with Version US2.50. Am I looking in the wrong place?  Thanks!

    Sandra

  • Suggested answer
    Indikauk Profile Picture
    Indikauk 1,759 on at
    RE: Posting Invoices - Don't want Amount recalculated on Sales Invoice Lines

    Hi Smdigle

    As per your explanation definitely there is Customization done on this part of Previous version Just go through the customization and Re Implement it on New Version you problem will be solve.

    Thanks

    Indika

  • Suggested answer
    Amol Salvi Profile Picture
    Amol Salvi 18,694 on at
    RE: Posting Invoices - Don't want Amount recalculated on Sales Invoice Lines

    Hi 

    Kindly check in previous version whether any customization done this process as wihtout customization it wont have possible in previous version . Kindly check with partner or whoever developed it 

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Posting Invoices - Don't want Amount recalculated on Sales Invoice Lines

    Sure! Our minimum line charge is a dollar amount of $100.00. If the unit price times quantity is less than $100.00 we still charge $100.00 however we need for the unit price and quantity to be displayed on the Invoice (even though the math doesn't work).

    Let's say you need 4 widgets at $0.25 each - the Sales Order would list something like this:

    Qty     UOM    Unit Price    Amount         Comment

    4         PCs       $0.25           $100.00    ** ** MINIMUM LINE CHARGE **

    This is all correct on the Sales Order however when I post it, the value in the Amount Field is recalculated to $1.00 (4 * 0.25).  If you had 420 items the total would be $105 (420 * 0.25). These values, including the Amount fields, are imported. The only time I would want a recalculation on the Amount Fields is if the quantity shipped is less than the order total (in which case we might still override the amount if qty * UnitPrice < 100 but we'd do that manually.

    Essentially I want the value in the Amount field of the Sales Order Line to be the Amount posted on the Sale Invoice line even if it's not the value of qty * UnitPrice . I hope that makes sense!

    Thanks,

    Sandra

  • Suggested answer
    Alexander Ermakov Profile Picture
    Alexander Ermakov 28,094 on at
    RE: Posting Invoices - Don't want Amount recalculated on Sales Invoice Lines

    Can you clarify, what is exactly the requirement - you want the amount field to be zero if the quantity of items is less then a certain minimum? What if you would not put any figure in the Unit Price field for those then before the import?

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,269 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans