added tests for send email

This commit is contained in:
Denis Duliçi
2023-03-22 01:33:33 +03:00
parent 318082228e
commit 31c5891025
9 changed files with 161 additions and 21 deletions

View File

@@ -111,12 +111,18 @@ class Transaction extends Notification
public function getTagsReplacement(): array
{
$route_params = [
'company_id' => $this->transaction->company_id,
'transaction' => $this->transaction->id,
'payment' => $this->transaction->id,
];
return [
money($this->transaction->amount, $this->transaction->currency_code, true),
company_date($this->transaction->paid_at),
URL::signedRoute('signed.payments.show', [$this->transaction->id]),
route('transactions.show', $this->transaction->id),
route('portal.payments.show', $this->transaction->id),
URL::signedRoute('signed.payments.show', $route_params),
route('transactions.show', $route_params),
route('portal.payments.show', $route_params),
$this->transaction->contact->name,
$this->transaction->company->name,
$this->transaction->company->email,

View File

@@ -122,14 +122,19 @@ class PaymentReceived extends Notification
public function getTagsReplacement(): array
{
$route_params = [
'company_id' => $this->invoice->company_id,
'invoice' => $this->invoice->id,
];
return [
$this->invoice->document_number,
money($this->invoice->amount, $this->invoice->currency_code, true),
company_date($this->invoice->due_at),
trans('documents.statuses.' . $this->invoice->status),
URL::signedRoute('signed.invoices.show', [$this->invoice->id]),
route('invoices.show', $this->invoice->id),
route('portal.invoices.show', $this->invoice->id),
URL::signedRoute('signed.invoices.show', $route_params),
route('invoices.show', $route_params),
route('portal.invoices.show', $route_params),
money($this->transaction->amount, $this->transaction->currency_code, true),
company_date($this->transaction->paid_at),
$this->transaction->payment_method,

View File

@@ -90,13 +90,18 @@ class Bill extends Notification
public function getTagsReplacement(): array
{
$route_params = [
'company_id' => $this->bill->company_id,
'bill' => $this->bill->id,
];
return [
$this->bill->document_number,
money($this->bill->amount, $this->bill->currency_code, true),
money($this->bill->amount_due, $this->bill->currency_code, true),
company_date($this->bill->issued_at),
company_date($this->bill->due_at),
route('bills.show', $this->bill->id),
route('bills.show', $route_params),
$this->bill->contact_name,
$this->bill->company->name,
$this->bill->company->email,

View File

@@ -116,15 +116,20 @@ class Invoice extends Notification
public function getTagsReplacement(): array
{
$route_params = [
'company_id' => $this->invoice->company_id,
'invoice' => $this->invoice->id,
];
return [
$this->invoice->document_number,
money($this->invoice->amount, $this->invoice->currency_code, true),
money($this->invoice->amount_due, $this->invoice->currency_code, true),
company_date($this->invoice->issued_at),
company_date($this->invoice->due_at),
URL::signedRoute('signed.invoices.show', [$this->invoice->id]),
route('invoices.show', $this->invoice->id),
route('portal.invoices.show', $this->invoice->id),
URL::signedRoute('signed.invoices.show', $route_params),
route('invoices.show', $route_params),
route('portal.invoices.show', $route_params),
$this->invoice->contact_name,
$this->invoice->company->name,
$this->invoice->company->email,