From ce98843cf98a1c57b3e3a8b6c055c7179b3c07ef Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Sun, 9 Apr 2017 16:03:10 +0300 Subject: [PATCH] Fix for test data client balances --- app/Console/Commands/CreateTestData.php | 1 + app/Ninja/Intents/BaseIntent.php | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Console/Commands/CreateTestData.php b/app/Console/Commands/CreateTestData.php index 3b788a7e330e..ac046f3500c9 100644 --- a/app/Console/Commands/CreateTestData.php +++ b/app/Console/Commands/CreateTestData.php @@ -125,6 +125,7 @@ class CreateTestData extends Command { for ($i = 0; $i < $this->count; $i++) { $data = [ + 'is_public' => true, 'client_id' => $client->id, 'invoice_date_sql' => date_create()->modify(rand(-100, 100) . ' days')->format('Y-m-d'), 'due_date_sql' => date_create()->modify(rand(-100, 100) . ' days')->format('Y-m-d'), diff --git a/app/Ninja/Intents/BaseIntent.php b/app/Ninja/Intents/BaseIntent.php index f65407283431..9a07116df942 100644 --- a/app/Ninja/Intents/BaseIntent.php +++ b/app/Ninja/Intents/BaseIntent.php @@ -29,7 +29,7 @@ class BaseIntent $this->state = $state; $this->data = $data; - + // If they're viewing a client set it as the current state if (! $this->hasField('Filter', 'all')) { $url = url()->previous(); @@ -237,7 +237,6 @@ class BaseIntent foreach ($compositeEntity->children as $child) { if ($child->type == 'Field') { $field = $child->value; - ; } elseif ($child->type == 'Value') { $value = $child->value; }