From ab0d6ae4b244384f1b63fecf9bedaafc43b39019 Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Mon, 5 Jun 2017 17:53:21 +0300 Subject: [PATCH] =?UTF-8?q?Don=E2=80=99t=20allow=20activating=20recurring?= =?UTF-8?q?=20invoice=20if=20start=20date=20is=20blank?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Ninja/Repositories/ActivityRepository.php | 1 - resources/lang/en/texts.php | 1 + resources/views/invoices/edit.blade.php | 4 ++++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/app/Ninja/Repositories/ActivityRepository.php b/app/Ninja/Repositories/ActivityRepository.php index 135e0da0ac..7c94cf7265 100644 --- a/app/Ninja/Repositories/ActivityRepository.php +++ b/app/Ninja/Repositories/ActivityRepository.php @@ -87,7 +87,6 @@ class ActivityRepository 'activities.created_at', 'activities.contact_id', 'activities.activity_type_id', - 'activities.is_system', 'activities.balance', 'activities.adjustment', 'activities.notes', diff --git a/resources/lang/en/texts.php b/resources/lang/en/texts.php index 181db4c2ce..8ea37f043f 100644 --- a/resources/lang/en/texts.php +++ b/resources/lang/en/texts.php @@ -2266,6 +2266,7 @@ $LANG = array( 'google_analytics' => 'Google Analytics', 'analytics_key' => 'Analytics Key', 'analytics_key_help' => 'Track payments using :link', + 'start_date_required' => 'The start date is required', ); diff --git a/resources/views/invoices/edit.blade.php b/resources/views/invoices/edit.blade.php index 31090f491a..23f8ac202a 100644 --- a/resources/views/invoices/edit.blade.php +++ b/resources/views/invoices/edit.blade.php @@ -1345,6 +1345,10 @@ function onMarkSentClick() { if (model.invoice().is_recurring()) { + if (! model.invoice().start_date()) { + swal("{{ trans('texts.start_date_required') }}"); + return false; + } if (!isSaveValid()) { model.showClientForm(); return false;