mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-08-07 10:01:47 -04:00
Added deletedQuote subscription
This commit is contained in:
parent
5c891fa49e
commit
2f8344df66
@ -634,8 +634,6 @@ if (!defined('CONTACT_EMAIL')) {
|
||||
define('EVENT_CREATE_QUOTE', 3);
|
||||
define('EVENT_CREATE_PAYMENT', 4);
|
||||
define('EVENT_CREATE_VENDOR', 5);
|
||||
|
||||
// Added new events
|
||||
define('EVENT_UPDATE_QUOTE', 6);
|
||||
define('EVENT_DELETE_QUOTE', 7);
|
||||
define('EVENT_UPDATE_INVOICE', 8);
|
||||
|
@ -3,6 +3,7 @@
|
||||
use App\Events\InvoiceWasDeleted;
|
||||
use App\Events\InvoiceWasUpdated;
|
||||
use App\Events\QuoteWasUpdated;
|
||||
use App\Events\QuoteWasDeleted;
|
||||
use Utils;
|
||||
use App\Models\EntityModel;
|
||||
use App\Events\ClientWasCreated;
|
||||
@ -82,15 +83,6 @@ class SubscriptionListener
|
||||
public function createdExpense(ExpenseWasCreated $event)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @param QuoteWasUpdated $event
|
||||
*/
|
||||
public function updatedQuote(QuoteWasUpdated $event)
|
||||
{
|
||||
$transformer = new InvoiceTransformer($event->quote->account);
|
||||
$this->checkSubscriptions(EVENT_UPDATE_QUOTE, $event->quote, $transformer, ENTITY_CLIENT);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -111,6 +103,24 @@ class SubscriptionListener
|
||||
$this->checkSubscriptions(EVENT_DELETE_INVOICE, $event->invoice, $transformer, ENTITY_CLIENT);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param QuoteWasUpdated $event
|
||||
*/
|
||||
public function updatedQuote(QuoteWasUpdated $event)
|
||||
{
|
||||
$transformer = new InvoiceTransformer($event->quote->account);
|
||||
$this->checkSubscriptions(EVENT_UPDATE_QUOTE, $event->quote, $transformer, ENTITY_CLIENT);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param InvoiceWasDeleted $event
|
||||
*/
|
||||
public function deletedQuote(QuoteWasDeleted $event)
|
||||
{
|
||||
$transformer = new InvoiceTransformer($event->quote->account);
|
||||
$this->checkSubscriptions(EVENT_DELETE_QUOTE, $event->quote, $transformer, ENTITY_CLIENT);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $eventId
|
||||
* @param $entity
|
||||
|
Loading…
x
Reference in New Issue
Block a user