Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics NAV (Archived)

Get Amount Including Vat of Sales line in purchase Line

Posted on by Microsoft Employee

I have the "purchase quote" page and in the lines section uses the page "Purchase Quote Subform". I need to create a new column in the lines part of the page (Purchase) and show the actual price of the item. So in order to his I have two options: or use the sales line table (amount including vat) or use sales price table (Unit Price Including VAT).

My problem is in both solutions I can't do a Get of the record because I have fields missing.

In Sales line I don't have the Sales Header No (I'm in a purchase order).

I've tried to create a new key in "Sales Line" only with Item No but the able don't accept this and always wants a key with item no, document no and document line number

The idea of this column is to compare the actual price with the new one that the user will create in the purchase quote.

*This post is locked for comments

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Get Amount Including Vat of Sales line in purchase Line

    I can't add "Item no." and "Sales Code" as a key to Sales Price table.


    Then in my purchase line table (39) I'm trying to do

    SalesPrice.SETRANGE(SalesPrice."Item No.","No.");
    SalesPrice.SETFILTER("Ending Date",'%1',0D);
    
    if SalesPrice.FINDLAST then repeat
    "Current Unit Price":=SalesPrice."Unit Price Including VAT";
    Until SalesPrice.NEXT=0;
    
    


    I din't understand your answer very well, but with that code I can get the most recent price of a product :)

  • Suggested answer
    Stefano Demiliani Profile Picture
    Stefano Demiliani 37,162 Most Valuable Professional on at
    RE: Get Amount Including Vat of Sales line in purchase Line

    Not so clear, but if the requirement is to show a sales price in a purchase line fiend, you can absolutely do that by checking the Sales Price table and maybe filtering for the Item and for the All Customers type.

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