1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-08 20:22:42 +01:00

Fixes for builds

This commit is contained in:
David Bomba 2024-04-05 19:14:29 +11:00
parent 1441380c70
commit 2c209d2775
4 changed files with 12 additions and 10 deletions

View File

@ -49,7 +49,8 @@ jobs:
npm i
npm run build
cp -r dist/* ../public/
cp dist/index.html ../resources/views/react/index.blade.php
- name: Prepare JS/CSS assets
run: |
npm i

View File

@ -50,7 +50,8 @@ jobs:
mkdir -p ../public/react/${{ github.event.release.tag_name }}/
cp -r dist/react/* ../public/react/${{ github.event.release.tag_name }}/
cp -r dist/react/* ../public/react/
cp dist/index.html ../resources/views/react/index.blade.php
mkdir -p ../public/tinymce_6.4.2/tinymce/js/
cp -r node_modules/tinymce ../public/tinymce_6.4.2/tinymce/js/
cd ..

View File

@ -64,8 +64,8 @@ class GenerateDeliveryNote
: $this->decodePrimaryKey($this->invoice->client->getSetting('invoice_design_id'));
$invitation = $this->invoice->invitations->first();
// $file_path = sprintf('%s%s_delivery_note.pdf', $this->invoice->client->invoice_filepath($invitation), $this->invoice->number);
$file_path = sprintf('%sdelivery_note.pdf', $this->invoice->client->invoice_filepath($invitation));
// return (new \App\Services\Pdf\PdfService($invitation, 'delivery_note'))->boot()->getPdf();
if (config('ninja.phantomjs_pdf_generation') || config('ninja.pdf_generator') == 'phantom') {
return (new Phantom())->generate($this->invoice->invitations->first());
@ -81,6 +81,9 @@ class GenerateDeliveryNote
$template = new PdfMakerDesign(strtolower($design->name));
}
$variables = $html->generateLabelsAndValues();
$variables['labels']['$entity_label']= ctrans('texts.delivery_note');
$state = [
'template' => $template->elements([
'client' => $this->invoice->client,
@ -88,7 +91,7 @@ class GenerateDeliveryNote
'pdf_variables' => (array) $this->invoice->company->settings->pdf_variables,
'contact' => $this->contact,
], 'delivery_note'),
'variables' => $html->generateLabelsAndValues(),
'variables' => $variables,
'options' => [
'client' => $this->invoice->client,
'entity' => $this->invoice,
@ -113,12 +116,10 @@ class GenerateDeliveryNote
info($maker->getCompiledHTML());
}
return $pdf;
// Storage::disk($this->disk)->put($file_path, $pdf);
$maker = null;
$state = null;
// return $file_path;
return $pdf;
}
}

View File

@ -141,7 +141,6 @@ class PdfMaker
{
$html = $this->document->saveHTML();
// nlog($html);
return str_replace('%24', '$', $html);
}
}