mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-08 20:22:42 +01:00
Fixes for Triggered Actions
This commit is contained in:
parent
558c2c42ad
commit
42c27d1cac
@ -127,7 +127,10 @@ class TemplateEmail extends Mailable
|
||||
|
||||
$ubl_string = CreateUbl::dispatchNow($this->invitation->invoice);
|
||||
|
||||
$this->attachData($ubl_string, $this->invitation->invoice->getFileName('xml'));
|
||||
nlog($ubl_string);
|
||||
|
||||
if($ubl_string)
|
||||
$this->attachData($ubl_string, $this->invitation->invoice->getFileName('xml'));
|
||||
|
||||
}
|
||||
|
||||
|
@ -11,6 +11,8 @@
|
||||
|
||||
namespace App\Notifications;
|
||||
|
||||
use App\Jobs\Invoice\CreateUbl;
|
||||
use App\Models\Invoice;
|
||||
use App\Utils\TempFile;
|
||||
use App\Utils\Traits\MakesInvoiceHtml;
|
||||
use Illuminate\Bus\Queueable;
|
||||
|
@ -63,8 +63,8 @@ class TriggeredActions extends AbstractService
|
||||
private function sendEmail()
|
||||
{
|
||||
|
||||
//$reminder_template = $this->invoice->calculateTemplate('invoice');
|
||||
$reminder_template = 'payment';
|
||||
$reminder_template = $this->invoice->calculateTemplate('invoice');
|
||||
//$reminder_template = 'payment';
|
||||
|
||||
$this->invoice->invitations->load('contact.client.country', 'invoice.client.country', 'invoice.company')->each(function ($invitation) use ($reminder_template) {
|
||||
EmailEntity::dispatch($invitation, $this->invoice->company, $reminder_template);
|
||||
|
Loading…
Reference in New Issue
Block a user