1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-13 06:32:40 +01:00

Add UBL feature to invoices

This commit is contained in:
David Bomba 2021-08-29 20:54:26 +10:00
parent 9e4f8da211
commit 5c99656fe2
2 changed files with 9 additions and 1 deletions

View File

@ -132,7 +132,6 @@ class InvoiceEmailEngine extends BaseEmailEngine
}
}
return $this;

View File

@ -11,6 +11,8 @@
namespace App\Mail;
use App\Jobs\Invoice\CreateUbl;
use App\Models\Account;
use App\Models\Client;
use App\Models\ClientContact;
use App\Models\User;
@ -116,6 +118,13 @@ class TemplateEmail extends Mailable
}
if($this->invitation->invoice && $settings->ubl_email_attachment && $this->company->account->hasFeature(Account::FEATURE_DOCUMENTS)){
$ubl_string = CreateUbl::dispatchNow($this->invitation->invoice);
$this->attachData($ubl_string, $this->invitation->invoice->getFileName('xml'));
}
return $this;
}
}