Report on most recent Invoices Issued

Hi, I am trying to build a report for all our current active Accounts and I am trying to add the most recent invoice issued for those accounts.

We offer subscription licenses to our customers with a mismatch between "Invoice Date" and "Subscription Start Date" which is why I cannot just filter on the invoice module "Invoice Date" field.

What I am looking for is a facility to only display the most recent Invoice issued for all our existing customers. Currently my accounts duplicate in my report as there are more than one invoice assigned to each account due to historical invoices.

How can I work around this?

Many thanks

  • You can do that in different ways (calculated fields, workflow,...) but the most simple way is a logic_hook on event after_save on the Quotes object and a custom date field in the Accounts module.

    Just define the custom field e.g. last_invoice_date(_c) in studio and write a little logic_hook which checks the invoice date against the last_invoice_c field of the Account and if it is newer overwrites in in the Account.

    How to write logic_hooks you can find in the developer guide of your edition and version.

    http://support.sugarcrm.com/Documentation 

    Harald Kuske
    Principal Solution Architect – Professional Services, EMEA
    hkuske@sugarcrm.com
    SugarCRM Deutschland GmbH