web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Suggested Answer

Vendor report showing last date of payment

(0) ShareShare
ReportReport
Posted on by 390

Hello -- is there a way to pull a report from BC showing all vendors and the last payment date and the amount?

I can see the information in the vendor listing , but I need to click on the hyperlink one by one to see the date of the last check.

pastedimage1651011312340v1.png

Thanks in advance for your assistance!

I have the same question (0)
  • Suggested answer
    YUN ZHU Profile Picture
    95,329 Super User 2025 Season 2 on at

    Hi, I searched around and found no suitable report.
    But if customizing, it's not very difficult, because all the data is stored in Vendor ledger Entries, you only need to display the last payment for each Vendor.

    For example,

    pastedimage1651017320708v1.png

    Source Code: for reference only

    page 50000 "Last Vendor Payment"
    {
        ApplicationArea = All;
        Caption = 'Last Vendor Payment';
        PageType = List;
        SourceTable = "Vendor Ledger Entry";
        UsageCategory = Lists;
        SourceTableTemporary = true;
    
        layout
        {
            area(content)
            {
                repeater(General)
                {
                    field("Entry No."; Rec."Entry No.")
                    {
                        ToolTip = 'Specifies the number of the entry, as assigned from the specified number series when the entry was created.';
                        ApplicationArea = All;
                    }
                    field("Vendor No."; Rec."Vendor No.")
                    {
                        ToolTip = 'Specifies the number of the vendor account that the entry is linked to.';
                        ApplicationArea = All;
                    }
                    field("Posting Date"; Rec."Posting Date")
                    {
                        ToolTip = 'Specifies the vendor entry''s posting date.';
                        ApplicationArea = All;
                    }
                    field("Document Type"; Rec."Document Type")
                    {
                        ToolTip = 'Specifies the document type that the vendor entry belongs to.';
                        ApplicationArea = All;
                    }
                    field("Document No."; Rec."Document No.")
                    {
                        ToolTip = 'Specifies the vendor entry''s document number.';
                        ApplicationArea = All;
                    }
                    field(Description; Rec.Description)
                    {
                        ToolTip = 'Specifies a description of the vendor entry.';
                        ApplicationArea = All;
                    }
                    field("Vendor Name"; Rec."Vendor Name")
                    {
                        ToolTip = 'Specifies the name of the vendor account that the entry is linked to.';
                        ApplicationArea = All;
                    }
                    field("Currency Code"; Rec."Currency Code")
                    {
                        ToolTip = 'Specifies the currency code for the amount on the line.';
                        ApplicationArea = All;
                    }
                    field(Amount; Rec.Amount)
                    {
                        ToolTip = 'Specifies the amount of the entry.';
                        ApplicationArea = All;
                    }
                }
            }
        }
    
        trigger OnOpenPage()
        var
            Vend: Record Vendor;
            VendorLedgerEntry: Record "Vendor Ledger Entry";
        begin
            Vend.Reset();
            if Vend.FindSet() then
                repeat
                    VendorLedgerEntry.Reset();
                    VendorLedgerEntry.SetRange("Vendor No.", Vend."No.");
                    VendorLedgerEntry.SetRange(VendorLedgerEntry."Document Type", VendorLedgerEntry."Document Type"::Payment);
                    VendorLedgerEntry.SetCurrentKey("Posting Date");
                    VendorLedgerEntry.Ascending(true);
                    if VendorLedgerEntry.FindLast() then begin
                        Rec := VendorLedgerEntry;
                        Rec.Insert();
                    end;
                until Vend.Next() = 0;
        end;
    }
    

    Hope this helps.

    Thanks.

    ZHU

  • Petronila Profile Picture
    390 on at

    Thank you for responding Yun Zhu!  I am not very good at customizing reports, but let me take a look at your instructions and see what I can do.

    Thanks again!

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 3,229

#2
Jainam M. Kothari Profile Picture

Jainam M. Kothari 1,867 Super User 2025 Season 2

#3
YUN ZHU Profile Picture

YUN ZHU 1,153 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans