From 258beba89510dd9ecf51a6bd6e91fa4e49432446 Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Sun, 22 Jan 2017 22:43:17 +0200 Subject: [PATCH] Added last sent date to recurring invoices list --- app/Ninja/Datatables/RecurringInvoiceDatatable.php | 6 ++++++ app/Ninja/Repositories/InvoiceRepository.php | 1 + 2 files changed, 7 insertions(+) diff --git a/app/Ninja/Datatables/RecurringInvoiceDatatable.php b/app/Ninja/Datatables/RecurringInvoiceDatatable.php index a04bcfe591..5fe1365817 100644 --- a/app/Ninja/Datatables/RecurringInvoiceDatatable.php +++ b/app/Ninja/Datatables/RecurringInvoiceDatatable.php @@ -32,6 +32,12 @@ class RecurringInvoiceDatatable extends EntityDatatable return Utils::fromSqlDate($model->start_date); } ], + [ + 'last_sent', + function ($model) { + return Utils::fromSqlDate($model->last_sent_date); + } + ], [ 'end_date', function ($model) { diff --git a/app/Ninja/Repositories/InvoiceRepository.php b/app/Ninja/Repositories/InvoiceRepository.php index e320c8f82e..8b65765190 100644 --- a/app/Ninja/Repositories/InvoiceRepository.php +++ b/app/Ninja/Repositories/InvoiceRepository.php @@ -143,6 +143,7 @@ class InvoiceRepository extends BaseRepository 'frequencies.name as frequency', 'invoices.start_date', 'invoices.end_date', + 'invoices.last_sent_date', 'contacts.first_name', 'contacts.last_name', 'contacts.email',