From 17889ef5a73f29753eac9d8e02c982b0fe998d33 Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Tue, 14 Feb 2017 15:09:57 +0200 Subject: [PATCH] Don't show send date for draft recurring invoices --- app/Models/Invoice.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/Models/Invoice.php b/app/Models/Invoice.php index 2b306b7426d4..bf6065fd8f23 100644 --- a/app/Models/Invoice.php +++ b/app/Models/Invoice.php @@ -956,6 +956,10 @@ class Invoice extends EntityModel implements BalanceAffecting */ public function getNextSendDate() { + if (! $this->is_public) { + return null; + } + if ($this->start_date && ! $this->last_sent_date) { $startDate = $this->getOriginal('start_date') . ' ' . $this->account->recurring_hour . ':00:00';