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\Models\Expense;
|
||||||
use App\Services\AbstractService;
|
use App\Services\AbstractService;
|
||||||
|
use App\Utils\Ninja;
|
||||||
use Exception;
|
use Exception;
|
||||||
use Illuminate\Http\UploadedFile;
|
use Illuminate\Http\UploadedFile;
|
||||||
|
|
||||||
@ -56,12 +57,13 @@ class ParseEDocument extends AbstractService
|
|||||||
|
|
||||||
// try to parse via mindee lib
|
// try to parse via mindee lib
|
||||||
$mindee_exception = null;
|
$mindee_exception = null;
|
||||||
try {
|
if (Ninja::isSelfHost())
|
||||||
$expense = (new MindeeEDocument($this->file))->run();
|
try {
|
||||||
} catch (Exception $e) {
|
$expense = (new MindeeEDocument($this->file))->run();
|
||||||
// ignore not available exceptions
|
} catch (Exception $e) {
|
||||||
$mindee_exception = $e;
|
// ignore not available exceptions
|
||||||
}
|
$mindee_exception = $e;
|
||||||
|
}
|
||||||
|
|
||||||
// return expense, when available and supress any errors occured before
|
// return expense, when available and supress any errors occured before
|
||||||
if ($expense)
|
if ($expense)
|
||||||
|
Loading…
Reference in New Issue
Block a user