mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Removed pdf-parameters
This commit is contained in:
parent
24239009a6
commit
9f3a58129f
@ -213,7 +213,7 @@ class CreateEntityPdf implements ShouldQueue
|
||||
}
|
||||
}
|
||||
if ($this->entity_string == "invoice" && $this->client->getSetting('enable_e_invoice')){
|
||||
(new CreateEInvoice($this->entity, true))->handle();
|
||||
(new CreateEInvoice($this->entity))->handle();
|
||||
}
|
||||
$this->invitation = null;
|
||||
// $this->entity = null;
|
||||
|
@ -29,7 +29,7 @@ class CreateEInvoice implements ShouldQueue
|
||||
|
||||
public $deleteWhenMissingModels = true;
|
||||
|
||||
public function __construct(private Invoice $invoice, private bool $alterPDF, private string $custom_pdf_path = "")
|
||||
public function __construct(private Invoice $invoice)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -76,7 +76,7 @@ class ZipInvoices implements ShouldQueue
|
||||
$this->invoices->each(function ($invoice) {
|
||||
(new CreateEntityPdf($invoice->invitations()->first()))->handle();
|
||||
if ($invoice->client->getSetting('enable_e_invoice')){
|
||||
(new CreateEInvoice($invoice, false))->handle();
|
||||
(new CreateEInvoice($invoice))->handle();
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -43,7 +43,7 @@ class GetInvoiceEInvoice extends AbstractService
|
||||
$file = Storage::disk($disk)->exists($file_path);
|
||||
|
||||
if (! $file) {
|
||||
$file_path = (new CreateEInvoice($this->invoice, false))->handle();
|
||||
$file_path = (new CreateEInvoice($this->invoice))->handle();
|
||||
}
|
||||
|
||||
return $file_path;
|
||||
|
@ -465,7 +465,7 @@ class InvoiceService
|
||||
|
||||
if ($invitation->invoice->client->getSetting('enable_e_invoice') && $invitation instanceof InvoiceInvitation)
|
||||
{
|
||||
(new CreateEInvoice($invitation->invoice, true))->handle();
|
||||
(new CreateEInvoice($invitation->invoice))->handle();
|
||||
}
|
||||
|
||||
});
|
||||
@ -478,7 +478,7 @@ class InvoiceService
|
||||
CreateEntityPdf::dispatch($invitation);
|
||||
|
||||
if ($invitation->invoice->client->getSetting('enable_e_invoice') && $invitation instanceof InvoiceInvitation) {
|
||||
CreateEInvoice::dispatch($invitation->invoice, true);
|
||||
CreateEInvoice::dispatch($invitation->invoice);
|
||||
}
|
||||
|
||||
});
|
||||
|
@ -42,7 +42,7 @@ class EInvoiceTest extends TestCase
|
||||
$this->company->e_invoice_type = "EN16931";
|
||||
$this->invoice->client->routing_id = 'DE123456789';
|
||||
$this->invoice->client->save();
|
||||
$xinvoice = (new CreateEInvoice($this->invoice, false))->handle();
|
||||
$xinvoice = (new CreateEInvoice($this->invoice))->handle();
|
||||
$this->assertNotNull($xinvoice);
|
||||
$this->assertTrue(Storage::exists($xinvoice));
|
||||
}
|
||||
@ -56,7 +56,7 @@ class EInvoiceTest extends TestCase
|
||||
$this->invoice->client->routing_id = 'DE123456789';
|
||||
$this->invoice->client->save();
|
||||
|
||||
$xinvoice = (new CreateEInvoice($this->invoice, false))->handle();
|
||||
$xinvoice = (new CreateEInvoice($this->invoice))->handle();
|
||||
nlog(Storage::path($xinvoice));
|
||||
$document = ZugferdDocumentReader::readAndGuessFromFile(Storage::path($xinvoice));
|
||||
$document->getDocumentInformation($documentno, $documenttypecode, $documentdate, $documentcurrency, $taxcurrency, $taxname, $documentlangeuage, $rest);
|
||||
@ -69,7 +69,7 @@ class EInvoiceTest extends TestCase
|
||||
public function checkEmbededPDFFile()
|
||||
{
|
||||
$pdf = (new CreateEntityPdf($this->invoice->invitations()->first()))->handle();
|
||||
(new CreateEInvoice($this->invoice, true, $pdf))->handle();
|
||||
(new CreateEInvoice($this->invoice))->handle();
|
||||
$document = ZugferdDocumentReader::readAndGuessFromFile($pdf);
|
||||
$document->getDocumentInformation($documentno, $documenttypecode, $documentdate, $documentcurrency, $taxcurrency, $taxname, $documentlangeuage, $rest);
|
||||
$this->assertEquals($this->invoice->number, $documentno);
|
||||
|
Loading…
x
Reference in New Issue
Block a user