mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
e-invoicing
This commit is contained in:
parent
e2e9655e82
commit
3aaf09202a
@ -154,9 +154,12 @@ class TemplateEmail extends Mailable
|
||||
}
|
||||
}
|
||||
if ($this->invitation && $this->invitation->invoice && $this->invitation->invoice->client->getSetting('enable_e_invoice') && $this->company->account->hasFeature(Account::FEATURE_PDF_ATTACHMENT)) {
|
||||
$this->invitation->invoice->service()->getEInvoice($this->invitation->contact);
|
||||
$disk = config('filesystems.default');
|
||||
$this->attach(Storage::disk($disk)->path($this->invitation->invoice->client->xinvoice_filepath($this->invitation->invoice->invitations->first()) . $this->invitation->invoice->getFileName("xml")));
|
||||
|
||||
$xinvoice_filepath = $this->invitation->invoice->service()->getEInvoice($this->invitation->contact);
|
||||
|
||||
if(Storage::disk(config('filesystems.default'))->exists($xinvoice_filepath))
|
||||
$this->attach(Storage::disk(config('filesystems.default'))->path($xinvoice_filepath), ['as' => $this->invitation->invoice->getFileName("xml"), 'mime' => null]);
|
||||
|
||||
}
|
||||
|
||||
return $this;
|
||||
|
Loading…
x
Reference in New Issue
Block a user