mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
commit
f9b788ba50
@ -1398,7 +1398,7 @@ class Import implements ShouldQueue
|
||||
$nmo->company = $this->company;
|
||||
$nmo->settings = $this->company->settings;
|
||||
$nmo->to_user = $this->user;
|
||||
NinjaMailerJob::dispatch($nmo);
|
||||
NinjaMailerJob::dispatch($nmo, true);
|
||||
|
||||
$modified['gateway_key'] = 'd14dd26a47cecc30fdd65700bfb67b34';
|
||||
|
||||
|
@ -194,12 +194,14 @@ class PaymentEmailEngine extends BaseEmailEngine
|
||||
|
||||
$data['$view_link'] = ['value' => '<a class="button" href="'.$this->payment->getLink().'">'.ctrans('texts.view_payment').'</a>', 'label' => ctrans('texts.view_payment')];
|
||||
$data['$paymentLink'] = &$data['$view_link'];
|
||||
$data['$portalButton'] = &$data['$view_link'];
|
||||
$data['$portalButton'] = ['value' => "<a href='{$this->payment->getPortalLink()}'>".ctrans('texts.login')."</a>", 'label' =>''];
|
||||
$data['$portal_url'] = &$data['$portalButton'];
|
||||
|
||||
$data['$view_url'] = ['value' => $this->payment->getLink(), 'label' => ctrans('texts.view_payment')];
|
||||
$data['$signature'] = ['value' => $this->settings->email_signature ?: ' ', 'label' => ''];
|
||||
|
||||
$data['$invoices'] = ['value' => $this->formatInvoices(), 'label' => ctrans('texts.invoices')];
|
||||
$data['$invoice_references'] = ['value' => $this->formatInvoiceReferences(), 'label' => ctrans('texts.invoices')];
|
||||
|
||||
return $data;
|
||||
}
|
||||
@ -215,6 +217,25 @@ class PaymentEmailEngine extends BaseEmailEngine
|
||||
return $invoice_list;
|
||||
}
|
||||
|
||||
private function formatInvoiceReferences()
|
||||
{
|
||||
|
||||
$invoice_list = '<br><br>';
|
||||
|
||||
foreach ($this->payment->invoices as $invoice) {
|
||||
|
||||
$invoice_list .= ctrans('texts.po_number'). " {$invoice->po_number} <br>";
|
||||
$invoice_list .= ctrans('texts.invoice_number_short') . " {$invoice->number} <br>";
|
||||
$invoice_list .= ctrans('texts.invoice_amount') ." ". Number::formatMoney($invoice->pivot->amount, $this->client) . "<br>";
|
||||
$invoice_list .= ctrans('texts.invoice_balance') ." ". Number::formatMoney($invoice->fresh()->balance, $this->client) . "<br>";
|
||||
$invoice_list .= "-----<br>";
|
||||
|
||||
}
|
||||
|
||||
return $invoice_list;
|
||||
|
||||
}
|
||||
|
||||
public function makeValues() :array
|
||||
{
|
||||
$data = [];
|
||||
|
@ -16,6 +16,7 @@ use App\Services\Ledger\LedgerService;
|
||||
use App\Services\Payment\PaymentService;
|
||||
use App\Utils\Ninja;
|
||||
use App\Utils\Number;
|
||||
use App\Utils\Traits\Inviteable;
|
||||
use App\Utils\Traits\MakesDates;
|
||||
use App\Utils\Traits\MakesHash;
|
||||
use App\Utils\Traits\Payment\Refundable;
|
||||
@ -28,6 +29,7 @@ class Payment extends BaseModel
|
||||
use MakesDates;
|
||||
use SoftDeletes;
|
||||
use Refundable;
|
||||
use Inviteable;
|
||||
|
||||
const STATUS_PENDING = 1;
|
||||
const STATUS_CANCELLED = 2;
|
||||
|
Loading…
x
Reference in New Issue
Block a user