mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-08-07 10:01:47 -04:00
Don't notify when paid invoices are viewed
This commit is contained in:
parent
d7cb786a3f
commit
dbdb9a0b4a
@ -80,6 +80,10 @@ class NotificationListener
|
|||||||
*/
|
*/
|
||||||
public function viewedInvoice(InvoiceInvitationWasViewed $event)
|
public function viewedInvoice(InvoiceInvitationWasViewed $event)
|
||||||
{
|
{
|
||||||
|
if ( ! floatval($event->invoice->balance)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
$this->sendEmails($event->invoice, 'viewed');
|
$this->sendEmails($event->invoice, 'viewed');
|
||||||
$this->pushService->sendNotification($event->invoice, 'viewed');
|
$this->pushService->sendNotification($event->invoice, 'viewed');
|
||||||
}
|
}
|
||||||
@ -89,6 +93,10 @@ class NotificationListener
|
|||||||
*/
|
*/
|
||||||
public function viewedQuote(QuoteInvitationWasViewed $event)
|
public function viewedQuote(QuoteInvitationWasViewed $event)
|
||||||
{
|
{
|
||||||
|
if ($event->quote->quote_invoice_id) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
$this->sendEmails($event->quote, 'viewed');
|
$this->sendEmails($event->quote, 'viewed');
|
||||||
$this->pushService->sendNotification($event->quote, 'viewed');
|
$this->pushService->sendNotification($event->quote, 'viewed');
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user