mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-15 07:33:04 +01:00
feature flag
This commit is contained in:
parent
a31e810ec9
commit
a626736f2d
@ -13,6 +13,7 @@ namespace App\Services\EDocument\Imports;
|
||||
|
||||
use App\Models\Expense;
|
||||
use App\Services\AbstractService;
|
||||
use App\Utils\Ninja;
|
||||
use Exception;
|
||||
use Illuminate\Http\UploadedFile;
|
||||
|
||||
@ -56,12 +57,13 @@ class ParseEDocument extends AbstractService
|
||||
|
||||
// try to parse via mindee lib
|
||||
$mindee_exception = null;
|
||||
try {
|
||||
$expense = (new MindeeEDocument($this->file))->run();
|
||||
} catch (Exception $e) {
|
||||
// ignore not available exceptions
|
||||
$mindee_exception = $e;
|
||||
}
|
||||
if (Ninja::isSelfHost())
|
||||
try {
|
||||
$expense = (new MindeeEDocument($this->file))->run();
|
||||
} catch (Exception $e) {
|
||||
// ignore not available exceptions
|
||||
$mindee_exception = $e;
|
||||
}
|
||||
|
||||
// return expense, when available and supress any errors occured before
|
||||
if ($expense)
|
||||
|
Loading…
Reference in New Issue
Block a user