From 81217cc7f234679202173324e8ea4e11116fc894 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Wed, 10 Feb 2021 01:15:26 +1100 Subject: [PATCH] skip files that cannot be matched --- app/Jobs/Util/Import.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/Jobs/Util/Import.php b/app/Jobs/Util/Import.php index b8ac86b755..f33aa38b4a 100644 --- a/app/Jobs/Util/Import.php +++ b/app/Jobs/Util/Import.php @@ -1013,11 +1013,13 @@ class Import implements ShouldQueue $modified = $resource; if (array_key_exists('invoice_id', $resource) && $resource['invoice_id'] && ! array_key_exists('invoices', $this->ids)) { - throw new ResourceDependencyMissing('Processing documents failed, because of missing dependency - invoices.'); + return; + //throw new ResourceDependencyMissing('Processing documents failed, because of missing dependency - invoices.'); } if (array_key_exists('expense_id', $resource) && $resource['expense_id'] && ! array_key_exists('expenses', $this->ids)) { - throw new ResourceDependencyMissing('Processing documents failed, because of missing dependency - expenses.'); + return; + //throw new ResourceDependencyMissing('Processing documents failed, because of missing dependency - expenses.'); } if (array_key_exists('invoice_id', $resource) && $resource['invoice_id'] && array_key_exists('invoices', $this->ids)) {