hidden from customers without email
This commit is contained in:
parent
0c687493fd
commit
6803af130d
@ -72,7 +72,7 @@ class Transaction extends Model
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
public $sortable = ['type', 'number', 'paid_at', 'amount','category.name', 'account.name', 'customer.name', 'invoice.document_number'];
|
||||
public $sortable = ['type', 'number', 'paid_at', 'amount', 'category.name', 'account.name', 'customer.name', 'invoice.document_number'];
|
||||
|
||||
/**
|
||||
* Clonable relationships.
|
||||
@ -552,6 +552,7 @@ class Transaction extends Model
|
||||
} catch (\Exception $e) {}
|
||||
|
||||
try {
|
||||
if (! empty($this->contact) && $this->contact->email) {
|
||||
$actions[] = [
|
||||
'type' => 'button',
|
||||
'title' => trans('invoices.send_mail'),
|
||||
@ -563,6 +564,7 @@ class Transaction extends Model
|
||||
'@click' => 'onEmail("' . route('modals.transactions.emails.create', $this->id) . '")',
|
||||
],
|
||||
];
|
||||
}
|
||||
} catch (\Exception $e) {}
|
||||
|
||||
$actions[] = [
|
||||
|
@ -575,7 +575,7 @@ class Document extends Model
|
||||
} catch (\Exception $e) {}
|
||||
|
||||
try {
|
||||
if ($this->type == 'invoice') {
|
||||
if (! empty($this->contact) && $this->contact->email && $this->type == 'invoice') {
|
||||
$actions[] = [
|
||||
'type' => 'button',
|
||||
'title' => trans('invoices.send_mail'),
|
||||
|
Loading…
x
Reference in New Issue
Block a user