mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Handle UBL errors
This commit is contained in:
parent
889ffb431a
commit
f98a4deeff
@ -2,6 +2,8 @@
|
||||
|
||||
namespace App\Jobs;
|
||||
|
||||
use Utils;
|
||||
use Exception;
|
||||
use App\Jobs\Job;
|
||||
use CleverIt\UBL\Invoice\Generator;
|
||||
use CleverIt\UBL\Invoice\Invoice;
|
||||
@ -73,7 +75,13 @@ class ConvertInvoiceToUbl extends Job
|
||||
->setTaxExclusiveAmount($taxable)
|
||||
->setPayableAmount($invoice->balance));
|
||||
|
||||
return Generator::invoice($ublInvoice, $invoice->client->getCurrencyCode());
|
||||
try {
|
||||
return Generator::invoice($ublInvoice, $invoice->client->getCurrencyCode());
|
||||
} catch (Exception $exception) {
|
||||
Utils::logError($exception);
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
private function createParty($company, $user)
|
||||
|
Loading…
x
Reference in New Issue
Block a user