mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-08 20:22:42 +01:00
v5.7.33
This commit is contained in:
parent
e5bd186b61
commit
574c800c2e
@ -1 +1 @@
|
||||
5.7.32
|
||||
5.7.33
|
@ -15,6 +15,7 @@ use App\Models\Company;
|
||||
use App\Models\Invoice;
|
||||
use App\Models\RecurringInvoice;
|
||||
use App\Utils\Ninja;
|
||||
use BaconQrCode\Exception\InvalidArgumentException;
|
||||
use BaconQrCode\Renderer\Image\SvgImageBackEnd;
|
||||
use BaconQrCode\Renderer\ImageRenderer;
|
||||
use BaconQrCode\Renderer\RendererStyle\RendererStyle;
|
||||
@ -50,8 +51,7 @@ class EpcQrGenerator
|
||||
);
|
||||
$writer = new Writer($renderer);
|
||||
|
||||
if($this->validateFields())
|
||||
return '';
|
||||
$this->validateFields();
|
||||
|
||||
$qr = $writer->writeString($this->encodeMessage(), 'utf-8');
|
||||
|
||||
@ -59,10 +59,15 @@ class EpcQrGenerator
|
||||
<rect x='0' y='0' width='100%'' height='100%' />{$qr}</svg>";
|
||||
|
||||
} catch(\Throwable $e) {
|
||||
nlog("EPC QR failure => ".$e->getMessage());
|
||||
return '';
|
||||
} catch(\Exception $e) {
|
||||
nlog("EPC QR failure => ".$e->getMessage());
|
||||
return '';
|
||||
}
|
||||
} catch( InvalidArgumentException $e) {
|
||||
nlog("EPC QR failure => ".$e->getMessage());
|
||||
return '';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@ -88,16 +93,13 @@ class EpcQrGenerator
|
||||
private function validateFields()
|
||||
{
|
||||
if (Ninja::isSelfHost() && isset($this->company?->custom_fields?->company2)) {
|
||||
return true;
|
||||
nlog('The BIC field is not present and _may_ be a required fields for EPC QR codes');
|
||||
}
|
||||
|
||||
if (Ninja::isSelfHost() && isset($this->company?->custom_fields?->company1)) {
|
||||
return true;
|
||||
nlog('The IBAN field is required');
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
private function formatMoney($value)
|
||||
|
@ -111,11 +111,12 @@ class PreviewController extends BaseController
|
||||
$html->settings = $settings;
|
||||
$variables = $html->generateLabelsAndValues();
|
||||
|
||||
$design = \App\Models\Design::withTrashed()->find($entity_obj->design_id ?? 2);
|
||||
|
||||
$design = \App\Models\Design::query()->withTrashed()->find($entity_obj->design_id ?? 2);
|
||||
|
||||
/* Catch all in case migration doesn't pass back a valid design */
|
||||
if (! $design) {
|
||||
$design = \App\Models\Design::find(2);
|
||||
$design = \App\Models\Design::query()->find(2);
|
||||
}
|
||||
|
||||
if ($design->is_custom) {
|
||||
@ -329,8 +330,8 @@ class PreviewController extends BaseController
|
||||
/**
|
||||
* @deprecated due to usage of transactions
|
||||
*
|
||||
* @param mixed $request
|
||||
* @return void
|
||||
* @param PreviewInvoiceRequest $request
|
||||
* @return mixed
|
||||
*/
|
||||
public function livex(PreviewInvoiceRequest $request)
|
||||
{
|
||||
|
@ -15,8 +15,8 @@ return [
|
||||
'require_https' => env('REQUIRE_HTTPS', true),
|
||||
'app_url' => rtrim(env('APP_URL', ''), '/'),
|
||||
'app_domain' => env('APP_DOMAIN', 'invoicing.co'),
|
||||
'app_version' => env('APP_VERSION','5.7.32'),
|
||||
'app_tag' => env('APP_TAG','5.7.32'),
|
||||
'app_version' => env('APP_VERSION','5.7.33'),
|
||||
'app_tag' => env('APP_TAG','5.7.33'),
|
||||
'minimum_client_version' => '5.0.16',
|
||||
'terms_version' => '1.0.1',
|
||||
'api_secret' => env('API_SECRET', ''),
|
||||
|
Loading…
Reference in New Issue
Block a user