Skip to main content
Business Central forum
Answered

I want to add a column VAT in the Purch.Inv.Line table and I want to add a column

editSubscribe (1) ShareShare
ReportReport
Posted on by 21
 I want to add a column VAT in the Purch.Inv.Line table and I want to add a column which will have values = Amount including Vat - Amount. how to do this? Please help !!!!!!!!!!!!!
Categories:
Attachments
  • Community member Profile Picture
    Community member 21 on at
    I want to add a column VAT in the Purch.Inv.Line table and I want to add a column
    Thanks a lot.
  • Verified answer
    YUN ZHU Profile Picture
    YUN ZHU 60,087 Super User on at
    I want to add a column VAT in the Purch.Inv.Line table and I want to add a column
    Hi, this requires customization. Hope the following helps.
    pageextension 50122 MyExtension7 extends "Posted Purch. Invoice Subform"
    {
        layout
        {
            addafter("Line Amount")
            {
                field(TotalVAT; TotalVAT)
                {
                    Caption = 'Total VAT';
                    ApplicationArea = All;
                }
            }
        }
    
        trigger OnAfterGetRecord()
        begin
            TotalVAT := 0;
            TotalVAT := Rec."Amount Including VAT" - Rec.Amount;
        end;
    
        var
            TotalVAT: Decimal;
    }
     
     
    Thanks.
    ZHU
     

Helpful resources

Quick Links

New Blog Features Released!

Check out the new community blog features for viewers and authors…

Setting Up Knowledge Sources for Copilot…

Look at how configuring a comprehensive knowledge base is crucial…

Demystifying Copilot with Georg Glantschnig…

Industry experts answer burning questions directly from our amazing Community…

Leaderboard

#1
Andre Arnaud de Calavon Profile Picture

Andre Arnaud de Cal... 283,130 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 222,689 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,138

Featured topics

Product updates

Dynamics 365 release plans