mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-24 02:14:21 -04:00
Merge pull request #4053 from beganovich/v2-fix-migration-design-issue
Fix migration issue with designs
This commit is contained in:
commit
51eedf313a
@ -84,7 +84,6 @@ class CreateInvoicePdf implements ShouldQueue
|
||||
$invoice_design_id = $this->invoice->design_id ? $this->invoice->design_id : $this->decodePrimaryKey($this->invoice->client->getSetting('invoice_design_id'));
|
||||
|
||||
$design = Design::find($invoice_design_id);
|
||||
|
||||
$html = new HtmlEngine(null, $this->invitation, 'invoice');
|
||||
|
||||
$template = new PdfMakerDesign(strtolower($design->name));
|
||||
|
@ -207,6 +207,13 @@ class Import implements ShouldQueue
|
||||
private function processCompany(array $data): void
|
||||
{
|
||||
Company::unguard();
|
||||
|
||||
if (
|
||||
$data['settings']['invoice_design_id'] > 9 ||
|
||||
$data['settings']['invoice_design_id'] > "9"
|
||||
) {
|
||||
$data['settings']['invoice_design_id'] = 1;
|
||||
}
|
||||
|
||||
$data = $this->transformCompanyData($data);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user