1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 13:12:50 +01:00

Merge branch 'v5-stable' into v5-develop

This commit is contained in:
David Bomba 2021-09-09 12:01:05 +10:00
commit 56af0f5721
3 changed files with 4 additions and 2 deletions

View File

@ -126,7 +126,9 @@ class TemplateEmail extends Mailable
if($this->invitation->invoice && $settings->ubl_email_attachment && $this->company->account->hasFeature(Account::FEATURE_DOCUMENTS)){ if($this->invitation->invoice && $settings->ubl_email_attachment && $this->company->account->hasFeature(Account::FEATURE_DOCUMENTS)){
$ubl_string = CreateUbl::dispatchNow($this->invitation->invoice); $ubl_string = CreateUbl::dispatchNow($this->invitation->invoice);
$this->attachData($ubl_string, $this->invitation->invoice->getFileName('xml'));
if($ubl_string)
$this->attachData($ubl_string, $this->invitation->invoice->getFileName('xml'));
} }

View File

@ -205,7 +205,6 @@ class BaseDriver extends AbstractPaymentDriver
$invoices->each(function ($invoice) use ($payment) { $invoices->each(function ($invoice) use ($payment) {
event(new InvoiceWasPaid($invoice, $payment, $payment->company, Ninja::eventVars())); event(new InvoiceWasPaid($invoice, $payment, $payment->company, Ninja::eventVars()));
$invoice->service()->workFlow();
}); });
return $payment->service()->applyNumber()->save(); return $payment->service()->applyNumber()->save();

View File

@ -83,6 +83,7 @@ class UpdateInvoicePayment
->updatePaidToDate($paid_amount) ->updatePaidToDate($paid_amount)
->updateStatus() ->updateStatus()
->deletePdf() ->deletePdf()
->workFlow()
->save(); ->save();
event(new InvoiceWasUpdated($invoice, $invoice->company, Ninja::eventVars(auth()->user() ? auth()->user()->id : null))); event(new InvoiceWasUpdated($invoice, $invoice->company, Ninja::eventVars(auth()->user() ? auth()->user()->id : null)));