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;
}
André Arnaud de Cal...
293,020
Super User 2025 Season 1
Martin Dráb
231,837
Most Valuable Professional
nmaenpaa
101,156
Moderator