pageextension 50122 MyExtension7 extends "Vendor Ledger Entries"
{
layout
{
addafter("Posting Date")
{
field(TotalVAT; TotalVAT)
{
Caption = 'Total VAT';
ApplicationArea = All;
}
}
}
trigger OnAfterGetRecord()
var
PurchInvHeader: Record "Purch. Inv. Header";
begin
TotalVAT := 0;
if Rec."Document Type" = Rec."Document Type"::Invoice then
if PurchInvHeader.Get(Rec."Document No.") then begin
PurchInvHeader.CalcFields(Amount, "Amount Including VAT");
TotalVAT := PurchInvHeader."Amount Including VAT" - PurchInvHeader.Amount;
end;
end;
var
TotalVAT: Decimal;
}
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,269 Super User 2024 Season 2
Martin Dráb 230,198 Most Valuable Professional
nmaenpaa 101,156