From d1ddfa16cdf2970b1c7aeb0b844e0bd8b697d8a5 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Sun, 29 Aug 2021 22:39:50 +1000 Subject: [PATCH] Recurring Expenses import --- app/Jobs/Util/Import.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/Jobs/Util/Import.php b/app/Jobs/Util/Import.php index 9f0f64690c..a7dbc17f92 100644 --- a/app/Jobs/Util/Import.php +++ b/app/Jobs/Util/Import.php @@ -974,7 +974,10 @@ class Import implements ShouldQueue } $modified['client_id'] = $this->transformId('clients', $resource['client_id']); - $modified['recurring_id'] = $this->transformId('recurring_invoices', $resource['recurring_id']); + + if(array_key_exists('recurring_id', $resource) && !is_null($resource['recurring_id'])) + $modified['recurring_id'] = $this->transformId('recurring_invoices', (string)$resource['recurring_id']); + $modified['user_id'] = $this->processUserId($resource); $modified['company_id'] = $this->company->id; $modified['line_items'] = $this->cleanItems($modified['line_items']);